From 09d749663ef9021b137bc66f57e1e71962a631a0 Mon Sep 17 00:00:00 2001 From: jhfnetboy Date: Thu, 18 Jun 2026 19:36:10 +0700 Subject: [PATCH 1/2] docs: sync SDK 0.20.8 (regenerated API, new modules, examples, deployments) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Publishes the v0.20.8 docs to the latest channel (was still 0.16.23 content). - API: regenerated via TypeDoc at SDK 0.20.8. Module set now matches the real packages — adds @aastar/{admin,airaccount,channel,x402}, drops the consolidated community/analytics. apiSidebar updated; a frozen apiSidebarArchived keeps the /0.16.23/ archive sidebar intact. - Examples: examples/index.md now indexes the standalone aastar-examples repo (embed-widget, starter-site) + links the YAA full reference app. - Deployments: refreshed Sepolia contract addresses to match the @aastar/core canonical address book (single source of truth); Optimism/OP-Sepolia already matched. Fixed a dead L3 sidebar link. - License: latest-channel MIT badges -> Apache-2.0 (zh getting-started/sdk-readme, guide/docs/API_REFERENCE). Homepage version badge 0.16.6 -> 0.20.8. - Markdown sanitized for VitePress (escape // pseudo-tags) so the Vue compiler build passes; verified 'pnpm run docs:build' succeeds. Nav version dropdown: v0.20.8 (latest) / v0.16.23. --- .vitepress/config.ts | 56 +- api/@aastar/account/classes/UserOpClient.md | 8 +- .../functions/createEOAWalletClient.md | 2 +- .../account/functions/getUserOpHash.md | 2 +- .../account/functions/packUserOpLimits.md | 2 +- .../account/functions/toSimpleSmartAccount.md | 2 +- .../account/type-aliases/EOAWalletClient.md | 2 +- .../type-aliases/SimpleSmartAccount.md | 2 +- .../admin/classes/ProtocolGovernance.md | 380 ++ api/@aastar/admin/index.md | 7 + .../admin/interfaces/ProtocolParams.md | 33 + api/@aastar/airaccount.md | 347 ++ .../auth/hardware/functions/connectLedger.md | 30 + .../hardware/functions/createYubiKeySigner.md | 34 + api/@aastar/airaccount/auth/hardware/index.md | 11 + .../auth/hardware/interfaces/LedgerSigner.md | 55 + .../hardware/interfaces/LedgerSignerConfig.md | 28 + .../auth/hardware/interfaces/YubiKeySigner.md | 57 + .../interfaces/YubiKeySignerConfig.md | 33 + api/@aastar/airaccount/auth/passkey/index.md | 59 + .../airaccount/classes/AirAccountClient.md | 35 + api/@aastar/airaccount/classes/BLSManager.md | 168 + api/@aastar/airaccount/classes/CryptoUtil.md | 61 + .../airaccount/classes/ERC4337Utils.md | 137 + .../airaccount/classes/PasskeyManager.md | 104 + .../airaccount/classes/UserOpBuilder.md | 69 + api/@aastar/airaccount/core/bls/index.md | 35 + api/@aastar/airaccount/core/erc4337/index.md | 11 + .../airaccount/functions/algIdForTier.md | 19 + .../airaccount/functions/resolveTier.md | 22 + api/@aastar/airaccount/index.md | 347 ++ .../airaccount/interfaces/AirAccountConfig.md | 54 + .../airaccount/interfaces/BLSConfig.md | 17 + api/@aastar/airaccount/interfaces/BLSNode.md | 57 + .../airaccount/interfaces/BLSSignatureData.md | 73 + .../interfaces/BeginAuthenticationResponse.md | 45 + .../interfaces/BeginRegistrationResponse.md | 77 + .../BeginTransactionVerificationResponse.md | 73 + .../interfaces/CumulativeT2SignatureData.md | 47 + .../interfaces/CumulativeT3SignatureData.md | 75 + .../airaccount/interfaces/GasEstimate.md | 25 + .../airaccount/interfaces/GuardStatus.md | 33 + .../interfaces/PackedUserOperation.md | 73 + .../interfaces/PasskeyAuthenticationParams.md | 9 + .../airaccount/interfaces/PasskeyInfo.md | 41 + .../interfaces/PasskeyRegistrationParams.md | 25 + .../airaccount/interfaces/PasskeyRoutes.md | 78 + .../airaccount/interfaces/PreCheckResult.md | 33 + .../airaccount/interfaces/TierConfig.md | 21 + .../TransactionVerificationParams.md | 25 + .../airaccount/interfaces/UserOperation.md | 89 + .../server/classes/AccountManager.md | 237 + .../server/classes/AgentRegistryService.md | 494 ++ .../server/classes/AirAccountServerClient.md | 101 + .../server/classes/BLSSignatureService.md | 106 + .../server/classes/ConsoleLogger.md | 117 + .../classes/DvtPendingConfirmationError.md | 155 + .../server/classes/EIP7702DelegateService.md | 302 + .../server/classes/ERC8004Service.md | 276 + .../server/classes/EthereumProvider.md | 5510 +++++++++++++++++ .../server/classes/ForceExitService.md | 304 + .../airaccount/server/classes/GuardChecker.md | 85 + .../server/classes/GuardStateReader.md | 184 + .../server/classes/KmsAgentService.md | 199 + .../server/classes/KmsHttpClient.md | 181 + .../airaccount/server/classes/KmsManager.md | 740 +++ .../server/classes/KmsMonitorService.md | 185 + .../server/classes/KmsPaymentSigner.md | 94 + .../server/classes/KmsSessionService.md | 158 + .../airaccount/server/classes/KmsSigner.md | 63 + .../server/classes/LocalWalletSigner.md | 107 + .../server/classes/MemoryStorage.md | 296 + .../server/classes/ModuleManager.md | 240 + .../server/classes/P256PasskeySigner.md | 86 + .../server/classes/PaymasterManager.md | 195 + .../classes/PaymasterPriceStalenessError.md | 158 + .../server/classes/RecoveryService.md | 306 + .../server/classes/SessionKeyService.md | 484 ++ .../airaccount/server/classes/SilentLogger.md | 81 + .../airaccount/server/classes/TokenService.md | 116 + .../server/classes/TransferManager.md | 107 + .../server/classes/WalletManager.md | 77 + .../classes/WeightedSignatureService.md | 229 + .../server/enumerations/EntryPointVersion.md | 25 + .../server/functions/base64UrlDecode.md | 13 + .../server/functions/base64UrlEncode.md | 13 + .../functions/beginAuthenticationChallenge.md | 16 + .../functions/beginGrantSessionChallenge.md | 16 + .../buildAuthenticationCredential.md | 17 + .../functions/buildAuthenticatorData.md | 19 + .../server/functions/buildClientDataJSON.md | 21 + .../functions/buildInstallModuleHash.md | 28 + .../functions/buildUninstallModuleHash.md | 18 + .../server/functions/computeOapdSalt.md | 17 + .../functions/erc8004AddressesForChain.md | 13 + .../server/functions/getOapdAddress.md | 89 + .../functions/getOapdAddressWithChainId.md | 88 + .../functions/isExecuteUserOpWrapped.md | 15 + .../server/functions/isOapdDeployed.md | 88 + .../server/functions/isPendingConfirmation.md | 19 + .../functions/packP256SessionSignature.md | 22 + .../packSecp256k1SessionSignature.md | 21 + .../functions/runAuthenticationCeremony.md | 20 + .../functions/runGrantSessionCeremony.md | 20 + .../server/functions/runWebAuthnCeremony.md | 25 + .../server/functions/sepoliaV07Config.md | 29 + .../server/functions/validateConfig.md | 15 + .../server/functions/wrapExecuteUserOp.md | 28 + api/@aastar/airaccount/server/index.md | 339 + .../server/interfaces/AccountRecord.md | 131 + .../server/interfaces/ActiveRecovery.md | 91 + .../interfaces/AgentReputationSummary.md | 25 + .../server/interfaces/AgentSessionConfig.md | 45 + .../server/interfaces/AgentSessionInfo.md | 89 + .../interfaces/BeginCeremonyResponse.md | 23 + .../BindERC8004AgentWalletParams.md | 47 + .../server/interfaces/BlsConfigRecord.md | 31 + .../interfaces/BuildCredentialOptions.md | 43 + .../interfaces/CreateAgentAccountParams.md | 71 + .../interfaces/CreateP256SessionKeyRequest.md | 33 + .../CreateP256SessionKeyResponse.md | 49 + .../server/interfaces/DelegateInitParams.md | 51 + .../server/interfaces/EIP7702Authorization.md | 41 + .../server/interfaces/EntryPointConfig.md | 33 + .../interfaces/EntryPointVersionConfig.md | 27 + .../server/interfaces/EstimateGasParams.md | 43 + .../interfaces/ExecuteTransferParams.md | 120 + .../interfaces/GrantP256SessionParams.md | 111 + .../server/interfaces/GrantSessionParams.md | 101 + .../server/interfaces/GuardState.md | 81 + .../airaccount/server/interfaces/ILogger.md | 80 + .../server/interfaces/ISignerAdapter.md | 74 + .../server/interfaces/IStorageAdapter.md | 231 + .../server/interfaces/InstallModuleParams.md | 58 + .../KmsAttestationManifestResponse.md | 31 + .../interfaces/KmsAttestationProofResponse.md | 15 + .../interfaces/KmsAttestationResponse.md | 87 + .../KmsBeginAuthenticationRequest.md | 17 + .../KmsBeginAuthenticationResponse.md | 17 + .../KmsBeginGrantSessionAuthRequest.md | 9 + .../KmsBeginGrantSessionAuthResponse.md | 17 + .../interfaces/KmsBeginRegistrationRequest.md | 25 + .../KmsBeginRegistrationResponse.md | 17 + .../interfaces/KmsChangePasskeyResponse.md | 17 + .../KmsCompleteRegistrationRequest.md | 25 + .../KmsCompleteRegistrationResponse.md | 25 + .../interfaces/KmsCreateAgentKeyRequest.md | 40 + .../interfaces/KmsCreateAgentKeyResponse.md | 41 + .../server/interfaces/KmsCreateKeyRequest.md | 41 + .../server/interfaces/KmsCreateKeyResponse.md | 69 + .../server/interfaces/KmsDeleteKeyResponse.md | 17 + .../interfaces/KmsDeriveAddressResponse.md | 17 + .../interfaces/KmsDescribeKeyResponse.md | 57 + .../server/interfaces/KmsEip712Domain.md | 33 + .../server/interfaces/KmsEip712FieldValue.md | 19 + .../server/interfaces/KmsEip712TypeDef.md | 27 + .../interfaces/KmsEthereumTransaction.md | 57 + .../interfaces/KmsGetPublicKeyResponse.md | 41 + .../server/interfaces/KmsHealthResponse.md | 36 + .../server/interfaces/KmsHttpClientOptions.md | 33 + .../server/interfaces/KmsKeyStatusResponse.md | 49 + .../server/interfaces/KmsListKeysResponse.md | 33 + .../interfaces/KmsPaymentSignatureResponse.md | 19 + .../server/interfaces/KmsPurgeKeyResponse.md | 8 + .../interfaces/KmsQueueStatusResponse.md | 36 + .../KmsRefreshAgentCredentialRequest.md | 30 + .../KmsRefreshAgentCredentialResponse.md | 28 + .../KmsRevokeAgentCredentialRequest.md | 30 + .../KmsRevokeAgentCredentialResponse.md | 17 + .../interfaces/KmsRollbackCounterResponse.md | 17 + .../server/interfaces/KmsSignAgentRequest.md | 36 + .../server/interfaces/KmsSignAgentResponse.md | 27 + .../KmsSignGTokenAuthorizationRequest.md | 81 + .../interfaces/KmsSignGrantSessionRequest.md | 121 + .../interfaces/KmsSignGrantSessionResponse.md | 17 + .../server/interfaces/KmsSignHashResponse.md | 9 + .../KmsSignMicropaymentVoucherRequest.md | 49 + .../KmsSignP256GrantSessionRequest.md | 129 + .../server/interfaces/KmsSignRequest.md | 67 + .../server/interfaces/KmsSignResponse.md | 17 + .../interfaces/KmsSignTypedDataRequest.md | 59 + .../interfaces/KmsSignTypedDataResponse.md | 17 + .../interfaces/KmsSignX402PaymentRequest.md | 65 + .../server/interfaces/KmsStatsResponse.md | 12 + .../server/interfaces/KmsVersionResponse.md | 32 + .../interfaces/LegacyPasskeyAssertion.md | 25 + .../interfaces/MintAgentIdentityParams.md | 21 + .../server/interfaces/OapdConfig.md | 66 + .../interfaces/PasskeyAssertionContext.md | 12 + .../interfaces/PasskeyCeremonySigner.md | 41 + .../server/interfaces/PaymasterRecord.md | 59 + .../server/interfaces/PendingExit.md | 49 + .../server/interfaces/PendingWeightChange.md | 33 + .../interfaces/QueryAgentReputationParams.md | 43 + .../interfaces/RevokeP256SessionKeyRequest.md | 21 + .../RevokeP256SessionKeyResponse.md | 17 + .../server/interfaces/RunCeremonyOptions.md | 33 + .../server/interfaces/ServerConfig.md | 145 + .../server/interfaces/SessionInfo.md | 73 + .../server/interfaces/SetAgentWalletParams.md | 37 + .../interfaces/SignP256UserOpRequest.md | 25 + .../interfaces/SignP256UserOpResponse.md | 36 + .../interfaces/SubmitAgentReputationParams.md | 75 + .../server/interfaces/TokenBalance.md | 25 + .../server/interfaces/TokenGuardState.md | 57 + .../airaccount/server/interfaces/TokenInfo.md | 33 + .../server/interfaces/TransferRecord.md | 147 + .../server/interfaces/TransferResult.md | 65 + .../interfaces/UninstallModuleParams.md | 53 + .../server/interfaces/WebAuthnAssertion.md | 17 + .../WebAuthnAuthenticationCredential.md | 60 + .../server/interfaces/WeightConfig.md | 112 + .../server/type-aliases/AirAccountVersion.md | 8 + .../server/type-aliases/KmsPaymentAuth.md | 3 + .../airaccount/server/type-aliases/L2Type.md | 3 + .../server/type-aliases/ModuleTypeId.md | 3 + .../server/variables/ACCOUNT_ABI.md | 3 + .../AGENT_SESSION_KEY_VALIDATOR_ABI.md | 3 + .../server/variables/AIRACCOUNT_ABI.md | 3 + .../server/variables/AIRACCOUNT_ADDRESSES.md | 161 + .../variables/AIRACCOUNT_FACTORY_ABI.md | 3 + .../AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI.md | 3 + .../variables/AIR_ACCOUNT_DELEGATE_ABI.md | 3 + .../variables/AIR_ACCOUNT_DELEGATE_ADDRESS.md | 3 + .../airaccount/server/variables/ALG_ID.md | 41 + .../variables/CALLDATA_PARSER_REGISTRY_ABI.md | 3 + .../server/variables/DEFAULT_CREDENTIAL_ID.md | 7 + .../server/variables/DEFAULT_KMS_ENDPOINT.md | 6 + .../server/variables/DEFAULT_ORIGIN.md | 5 + .../server/variables/DEFAULT_RP_ID.md | 7 + .../server/variables/ENTRYPOINT_ABI_V6.md | 3 + .../server/variables/ENTRYPOINT_ABI_V7_V8.md | 3 + .../server/variables/ENTRYPOINT_ADDRESSES.md | 55 + .../airaccount/server/variables/ERC20_ABI.md | 3 + .../server/variables/ERC8004_ADDRESSES.md | 37 + .../variables/EXECUTE_BATCH_SELECTOR.md | 5 + .../server/variables/EXECUTE_SELECTOR.md | 5 + .../variables/EXECUTE_USER_OP_SELECTOR.md | 5 + .../server/variables/FACTORY_ABI_V6.md | 3 + .../server/variables/FACTORY_ABI_V7_V8.md | 3 + .../server/variables/FORCE_EXIT_MODULE_ABI.md | 3 + .../server/variables/GLOBAL_GUARD_ABI.md | 3 + .../airaccount/server/variables/L2_TYPE.md | 13 + .../server/variables/MAX_GUARDIANS.md | 6 + .../server/variables/MODULE_TYPE.md | 21 + .../server/variables/RECOVERY_THRESHOLD.md | 9 + .../variables/RECOVERY_TIMELOCK_SECONDS.md | 12 + .../variables/SESSION_KEY_VALIDATOR_ABI.md | 3 + .../server/variables/TIER_GUARD_HOOK_ABI.md | 3 + .../server/variables/VALIDATOR_ABI.md | 3 + .../variables/WEIGHT_CHANGE_EXPIRY_SECONDS.md | 5 + .../variables/WEIGHT_CHANGE_THRESHOLD.md | 5 + .../WEIGHT_CHANGE_TIMELOCK_SECONDS.md | 5 + .../server/variables/YAAAServerClient.md | 8 + api/@aastar/airaccount/type-aliases/AlgId.md | 3 + .../airaccount/type-aliases/TierLevel.md | 3 + .../airaccount/type-aliases/YAAAConfig.md | 8 + api/@aastar/airaccount/variables/ALG_BLS.md | 3 + .../airaccount/variables/ALG_CUMULATIVE_T2.md | 3 + .../airaccount/variables/ALG_CUMULATIVE_T3.md | 3 + api/@aastar/airaccount/variables/ALG_ECDSA.md | 3 + api/@aastar/airaccount/variables/ALG_P256.md | 3 + .../variables/DEFAULT_PASSKEY_ROUTES.md | 5 + .../airaccount/variables/YAAAClient.md | 8 + api/@aastar/analytics.md | 440 -- .../analytics/classes/AnalyticsClient.md | 109 - api/@aastar/analytics/index.md | 440 -- api/@aastar/channel/classes/ChannelClient.md | 189 + .../channel/functions/getVoucherDomain.md | 30 + api/@aastar/channel/functions/signVoucher.md | 61 + api/@aastar/channel/index.md | 20 + .../type-aliases/ChannelClientConfig.md | 35 + .../channel/type-aliases/ChannelConfig.md | 43 + .../channel/type-aliases/ChannelState.md | 67 + .../channel/type-aliases/SignedVoucher.md | 9 + .../channel/type-aliases/VoucherParams.md | 19 + .../channel/variables/VOUCHER_TYPES.md | 9 + .../community/classes/CommunityClient.md | 232 - api/@aastar/community/index.md | 10 - .../interfaces/CommunityLaunchConfig.md | 67 - .../community/interfaces/CommunityStats.md | 35 - .../community/interfaces/SBTRuleConfig.md | 27 - .../interfaces/XPNTsIssuanceParams.md | 27 - api/@aastar/core/classes/BLSSigner.md | 14 +- api/@aastar/core/classes/BaseClient.md | 40 +- api/@aastar/core/classes/BundlerClient.md | 16 +- .../core/classes/ContractConfigManager.md | 4 +- .../core/classes/RequirementChecker.md | 67 +- api/@aastar/core/classes/SepoliaFaucetAPI.md | 62 +- api/@aastar/core/classes/StateValidator.md | 12 +- .../core/enumerations/AuthorizationState.md | 25 + .../core/enumerations/EntryPointVersion.md | 6 +- api/@aastar/core/enumerations/NodeType.md | 10 +- .../core/enumerations/PolicyDecision.md | 32 + .../core/enumerations/RolePermissionLevel.md | 12 +- api/@aastar/core/functions/accountActions.md | 4 +- .../core/functions/accountFactoryActions.md | 4 +- api/@aastar/core/functions/agentActions.md | 23 + .../core/functions/agentRegistryActions.md | 23 + .../core/functions/aggregatorActions.md | 4 +- .../core/functions/airAccountActions.md | 23 + .../functions/airAccountFactoryActions.md | 23 + api/@aastar/core/functions/applyConfig.md | 2 +- .../core/functions/blsAlgorithmActions.md | 27 + api/@aastar/core/functions/channelActions.md | 23 + .../functions/createAAStarPublicClient.md | 2 +- .../core/functions/createHeliosTransport.md | 19 + .../core/functions/describeSupportedChains.md | 11 + api/@aastar/core/functions/dvtActions.md | 4 +- .../functions/encodeDVTAccountSignature.md | 21 + .../core/functions/encodeDVTVerifierProof.md | 20 + api/@aastar/core/functions/encodeG2Point.md | 27 + .../core/functions/entryPointActions.md | 4 +- .../core/functions/forceExitActions.md | 23 + api/@aastar/core/functions/gTokenActions.md | 4 +- .../functions/gTokenAuthorizationActions.md | 13 + api/@aastar/core/functions/getAddressUrl.md | 2 +- .../core/functions/getAllCommunityConfigs.md | 2 +- .../core/functions/getAllV2Contracts.md | 2 +- .../core/functions/getBlockExplorer.md | 6 +- .../core/functions/getCanonicalAddresses.md | 33 + api/@aastar/core/functions/getChainId.md | 2 +- api/@aastar/core/functions/getCommunities.md | 2 +- api/@aastar/core/functions/getCommunity.md | 2 +- .../core/functions/getCommunityConfig.md | 2 +- api/@aastar/core/functions/getContract.md | 2 +- .../core/functions/getContractNetworks.md | 2 +- api/@aastar/core/functions/getContracts.md | 14 +- .../core/functions/getCoreContracts.md | 14 +- .../core/functions/getDeploymentDate.md | 2 +- api/@aastar/core/functions/getEntryPoint.md | 2 +- api/@aastar/core/functions/getNetwork.md | 6 +- .../core/functions/getPaymasterV4_1.md | 2 +- api/@aastar/core/functions/getRoleName.md | 2 +- api/@aastar/core/functions/getRpcUrl.md | 2 +- .../core/functions/getSimpleAccountFactory.md | 2 +- .../core/functions/getSuperPaymasterV2.md | 2 +- api/@aastar/core/functions/getTestAccounts.md | 2 +- .../core/functions/getTestTokenContracts.md | 2 +- .../core/functions/getTokenContracts.md | 2 +- api/@aastar/core/functions/getTxUrl.md | 2 +- .../core/functions/getV2ContractByAddress.md | 2 +- .../core/functions/getV2ContractByName.md | 2 +- .../core/functions/getV2ContractsByDate.md | 2 +- api/@aastar/core/functions/hashToFieldU0U1.md | 25 + .../functions/isContractNetworkSupported.md | 2 +- .../core/functions/isRegisteredCommunity.md | 2 +- .../core/functions/isSupportedChainId.md | 15 + api/@aastar/core/functions/isV2Contract.md | 2 +- .../core/functions/listSupportedChainIds.md | 15 + api/@aastar/core/functions/lookupAddress.md | 23 + .../core/functions/paymasterActions.md | 4 +- .../core/functions/paymasterFactoryActions.md | 4 +- .../core/functions/policyRegistryActions.md | 37 + api/@aastar/core/functions/registryActions.md | 4 +- .../core/functions/reputationActions.md | 4 +- api/@aastar/core/functions/resolveEns.md | 23 + .../core/functions/resolveEnsVerified.md | 20 + api/@aastar/core/functions/sbtActions.md | 4 +- .../functions/sessionKeyValidatorActions.md | 23 + api/@aastar/core/functions/stakingActions.md | 4 +- .../core/functions/superPaymasterActions.md | 4 +- api/@aastar/core/functions/tokenActions.md | 4 +- api/@aastar/core/functions/x402Actions.md | 27 + api/@aastar/core/functions/x402IsNonceUsed.md | 94 + api/@aastar/core/functions/x402NonceKey.md | 19 + .../core/functions/xPNTsFactoryActions.md | 4 +- .../core/functions/xPNTsTokenActions.md | 4 +- api/@aastar/core/index.md | 105 + api/@aastar/core/interfaces/AccountBalance.md | 12 +- .../interfaces/BalanceValidationParams.md | 10 +- .../core/interfaces/BundlerResponse.md | 10 +- .../core/interfaces/CheckResourcesOptions.md | 13 + api/@aastar/core/interfaces/ClientConfig.md | 28 +- .../core/interfaces/CommunityConfig.md | 22 +- .../core/interfaces/ContractVersion.md | 14 +- .../interfaces/DVTAccountSignatureParams.md | 53 + .../interfaces/DeploymentValidationParams.md | 8 +- api/@aastar/core/interfaces/EnsOptions.md | 2581 ++++++++ .../core/interfaces/HashToFieldU0U1.md | 75 + .../core/interfaces/HeliosTransportConfig.md | 43 + api/@aastar/core/interfaces/PublicClient.md | 30 +- .../core/interfaces/ResourceBoolCheck.md | 19 + api/@aastar/core/interfaces/ResourceReport.md | 60 + .../core/interfaces/ResourceStakeCheck.md | 31 + api/@aastar/core/interfaces/RoleConfig.md | 36 +- .../core/interfaces/RoleRequirement.md | 12 +- .../core/interfaces/RoleValidationParams.md | 12 +- .../core/interfaces/SuperPaymasterConfig.md | 16 +- .../TokenBalanceValidationParams.md | 12 +- .../core/interfaces/TransactionOptions.md | 6 +- .../core/interfaces/UserOperationV07.md | 20 +- .../core/interfaces/ValidationParams.md | 6 +- .../core/interfaces/ValidationResult.md | 8 +- api/@aastar/core/interfaces/WalletClient.md | 18 +- .../core/type-aliases/AccountActions.md | 18 +- .../type-aliases/AccountFactoryActions.md | 6 +- api/@aastar/core/type-aliases/AgentActions.md | 158 + .../core/type-aliases/AgentRegistryActions.md | 303 + .../type-aliases/AgentSponsorshipPolicy.md | 27 + .../core/type-aliases/AggregatorActions.md | 198 +- .../core/type-aliases/AirAccountActions.md | 525 ++ .../type-aliases/AirAccountFactoryActions.md | 228 + api/@aastar/core/type-aliases/AssetPolicy.md | 55 + .../core/type-aliases/AssetPolicyInput.md | 39 + .../core/type-aliases/BLSAlgorithmActions.md | 23 + api/@aastar/core/type-aliases/BLSG1Point.md | 37 + .../core/type-aliases/BatchMintResult.md | 37 + .../core/type-aliases/BusinessResult.md | 2 +- .../core/type-aliases/CanonicalAddresses.md | 3 + .../core/type-aliases/ChannelActions.md | 279 + api/@aastar/core/type-aliases/ChannelState.md | 67 + .../core/type-aliases/CommunityProfile.md | 99 + .../core/type-aliases/ContractCategory.md | 2 +- .../core/type-aliases/ContractNetwork.md | 2 +- .../core/type-aliases/ContractScope.md | 55 + .../core/type-aliases/ContractScopeInput.md | 47 + api/@aastar/core/type-aliases/DVTActions.md | 82 +- api/@aastar/core/type-aliases/DVTTier.md | 5 + .../type-aliases/DryRunValidationResult.md | 23 + api/@aastar/core/type-aliases/ERC20Actions.md | 20 +- .../core/type-aliases/EntryPointActions.md | 12 +- api/@aastar/core/type-aliases/FaucetConfig.md | 14 +- .../type-aliases/FaucetPreparationResult.md | 10 +- .../core/type-aliases/ForceExitActions.md | 22 + .../core/type-aliases/GTokenActions.md | 2 +- .../GTokenAuthorizationActions.md | 211 + api/@aastar/core/type-aliases/InitConfig.md | 51 + .../core/type-aliases/NetworkContracts.md | 2 +- .../core/type-aliases/OperatorConfig.md | 28 +- api/@aastar/core/type-aliases/OperatorMode.md | 12 + .../core/type-aliases/P256SessionState.md | 27 + .../core/type-aliases/PackedUserOperation.md | 79 + .../core/type-aliases/PaymasterActions.md | 100 +- .../type-aliases/PaymasterFactoryActions.md | 56 +- api/@aastar/core/type-aliases/PendingExit.md | 43 + .../core/type-aliases/PendingModuleInstall.md | 43 + .../type-aliases/PolicyRegistryActions.md | 428 ++ .../core/type-aliases/RegistryActions.md | 553 +- .../core/type-aliases/ReputationActions.md | 166 +- .../core/type-aliases/ReputationBreakdown.md | 10 +- .../core/type-aliases/ReputationRule.md | 10 +- .../core/type-aliases/ResolvedAPNTsToken.md | 50 + .../core/type-aliases/RoleConfigDetailed.md | 40 +- api/@aastar/core/type-aliases/SBTActions.md | 178 +- api/@aastar/core/type-aliases/SBTData.md | 10 +- .../core/type-aliases/SBTMembership.md | 12 +- .../SessionKeyValidatorActions.md | 127 + api/@aastar/core/type-aliases/SlashRecord.md | 12 +- api/@aastar/core/type-aliases/SpendCounter.md | 25 + .../core/type-aliases/StakingActions.md | 124 +- .../type-aliases/SuperPaymasterActions.md | 593 +- .../core/type-aliases/SupportedChainId.md | 3 + .../core/type-aliases/SupportedNetwork.md | 2 +- api/@aastar/core/type-aliases/TokenActions.md | 2 +- api/@aastar/core/type-aliases/TokenConfig.md | 27 + api/@aastar/core/type-aliases/X402Actions.md | 185 + .../core/type-aliases/XPNTsFactoryActions.md | 88 +- .../core/type-aliases/XPNTsTokenActions.md | 379 +- .../core/variables/AASTAR_COMMUNITY.md | 2 +- .../variables/AAStarAirAccountFactoryV7ABI.md | 3 + .../AAStarAirAccountFactoryV7Artifact.md | 3 + .../core/variables/AAStarAirAccountV7ABI.md | 3 + .../variables/AAStarAirAccountV7Artifact.md | 9 + .../core/variables/AAStarBLSAggregatorABI.md | 3 + .../variables/AAStarBLSAggregatorArtifact.md | 9 + .../core/variables/AAStarBLSAlgorithmABI.md | 3 + .../variables/AAStarBLSAlgorithmArtifact.md | 9 + .../core/variables/AAStarValidatorABI.md | 3 + .../core/variables/AAStarValidatorArtifact.md | 9 + .../AGENT_IDENTITY_REGISTRY_ADDRESS.md | 3 + .../AGENT_REPUTATION_REGISTRY_ADDRESS.md | 3 + api/@aastar/core/variables/ALL_ADDRESSES.md | 14 +- api/@aastar/core/variables/ALL_ROLES.md | 2 +- api/@aastar/core/variables/APNTS_ADDRESS.md | 2 +- .../core/variables/AgentRegistryABI.md | 3 + .../core/variables/AgentRegistryArtifact.md | 3 + .../core/variables/AirAccountDelegateABI.md | 3 + .../variables/AirAccountDelegateArtifact.md | 3 + .../core/variables/AirAccountExtensionABI.md | 3 + .../variables/AirAccountExtensionArtifact.md | 9 + .../core/variables/BLSAggregatorABI.md | 2 +- .../core/variables/BLSAggregatorArtifact.md | 6 +- api/@aastar/core/variables/BLSHelpers.md | 69 +- api/@aastar/core/variables/BLSValidatorABI.md | 2 +- .../core/variables/BLSValidatorArtifact.md | 4 +- .../core/variables/BLS_AGGREGATOR_ADDRESS.md | 2 +- api/@aastar/core/variables/BLS_POP_DST.md | 13 + .../core/variables/BLS_VALIDATOR_ADDRESS.md | 2 +- api/@aastar/core/variables/BPS_DENOMINATOR.md | 2 +- api/@aastar/core/variables/BRANDING.md | 2 +- api/@aastar/core/variables/BREAD_COMMUNITY.md | 2 +- .../core/variables/CANONICAL_ADDRESSES.md | 449 ++ api/@aastar/core/variables/CHAIN_MAINNET.md | 2 +- api/@aastar/core/variables/CHAIN_SEPOLIA.md | 2 +- api/@aastar/core/variables/COMMUNITIES.md | 2 +- .../core/variables/COMMUNITY_OWNERS.md | 2 +- api/@aastar/core/variables/CONTRACTS.md | 14 +- .../core/variables/CONTRACT_METADATA.md | 2 +- .../core/variables/CONTRACT_SRC_HASH.md | 2 +- api/@aastar/core/variables/CORE_ADDRESSES.md | 14 +- .../variables/CalldataParserRegistryABI.md | 3 + .../CalldataParserRegistryArtifact.md | 9 + .../core/variables/DEFAULT_ADMIN_ROLE.md | 2 +- .../core/variables/DEFAULT_APNTS_PRICE_USD.md | 2 +- .../core/variables/DEFAULT_CALL_GAS_LIMIT.md | 2 +- .../DEFAULT_GAS_TOKEN_MINT_AMOUNT.md | 2 +- .../variables/DEFAULT_PRE_VERIFICATION_GAS.md | 2 +- .../core/variables/DEFAULT_TIMEOUT_MS.md | 2 +- .../core/variables/DEFAULT_TOKEN_NAME.md | 2 +- .../core/variables/DEFAULT_TOKEN_SYMBOL.md | 2 +- .../variables/DEFAULT_USDT_MINT_AMOUNT.md | 2 +- .../DEFAULT_VERIFICATION_GAS_LIMIT.md | 2 +- api/@aastar/core/variables/DVTValidatorABI.md | 2 +- .../core/variables/DVTValidatorArtifact.md | 4 +- api/@aastar/core/variables/DVT_TIER_T2.md | 5 + api/@aastar/core/variables/DVT_TIER_T3.md | 5 + .../core/variables/DVT_VALIDATOR_ADDRESS.md | 2 +- .../core/variables/ENTRY_POINT_ADDRESS.md | 2 +- api/@aastar/core/variables/EntryPointABI.md | 2 +- .../core/variables/EntryPointArtifact.md | 2 +- api/@aastar/core/variables/FAUCET_API_URL.md | 2 +- .../core/variables/ForceExitModuleABI.md | 3 + .../core/variables/ForceExitModuleArtifact.md | 3 + api/@aastar/core/variables/GTOKEN_ADDRESS.md | 2 +- .../core/variables/GTOKEN_STAKING_ADDRESS.md | 2 +- api/@aastar/core/variables/GTokenABI.md | 2 +- api/@aastar/core/variables/GTokenArtifact.md | 4 +- .../core/variables/GTokenAuthorizationABI.md | 3 + .../variables/GTokenAuthorizationArtifact.md | 3 + .../core/variables/GTokenStakingABI.md | 2 +- .../core/variables/GTokenStakingArtifact.md | 4 +- .../core/variables/INITIAL_ROLE_STAKES.md | 4 +- api/@aastar/core/variables/LINKS.md | 2 +- api/@aastar/core/variables/MAX_SERVICE_FEE.md | 2 +- .../MICRO_PAYMENT_CHANNEL_ADDRESS.md | 3 + .../core/variables/MONITORING_ADDRESSES.md | 2 +- .../core/variables/MicroPaymentChannelABI.md | 3 + .../variables/MicroPaymentChannelArtifact.md | 13 + api/@aastar/core/variables/MySBTABI.md | 2 +- api/@aastar/core/variables/MySBTArtifact.md | 4 +- api/@aastar/core/variables/NETWORKS.md | 4 +- .../core/variables/NODE_STAKE_AMOUNTS.md | 2 +- .../core/variables/OFFICIAL_ADDRESSES.md | 2 +- .../core/variables/PAYMASTER_ADDRESSES.md | 2 +- .../variables/PAYMASTER_FACTORY_ADDRESS.md | 2 +- .../core/variables/PAYMASTER_V4_ADDRESS.md | 2 +- .../variables/PAYMASTER_V4_IMPL_ADDRESS.md | 2 +- api/@aastar/core/variables/PaymasterABI.md | 2 +- .../core/variables/PaymasterArtifact.md | 4 +- .../core/variables/PaymasterFactoryABI.md | 2 +- .../variables/PaymasterFactoryArtifact.md | 4 +- .../core/variables/PolicyRegistryABI.md | 3 + .../core/variables/PolicyRegistryArtifact.md | 13 + .../core/variables/REGISTRY_ADDRESS.md | 2 +- .../variables/REPUTATION_SYSTEM_ADDRESS.md | 2 +- api/@aastar/core/variables/ROLE_ANODE.md | 4 +- api/@aastar/core/variables/ROLE_COMMUNITY.md | 4 +- api/@aastar/core/variables/ROLE_DVT.md | 4 +- api/@aastar/core/variables/ROLE_ENDUSER.md | 4 +- api/@aastar/core/variables/ROLE_KMS.md | 4 +- api/@aastar/core/variables/ROLE_NAMES.md | 2 +- .../core/variables/ROLE_PAYMASTER_AOA.md | 4 +- .../core/variables/ROLE_PAYMASTER_SUPER.md | 4 +- .../core/variables/ROLE_PERMISSION_LEVELS.md | 2 +- api/@aastar/core/variables/RegistryABI.md | 2 +- .../core/variables/RegistryArtifact.md | 6 +- .../core/variables/ReputationSystemABI.md | 2 +- .../variables/ReputationSystemArtifact.md | 4 +- api/@aastar/core/variables/SBT_ADDRESS.md | 2 +- .../core/variables/SEPOLIA_CONTRACTS.md | 14 +- .../core/variables/SEPOLIA_V2_VERSIONS.md | 2 +- .../core/variables/SERVICE_FEE_RATE.md | 2 +- .../core/variables/SUPER_PAYMASTER_ADDRESS.md | 2 +- .../core/variables/SessionKeyValidatorABI.md | 3 + .../variables/SessionKeyValidatorArtifact.md | 3 + .../core/variables/SimpleAccountABI.md | 2 +- .../core/variables/SimpleAccountArtifact.md | 2 +- .../core/variables/SimpleAccountFactoryABI.md | 2 +- .../variables/SimpleAccountFactoryArtifact.md | 2 +- .../core/variables/SuperPaymasterABI.md | 2 +- .../core/variables/SuperPaymasterArtifact.md | 6 +- .../core/variables/TEST_ACCOUNT_ADDRESSES.md | 2 +- .../core/variables/TEST_ACCOUNT_POOL_SIZE.md | 2 +- .../core/variables/TEST_COMMUNITIES.md | 2 +- .../core/variables/TEST_TOKEN_ADDRESSES.md | 2 +- api/@aastar/core/variables/TOKEN_ADDRESSES.md | 2 +- api/@aastar/core/variables/V2_SUMMARY.md | 2 +- .../core/variables/X402FacilitatorABI.md | 3 + .../core/variables/X402FacilitatorArtifact.md | 13 + .../core/variables/XPNTS_FACTORY_ADDRESS.md | 2 +- api/@aastar/core/variables/xPNTsFactoryABI.md | 2 +- .../core/variables/xPNTsFactoryArtifact.md | 4 +- api/@aastar/core/variables/xPNTsTokenABI.md | 2 +- .../core/variables/xPNTsTokenArtifact.md | 4 +- .../dapp/classes/AirAccountEIP1193Provider.md | 91 + api/@aastar/dapp/classes/DVTClient.md | 16 +- .../dapp/functions/announceAirAccount.md | 31 + api/@aastar/dapp/functions/useCreditScore.md | 2 +- .../dapp/functions/useSuperPaymaster.md | 4 +- api/@aastar/dapp/functions/watchProviders.md | 22 + api/@aastar/dapp/index.md | 9 + .../interfaces/AirAccountProviderConfig.md | 72 + .../dapp/interfaces/EIP6963ProviderDetail.md | 17 + .../dapp/interfaces/EIP6963ProviderInfo.md | 41 + .../enduser/classes/CommunityClient.md | 80 +- api/@aastar/enduser/classes/UserClient.md | 110 +- api/@aastar/enduser/classes/UserLifecycle.md | 88 +- .../interfaces/CommunityClientConfig.md | 32 +- .../enduser/interfaces/CommunityInfo.md | 4 +- .../interfaces/CreateCommunityParams.md | 10 +- .../enduser/interfaces/GaslessConfig.md | 6 +- .../enduser/interfaces/OnboardResult.md | 8 +- .../enduser/interfaces/ReputationData.md | 8 +- .../enduser/interfaces/UserClientConfig.md | 42 +- .../enduser/interfaces/UserLifecycleConfig.md | 40 +- .../identity/classes/ReputationClient.md | 18 +- api/@aastar/identity/functions/checkMySBT.md | 12 +- api/@aastar/identity/functions/getMySBTId.md | 12 +- .../operator/classes/OperatorLifecycle.md | 103 +- .../classes/PaymasterOperatorClient.md | 119 +- .../operator/classes/ProtocolClient.md | 74 +- .../operator/enumerations/ProposalState.md | 18 +- .../interfaces/OperatorClientConfig.md | 30 +- .../operator/interfaces/OperatorStatus.md | 8 +- .../interfaces/ProtocolClientConfig.md | 32 +- .../operator/interfaces/SponsorshipPolicy.md | 8 +- .../paymaster/classes/PaymasterClient.md | 28 +- .../paymaster/classes/PaymasterManager.md | 118 + .../paymaster/classes/PaymasterOperator.md | 32 +- .../classes/SuperPaymasterAdminClient.md | 19 +- .../paymaster/classes/SuperPaymasterClient.md | 4 +- .../paymaster/functions/buildPaymasterData.md | 2 +- .../functions/buildSuperPaymasterData.md | 2 +- .../paymaster/functions/checkEligibility.md | 2 +- .../paymaster/functions/formatUserOpV07.md | 2 +- .../functions/getPaymasterV4Middleware.md | 2 +- .../functions/getSuperPaymasterMiddleware.md | 2 +- .../paymaster/functions/getUserOpHashV07.md | 2 +- .../paymaster/functions/tuneGasLimit.md | 2 +- api/@aastar/paymaster/index.md | 6 + .../interfaces/BuildPaymasterDataParams.md | 90 + .../type-aliases/GaslessReadinessReport.md | 8 +- .../type-aliases/GaslessTransactionConfig.md | 16 +- .../paymaster/type-aliases/PaymasterConfig.md | 12 +- .../paymaster/type-aliases/PaymasterType.md | 7 + .../PaymasterV4MiddlewareConfig.md | 10 +- api/@aastar/sdk.md | 157 +- api/@aastar/sdk/classes/BLSSigner.md | 129 + api/@aastar/sdk/classes/BaseClient.md | 178 + api/@aastar/sdk/classes/BundlerClient.md | 119 + api/@aastar/sdk/classes/ChannelClient.md | 189 + api/@aastar/sdk/classes/CommunityClient.md | 445 ++ .../sdk/classes/ContractConfigManager.md | 25 + api/@aastar/sdk/classes/ExperimentClient.md | 81 + api/@aastar/sdk/classes/FacilitatorClient.md | 80 + api/@aastar/sdk/classes/FinanceClient.md | 307 + api/@aastar/sdk/classes/FundingManager.md | 172 + api/@aastar/sdk/classes/KeyManager.md | 182 + api/@aastar/sdk/classes/OperatorLifecycle.md | 666 ++ api/@aastar/sdk/classes/PaymasterClient.md | 261 + api/@aastar/sdk/classes/PaymasterManager.md | 118 + api/@aastar/sdk/classes/PaymasterOperator.md | 330 + .../sdk/classes/PaymasterOperatorClient.md | 527 ++ api/@aastar/sdk/classes/ProtocolClient.md | 375 ++ api/@aastar/sdk/classes/ProtocolGovernance.md | 380 ++ api/@aastar/sdk/classes/ReputationClient.md | 137 + api/@aastar/sdk/classes/RequirementChecker.md | 211 + api/@aastar/sdk/classes/SepoliaFaucetAPI.md | 710 +++ api/@aastar/sdk/classes/StateValidator.md | 117 + .../sdk/classes/SuperPaymasterAdminClient.md | 143 + .../sdk/classes/SuperPaymasterClient.md | 30 + api/@aastar/sdk/classes/UserClient.md | 583 ++ api/@aastar/sdk/classes/UserLifecycle.md | 451 ++ api/@aastar/sdk/classes/UserOpClient.md | 72 + .../sdk/classes/UserOpScenarioBuilder.md | 32 + .../sdk/classes/UserOperationBuilder.md | 272 + api/@aastar/sdk/classes/X402Client.md | 181 + .../sdk/enumerations/AuthorizationState.md | 25 + .../sdk/enumerations/EntryPointVersion.md | 17 + api/@aastar/sdk/enumerations/NodeType.md | 33 + .../sdk/enumerations/PolicyDecision.md | 32 + api/@aastar/sdk/enumerations/ProposalState.md | 65 + .../sdk/enumerations/RolePermissionLevel.md | 43 + .../sdk/enumerations/UserOpScenarioType.md | 41 + api/@aastar/sdk/functions/accountActions.md | 23 + .../sdk/functions/accountFactoryActions.md | 24 + api/@aastar/sdk/functions/agentActions.md | 23 + .../sdk/functions/agentRegistryActions.md | 23 + .../sdk/functions/aggregatorActions.md | 23 + .../sdk/functions/airAccountActions.md | 23 + .../sdk/functions/airAccountFactoryActions.md | 23 + api/@aastar/sdk/functions/applyConfig.md | 15 + .../sdk/functions/blsAlgorithmActions.md | 27 + .../sdk/functions/buildPaymasterData.md | 21 + .../sdk/functions/buildSuperPaymasterData.md | 26 + api/@aastar/sdk/functions/channelActions.md | 23 + api/@aastar/sdk/functions/checkEligibility.md | 19 + api/@aastar/sdk/functions/checkMySBT.md | 23 + .../sdk/functions/createAAStarPublicClient.md | 16 + .../sdk/functions/createAdminClient.md | 17 + .../sdk/functions/createCommunityClient.md | 17 + .../sdk/functions/createEOAWalletClient.md | 15 + .../sdk/functions/createEndUserClient.md | 17 + .../sdk/functions/createHeliosTransport.md | 19 + .../sdk/functions/createOperatorClient.md | 17 + .../sdk/functions/decodeContractError.md | 13 + .../sdk/functions/decodePaymentPayload.md | 13 + .../sdk/functions/decodePaymentRequired.md | 13 + .../sdk/functions/decodeSettleResponse.md | 13 + .../sdk/functions/describeSupportedChains.md | 11 + api/@aastar/sdk/functions/dvtActions.md | 23 + .../functions/encodeDVTAccountSignature.md | 21 + .../sdk/functions/encodeDVTVerifierProof.md | 20 + api/@aastar/sdk/functions/encodeG2Point.md | 27 + .../sdk/functions/encodePaymentPayload.md | 13 + .../sdk/functions/encodePaymentRequired.md | 13 + .../sdk/functions/encodeSettleResponse.md | 13 + .../sdk/functions/entryPointActions.md | 23 + .../sdk/functions/extractPaymentRequired.md | 16 + .../sdk/functions/extractSettleResponse.md | 15 + api/@aastar/sdk/functions/forceExitActions.md | 23 + api/@aastar/sdk/functions/formatUserOpV07.md | 15 + api/@aastar/sdk/functions/gTokenActions.md | 23 + .../functions/gTokenAuthorizationActions.md | 13 + api/@aastar/sdk/functions/generateNonce.md | 7 + api/@aastar/sdk/functions/getAddressUrl.md | 25 + .../sdk/functions/getAllCommunityConfigs.md | 9 + .../sdk/functions/getAllV2Contracts.md | 20 + api/@aastar/sdk/functions/getBlockExplorer.md | 24 + .../sdk/functions/getCanonicalAddresses.md | 33 + api/@aastar/sdk/functions/getChainId.md | 24 + api/@aastar/sdk/functions/getCommunities.md | 74 + api/@aastar/sdk/functions/getCommunity.md | 25 + .../sdk/functions/getCommunityConfig.md | 15 + api/@aastar/sdk/functions/getContract.md | 25 + .../sdk/functions/getContractNetworks.md | 18 + api/@aastar/sdk/functions/getContracts.md | 204 + api/@aastar/sdk/functions/getCoreContracts.md | 81 + .../sdk/functions/getDeploymentDate.md | 25 + api/@aastar/sdk/functions/getEIP3009Domain.md | 32 + api/@aastar/sdk/functions/getEntryPoint.md | 23 + api/@aastar/sdk/functions/getMySBTId.md | 24 + api/@aastar/sdk/functions/getNetwork.md | 24 + .../sdk/functions/getPaymasterV4Middleware.md | 31 + api/@aastar/sdk/functions/getPaymasterV4_1.md | 23 + api/@aastar/sdk/functions/getRoleName.md | 15 + api/@aastar/sdk/functions/getRpcUrl.md | 23 + .../sdk/functions/getSimpleAccountFactory.md | 23 + .../functions/getSuperPaymasterMiddleware.md | 31 + .../sdk/functions/getSuperPaymasterV2.md | 23 + api/@aastar/sdk/functions/getTestAccounts.md | 28 + .../sdk/functions/getTestTokenContracts.md | 36 + .../sdk/functions/getTokenContracts.md | 29 + api/@aastar/sdk/functions/getTxUrl.md | 25 + api/@aastar/sdk/functions/getUserOpHash.md | 17 + api/@aastar/sdk/functions/getUserOpHashV07.md | 15 + .../sdk/functions/getV2ContractByAddress.md | 26 + .../sdk/functions/getV2ContractByName.md | 26 + .../sdk/functions/getV2ContractsByDate.md | 24 + api/@aastar/sdk/functions/getVoucherDomain.md | 30 + api/@aastar/sdk/functions/hashToFieldU0U1.md | 25 + .../functions/isContractNetworkSupported.md | 25 + .../sdk/functions/isRegisteredCommunity.md | 15 + .../sdk/functions/isSupportedChainId.md | 15 + api/@aastar/sdk/functions/isV2Contract.md | 25 + .../sdk/functions/listSupportedChainIds.md | 15 + api/@aastar/sdk/functions/lookupAddress.md | 23 + api/@aastar/sdk/functions/packUserOpLimits.md | 16 + api/@aastar/sdk/functions/paymasterActions.md | 23 + .../sdk/functions/paymasterFactoryActions.md | 23 + .../sdk/functions/policyRegistryActions.md | 37 + api/@aastar/sdk/functions/registryActions.md | 23 + .../sdk/functions/reputationActions.md | 23 + api/@aastar/sdk/functions/resolveEns.md | 23 + .../sdk/functions/resolveEnsVerified.md | 20 + api/@aastar/sdk/functions/sbtActions.md | 23 + .../functions/sessionKeyValidatorActions.md | 23 + .../sdk/functions/signCancelAuthorization.md | 66 + .../signGTokenTransferWithAuthorization.md | 72 + .../functions/signReceiveWithAuthorization.md | 71 + .../signTransferWithAuthorization.md | 67 + api/@aastar/sdk/functions/signVoucher.md | 61 + api/@aastar/sdk/functions/stakingActions.md | 23 + .../sdk/functions/superPaymasterActions.md | 23 + .../sdk/functions/toSimpleSmartAccount.md | 31 + api/@aastar/sdk/functions/tokenActions.md | 23 + api/@aastar/sdk/functions/tuneGasLimit.md | 18 + api/@aastar/sdk/functions/x402Actions.md | 27 + api/@aastar/sdk/functions/x402IsNonceUsed.md | 94 + api/@aastar/sdk/functions/x402NonceKey.md | 19 + .../sdk/functions/xPNTsFactoryActions.md | 23 + .../sdk/functions/xPNTsTokenActions.md | 23 + api/@aastar/sdk/index.md | 157 +- api/@aastar/sdk/interfaces/AccountBalance.md | 41 + .../sdk/interfaces/BalanceValidationParams.md | 51 + .../interfaces/BuildPaymasterDataParams.md | 90 + api/@aastar/sdk/interfaces/BundlerResponse.md | 51 + .../sdk/interfaces/CheckResourcesOptions.md | 13 + api/@aastar/sdk/interfaces/ClientConfig.md | 108 + .../sdk/interfaces/CommunityClientConfig.md | 159 + api/@aastar/sdk/interfaces/CommunityConfig.md | 81 + api/@aastar/sdk/interfaces/CommunityInfo.md | 9 + api/@aastar/sdk/interfaces/ContractVersion.md | 63 + .../sdk/interfaces/CreateCommunityParams.md | 33 + .../interfaces/DVTAccountSignatureParams.md | 53 + .../interfaces/DeploymentValidationParams.md | 39 + api/@aastar/sdk/interfaces/EnsOptions.md | 2581 ++++++++ .../sdk/interfaces/EnsureFundingParams.md | 105 + .../sdk/interfaces/ExperimentRecord.md | 81 + api/@aastar/sdk/interfaces/FundETHParams.md | 73 + api/@aastar/sdk/interfaces/FundTokenParams.md | 83 + api/@aastar/sdk/interfaces/FundingParams.md | 49 + api/@aastar/sdk/interfaces/FundingResult.md | 27 + api/@aastar/sdk/interfaces/GaslessConfig.md | 17 + api/@aastar/sdk/interfaces/HashToFieldU0U1.md | 75 + .../sdk/interfaces/HeliosTransportConfig.md | 43 + api/@aastar/sdk/interfaces/KeyPair.md | 27 + api/@aastar/sdk/interfaces/OnboardResult.md | 25 + .../sdk/interfaces/OperatorClientConfig.md | 151 + api/@aastar/sdk/interfaces/OperatorStatus.md | 25 + .../sdk/interfaces/PackedUserOperation.md | 75 + .../sdk/interfaces/PaymasterGasParams.md | 17 + .../sdk/interfaces/ProtocolClientConfig.md | 159 + api/@aastar/sdk/interfaces/ProtocolParams.md | 33 + api/@aastar/sdk/interfaces/PublicClient.md | 3151 ++++++++++ api/@aastar/sdk/interfaces/ReputationData.md | 25 + .../sdk/interfaces/ResourceBoolCheck.md | 19 + api/@aastar/sdk/interfaces/ResourceReport.md | 60 + .../sdk/interfaces/ResourceStakeCheck.md | 31 + api/@aastar/sdk/interfaces/RoleConfig.md | 83 + api/@aastar/sdk/interfaces/RoleRequirement.md | 43 + .../sdk/interfaces/RoleValidationParams.md | 55 + api/@aastar/sdk/interfaces/ScenarioParams.md | 2668 ++++++++ .../sdk/interfaces/SponsorshipPolicy.md | 25 + .../sdk/interfaces/SuperPaymasterConfig.md | 57 + .../TokenBalanceValidationParams.md | 63 + .../sdk/interfaces/TransactionOptions.md | 24 + .../sdk/interfaces/UserClientConfig.md | 167 + .../sdk/interfaces/UserLifecycleConfig.md | 159 + api/@aastar/sdk/interfaces/UserOpGasParams.md | 41 + .../sdk/interfaces/UserOperationV07.md | 73 + .../sdk/interfaces/ValidationParams.md | 25 + .../sdk/interfaces/ValidationResult.md | 25 + api/@aastar/sdk/interfaces/WalletClient.md | 1846 ++++++ .../KMS/classes/AirAccountClient.md | 35 + .../sdk/namespaces/KMS/classes/BLSManager.md | 168 + .../sdk/namespaces/KMS/classes/CryptoUtil.md | 61 + .../namespaces/KMS/classes/ERC4337Utils.md | 137 + .../namespaces/KMS/classes/PasskeyManager.md | 104 + .../namespaces/KMS/classes/UserOpBuilder.md | 69 + .../namespaces/KMS/functions/algIdForTier.md | 19 + .../namespaces/KMS/functions/resolveTier.md | 22 + api/@aastar/sdk/namespaces/KMS/index.md | 52 + .../KMS/interfaces/AirAccountConfig.md | 54 + .../namespaces/KMS/interfaces/BLSConfig.md | 17 + .../sdk/namespaces/KMS/interfaces/BLSNode.md | 57 + .../KMS/interfaces/BLSSignatureData.md | 73 + .../interfaces/BeginAuthenticationResponse.md | 45 + .../interfaces/BeginRegistrationResponse.md | 77 + .../BeginTransactionVerificationResponse.md | 73 + .../interfaces/CumulativeT2SignatureData.md | 47 + .../interfaces/CumulativeT3SignatureData.md | 75 + .../namespaces/KMS/interfaces/GasEstimate.md | 25 + .../namespaces/KMS/interfaces/GuardStatus.md | 33 + .../KMS/interfaces/PackedUserOperation.md | 73 + .../interfaces/PasskeyAuthenticationParams.md | 9 + .../namespaces/KMS/interfaces/PasskeyInfo.md | 41 + .../interfaces/PasskeyRegistrationParams.md | 25 + .../KMS/interfaces/PasskeyRoutes.md | 78 + .../KMS/interfaces/PreCheckResult.md | 33 + .../namespaces/KMS/interfaces/TierConfig.md | 21 + .../TransactionVerificationParams.md | 25 + .../KMS/interfaces/UserOperation.md | 89 + .../sdk/namespaces/KMS/type-aliases/AlgId.md | 3 + .../namespaces/KMS/type-aliases/TierLevel.md | 3 + .../namespaces/KMS/type-aliases/YAAAConfig.md | 8 + .../sdk/namespaces/KMS/variables/ALG_BLS.md | 3 + .../KMS/variables/ALG_CUMULATIVE_T2.md | 3 + .../KMS/variables/ALG_CUMULATIVE_T3.md | 3 + .../sdk/namespaces/KMS/variables/ALG_ECDSA.md | 3 + .../sdk/namespaces/KMS/variables/ALG_P256.md | 3 + .../KMS/variables/DEFAULT_PASSKEY_ROUTES.md | 5 + .../namespaces/KMS/variables/YAAAClient.md | 8 + .../sdk/type-aliases/AccountActions.md | 135 + .../sdk/type-aliases/AccountFactoryActions.md | 45 + api/@aastar/sdk/type-aliases/AdminClient.md | 3 + api/@aastar/sdk/type-aliases/AgentActions.md | 158 + .../sdk/type-aliases/AgentRegistryActions.md | 303 + .../type-aliases/AgentSponsorshipPolicy.md | 27 + .../sdk/type-aliases/AggregatorActions.md | 517 ++ .../sdk/type-aliases/AirAccountActions.md | 525 ++ .../type-aliases/AirAccountFactoryActions.md | 228 + api/@aastar/sdk/type-aliases/AssetPolicy.md | 55 + .../sdk/type-aliases/AssetPolicyInput.md | 39 + .../sdk/type-aliases/BLSAlgorithmActions.md | 23 + api/@aastar/sdk/type-aliases/BLSG1Point.md | 37 + .../sdk/type-aliases/BatchMintResult.md | 37 + .../sdk/type-aliases/BusinessResult.md | 12 + .../sdk/type-aliases/CanonicalAddresses.md | 3 + .../sdk/type-aliases/ChannelActions.md | 279 + .../sdk/type-aliases/ChannelClientConfig.md | 35 + api/@aastar/sdk/type-aliases/ChannelConfig.md | 43 + api/@aastar/sdk/type-aliases/ChannelState.md | 67 + .../sdk/type-aliases/CommunityProfile.md | 99 + .../sdk/type-aliases/ContractCategory.md | 5 + .../sdk/type-aliases/ContractNetwork.md | 5 + api/@aastar/sdk/type-aliases/ContractScope.md | 55 + .../sdk/type-aliases/ContractScopeInput.md | 47 + api/@aastar/sdk/type-aliases/DVTActions.md | 315 + api/@aastar/sdk/type-aliases/DVTTier.md | 5 + .../sdk/type-aliases/DirectPaymentPayload.md | 61 + .../type-aliases/DryRunValidationResult.md | 23 + .../sdk/type-aliases/EIP3009Authorization.md | 53 + .../sdk/type-aliases/EOAWalletClient.md | 30 + api/@aastar/sdk/type-aliases/ERC20Actions.md | 187 + api/@aastar/sdk/type-aliases/EndUserClient.md | 118 + .../sdk/type-aliases/EntryPointActions.md | 90 + .../sdk/type-aliases/FacilitatorConfig.md | 25 + .../sdk/type-aliases/FacilitatorSupported.md | 37 + api/@aastar/sdk/type-aliases/FaucetConfig.md | 51 + .../type-aliases/FaucetPreparationResult.md | 35 + .../sdk/type-aliases/ForceExitActions.md | 22 + api/@aastar/sdk/type-aliases/GTokenActions.md | 151 + .../GTokenAuthorizationActions.md | 211 + .../type-aliases/GaslessReadinessReport.md | 55 + .../type-aliases/GaslessTransactionConfig.md | 59 + api/@aastar/sdk/type-aliases/InitConfig.md | 51 + .../sdk/type-aliases/LegacyCommunityClient.md | 44 + .../sdk/type-aliases/NetworkContracts.md | 5 + api/@aastar/sdk/type-aliases/NetworkId.md | 5 + .../sdk/type-aliases/OperatorClient.md | 117 + .../sdk/type-aliases/OperatorConfig.md | 75 + api/@aastar/sdk/type-aliases/OperatorMode.md | 12 + .../sdk/type-aliases/P256SessionState.md | 27 + .../sdk/type-aliases/PaymasterActions.md | 785 +++ .../sdk/type-aliases/PaymasterConfig.md | 43 + .../type-aliases/PaymasterFactoryActions.md | 413 ++ api/@aastar/sdk/type-aliases/PaymasterType.md | 7 + .../PaymasterV4MiddlewareConfig.md | 35 + .../sdk/type-aliases/PaymentPayload.md | 54 + .../sdk/type-aliases/PaymentRequired.md | 46 + .../sdk/type-aliases/PaymentRequirements.md | 70 + api/@aastar/sdk/type-aliases/PendingExit.md | 43 + .../sdk/type-aliases/PendingModuleInstall.md | 43 + .../sdk/type-aliases/PolicyRegistryActions.md | 428 ++ .../sdk/type-aliases/RegistryActions.md | 1300 ++++ .../sdk/type-aliases/ReputationActions.md | 735 +++ .../sdk/type-aliases/ReputationBreakdown.md | 35 + .../sdk/type-aliases/ReputationRule.md | 35 + .../sdk/type-aliases/ResolvedAPNTsToken.md | 50 + api/@aastar/sdk/type-aliases/ResourceInfo.md | 29 + .../sdk/type-aliases/RoleConfigDetailed.md | 99 + api/@aastar/sdk/type-aliases/RoleId.md | 3 + api/@aastar/sdk/type-aliases/SBTActions.md | 982 +++ api/@aastar/sdk/type-aliases/SBTData.md | 35 + api/@aastar/sdk/type-aliases/SBTMembership.md | 43 + .../SessionKeyValidatorActions.md | 127 + .../sdk/type-aliases/SettleResponse.md | 54 + api/@aastar/sdk/type-aliases/SignedVoucher.md | 9 + .../sdk/type-aliases/SimpleSmartAccount.md | 39 + api/@aastar/sdk/type-aliases/SlashRecord.md | 43 + api/@aastar/sdk/type-aliases/SpendCounter.md | 25 + .../sdk/type-aliases/StakingActions.md | 629 ++ .../sdk/type-aliases/SuperPaymasterActions.md | 1491 +++++ .../sdk/type-aliases/SupportedChainId.md | 3 + .../sdk/type-aliases/SupportedNetwork.md | 3 + api/@aastar/sdk/type-aliases/TokenActions.md | 3 + api/@aastar/sdk/type-aliases/TokenConfig.md | 27 + .../sdk/type-aliases/VerifyResponse.md | 29 + api/@aastar/sdk/type-aliases/VoucherParams.md | 19 + api/@aastar/sdk/type-aliases/X402Actions.md | 185 + .../sdk/type-aliases/X402ClientConfig.md | 73 + .../sdk/type-aliases/X402PaymentParams.md | 61 + .../sdk/type-aliases/XPNTsFactoryActions.md | 467 ++ .../sdk/type-aliases/XPNTsTokenActions.md | 893 +++ api/@aastar/sdk/variables/AASTAR_COMMUNITY.md | 8 + .../variables/AAStarAirAccountFactoryV7ABI.md | 3 + .../AAStarAirAccountFactoryV7Artifact.md | 3 + .../sdk/variables/AAStarAirAccountV7ABI.md | 3 + .../variables/AAStarAirAccountV7Artifact.md | 9 + .../sdk/variables/AAStarBLSAggregatorABI.md | 3 + .../variables/AAStarBLSAggregatorArtifact.md | 9 + .../sdk/variables/AAStarBLSAlgorithmABI.md | 3 + .../variables/AAStarBLSAlgorithmArtifact.md | 9 + .../sdk/variables/AAStarValidatorABI.md | 3 + .../sdk/variables/AAStarValidatorArtifact.md | 9 + .../AGENT_IDENTITY_REGISTRY_ADDRESS.md | 3 + .../AGENT_REPUTATION_REGISTRY_ADDRESS.md | 3 + api/@aastar/sdk/variables/ALL_ADDRESSES.md | 87 + api/@aastar/sdk/variables/ALL_ROLES.md | 5 + api/@aastar/sdk/variables/APNTS_ADDRESS.md | 3 + api/@aastar/sdk/variables/AgentRegistryABI.md | 3 + .../sdk/variables/AgentRegistryArtifact.md | 3 + .../sdk/variables/AirAccountDelegateABI.md | 3 + .../variables/AirAccountDelegateArtifact.md | 3 + .../sdk/variables/AirAccountExtensionABI.md | 3 + .../variables/AirAccountExtensionArtifact.md | 9 + api/@aastar/sdk/variables/BLSAggregatorABI.md | 3 + .../sdk/variables/BLSAggregatorArtifact.md | 13 + api/@aastar/sdk/variables/BLSHelpers.md | 147 + api/@aastar/sdk/variables/BLSValidatorABI.md | 3 + .../sdk/variables/BLSValidatorArtifact.md | 13 + .../sdk/variables/BLS_AGGREGATOR_ADDRESS.md | 3 + api/@aastar/sdk/variables/BLS_POP_DST.md | 13 + .../sdk/variables/BLS_VALIDATOR_ADDRESS.md | 3 + api/@aastar/sdk/variables/BPS_DENOMINATOR.md | 3 + api/@aastar/sdk/variables/BRANDING.md | 67 + api/@aastar/sdk/variables/BREAD_COMMUNITY.md | 8 + .../sdk/variables/CANONICAL_ADDRESSES.md | 449 ++ api/@aastar/sdk/variables/CHAIN_MAINNET.md | 3 + api/@aastar/sdk/variables/CHAIN_SEPOLIA.md | 3 + api/@aastar/sdk/variables/COMMUNITIES.md | 5 + api/@aastar/sdk/variables/COMMUNITY_OWNERS.md | 15 + api/@aastar/sdk/variables/CONTRACTS.md | 191 + .../sdk/variables/CONTRACT_METADATA.md | 67 + .../sdk/variables/CONTRACT_SRC_HASH.md | 5 + api/@aastar/sdk/variables/CORE_ADDRESSES.md | 63 + .../variables/CalldataParserRegistryABI.md | 3 + .../CalldataParserRegistryArtifact.md | 9 + api/@aastar/sdk/variables/CustomErrors.md | 17 + .../sdk/variables/DEFAULT_ADMIN_ROLE.md | 17 + .../sdk/variables/DEFAULT_APNTS_PRICE_USD.md | 3 + .../sdk/variables/DEFAULT_CALL_GAS_LIMIT.md | 3 + .../DEFAULT_GAS_TOKEN_MINT_AMOUNT.md | 3 + .../variables/DEFAULT_PRE_VERIFICATION_GAS.md | 3 + .../sdk/variables/DEFAULT_TIMEOUT_MS.md | 3 + .../sdk/variables/DEFAULT_TOKEN_NAME.md | 3 + .../sdk/variables/DEFAULT_TOKEN_SYMBOL.md | 3 + .../sdk/variables/DEFAULT_USDT_MINT_AMOUNT.md | 3 + .../DEFAULT_VERIFICATION_GAS_LIMIT.md | 3 + api/@aastar/sdk/variables/DVTValidatorABI.md | 3 + .../sdk/variables/DVTValidatorArtifact.md | 13 + api/@aastar/sdk/variables/DVT_TIER_T2.md | 5 + api/@aastar/sdk/variables/DVT_TIER_T3.md | 5 + .../sdk/variables/DVT_VALIDATOR_ADDRESS.md | 3 + api/@aastar/sdk/variables/EIP3009_TYPES.md | 17 + .../sdk/variables/ENTRY_POINT_ADDRESS.md | 3 + api/@aastar/sdk/variables/EntryPointABI.md | 3 + .../sdk/variables/EntryPointArtifact.md | 13 + api/@aastar/sdk/variables/FAUCET_API_URL.md | 5 + .../sdk/variables/ForceExitModuleABI.md | 3 + .../sdk/variables/ForceExitModuleArtifact.md | 3 + api/@aastar/sdk/variables/GTOKEN_ADDRESS.md | 3 + .../sdk/variables/GTOKEN_EIP712_DOMAIN.md | 13 + .../sdk/variables/GTOKEN_STAKING_ADDRESS.md | 3 + api/@aastar/sdk/variables/GTokenABI.md | 3 + api/@aastar/sdk/variables/GTokenArtifact.md | 13 + .../sdk/variables/GTokenAuthorizationABI.md | 3 + .../variables/GTokenAuthorizationArtifact.md | 3 + api/@aastar/sdk/variables/GTokenStakingABI.md | 3 + .../sdk/variables/GTokenStakingArtifact.md | 13 + .../sdk/variables/HEADER_PAYMENT_REQUIRED.md | 5 + .../sdk/variables/HEADER_PAYMENT_RESPONSE.md | 3 + .../sdk/variables/HEADER_PAYMENT_SIGNATURE.md | 3 + .../sdk/variables/HEADER_V1_PAYMENT.md | 5 + .../variables/HEADER_V1_PAYMENT_RESPONSE.md | 3 + .../sdk/variables/INITIAL_ROLE_STAKES.md | 13 + api/@aastar/sdk/variables/LINKS.md | 33 + api/@aastar/sdk/variables/MAX_SERVICE_FEE.md | 3 + .../MICRO_PAYMENT_CHANNEL_ADDRESS.md | 3 + .../sdk/variables/MONITORING_ADDRESSES.md | 15 + .../sdk/variables/MicroPaymentChannelABI.md | 3 + .../variables/MicroPaymentChannelArtifact.md | 13 + api/@aastar/sdk/variables/MySBTABI.md | 3 + api/@aastar/sdk/variables/MySBTArtifact.md | 13 + api/@aastar/sdk/variables/NETWORKS.md | 151 + .../sdk/variables/NODE_STAKE_AMOUNTS.md | 21 + .../sdk/variables/OFFICIAL_ADDRESSES.md | 11 + .../sdk/variables/PAYMASTER_ADDRESSES.md | 15 + .../variables/PAYMASTER_FACTORY_ADDRESS.md | 3 + .../sdk/variables/PAYMASTER_V4_ADDRESS.md | 3 + .../variables/PAYMASTER_V4_IMPL_ADDRESS.md | 3 + api/@aastar/sdk/variables/PaymasterABI.md | 3 + .../sdk/variables/PaymasterArtifact.md | 13 + .../sdk/variables/PaymasterFactoryABI.md | 3 + .../sdk/variables/PaymasterFactoryArtifact.md | 13 + .../sdk/variables/PolicyRegistryABI.md | 3 + .../sdk/variables/PolicyRegistryArtifact.md | 13 + api/@aastar/sdk/variables/REGISTRY_ADDRESS.md | 3 + .../variables/REPUTATION_SYSTEM_ADDRESS.md | 3 + api/@aastar/sdk/variables/ROLE_ANODE.md | 29 + api/@aastar/sdk/variables/ROLE_COMMUNITY.md | 29 + api/@aastar/sdk/variables/ROLE_DVT.md | 29 + api/@aastar/sdk/variables/ROLE_ENDUSER.md | 33 + api/@aastar/sdk/variables/ROLE_KMS.md | 29 + api/@aastar/sdk/variables/ROLE_NAMES.md | 3 + .../sdk/variables/ROLE_PAYMASTER_AOA.md | 29 + .../sdk/variables/ROLE_PAYMASTER_SUPER.md | 33 + .../sdk/variables/ROLE_PERMISSION_LEVELS.md | 3 + api/@aastar/sdk/variables/RegistryABI.md | 3 + api/@aastar/sdk/variables/RegistryArtifact.md | 13 + .../sdk/variables/ReputationSystemABI.md | 3 + .../sdk/variables/ReputationSystemArtifact.md | 13 + api/@aastar/sdk/variables/RoleDataFactory.md | 142 + api/@aastar/sdk/variables/RoleIds.md | 33 + api/@aastar/sdk/variables/SBT_ADDRESS.md | 3 + .../sdk/variables/SEPOLIA_CONTRACTS.md | 187 + .../sdk/variables/SEPOLIA_V2_VERSIONS.md | 67 + api/@aastar/sdk/variables/SERVICE_FEE_RATE.md | 3 + .../sdk/variables/SUPER_PAYMASTER_ADDRESS.md | 3 + .../sdk/variables/SessionKeyValidatorABI.md | 3 + .../variables/SessionKeyValidatorArtifact.md | 3 + api/@aastar/sdk/variables/SimpleAccountABI.md | 3 + .../sdk/variables/SimpleAccountArtifact.md | 13 + .../sdk/variables/SimpleAccountFactoryABI.md | 3 + .../variables/SimpleAccountFactoryArtifact.md | 13 + .../sdk/variables/SuperPaymasterABI.md | 3 + .../sdk/variables/SuperPaymasterArtifact.md | 13 + .../sdk/variables/TEST_ACCOUNT_ADDRESSES.md | 11 + .../sdk/variables/TEST_ACCOUNT_POOL_SIZE.md | 3 + api/@aastar/sdk/variables/TEST_COMMUNITIES.md | 19 + .../sdk/variables/TEST_TOKEN_ADDRESSES.md | 19 + api/@aastar/sdk/variables/TOKEN_ADDRESSES.md | 11 + api/@aastar/sdk/variables/V2_SUMMARY.md | 39 + api/@aastar/sdk/variables/VOUCHER_TYPES.md | 9 + .../sdk/variables/X402FacilitatorABI.md | 3 + .../sdk/variables/X402FacilitatorArtifact.md | 13 + .../sdk/variables/XPNTS_FACTORY_ADDRESS.md | 3 + api/@aastar/sdk/variables/xPNTsFactoryABI.md | 3 + .../sdk/variables/xPNTsFactoryArtifact.md | 13 + api/@aastar/sdk/variables/xPNTsTokenABI.md | 3 + .../sdk/variables/xPNTsTokenArtifact.md | 13 + api/@aastar/tokens/classes/FinanceClient.md | 48 +- api/@aastar/x402/classes/FacilitatorClient.md | 80 + api/@aastar/x402/classes/X402Client.md | 181 + .../x402/functions/decodePaymentPayload.md | 13 + .../x402/functions/decodePaymentRequired.md | 13 + .../x402/functions/decodeSettleResponse.md | 13 + .../x402/functions/encodePaymentPayload.md | 13 + .../x402/functions/encodePaymentRequired.md | 13 + .../x402/functions/encodeSettleResponse.md | 13 + .../x402/functions/extractPaymentRequired.md | 16 + .../x402/functions/extractSettleResponse.md | 15 + api/@aastar/x402/functions/generateNonce.md | 7 + .../x402/functions/getEIP3009Domain.md | 32 + .../x402/functions/signCancelAuthorization.md | 66 + .../signGTokenTransferWithAuthorization.md | 72 + .../functions/signReceiveWithAuthorization.md | 71 + .../signTransferWithAuthorization.md | 67 + api/@aastar/x402/index.md | 47 + .../x402/type-aliases/DirectPaymentPayload.md | 61 + .../x402/type-aliases/EIP3009Authorization.md | 53 + .../x402/type-aliases/FacilitatorConfig.md | 25 + .../x402/type-aliases/FacilitatorSupported.md | 37 + api/@aastar/x402/type-aliases/NetworkId.md | 5 + .../x402/type-aliases/PaymentPayload.md | 54 + .../x402/type-aliases/PaymentRequired.md | 46 + .../x402/type-aliases/PaymentRequirements.md | 70 + api/@aastar/x402/type-aliases/ResourceInfo.md | 29 + .../x402/type-aliases/SettleResponse.md | 54 + .../x402/type-aliases/VerifyResponse.md | 29 + .../x402/type-aliases/X402ClientConfig.md | 73 + .../x402/type-aliases/X402PaymentParams.md | 61 + api/@aastar/x402/variables/EIP3009_TYPES.md | 17 + .../x402/variables/GTOKEN_EIP712_DOMAIN.md | 13 + .../x402/variables/HEADER_PAYMENT_REQUIRED.md | 5 + .../x402/variables/HEADER_PAYMENT_RESPONSE.md | 3 + .../variables/HEADER_PAYMENT_SIGNATURE.md | 3 + .../x402/variables/HEADER_V1_PAYMENT.md | 5 + .../variables/HEADER_V1_PAYMENT_RESPONSE.md | 3 + api/_media/basic-usage.ts | 253 + api/_media/examples/basic-usage.ts | 253 + api/_media/examples/index.md | 182 + api/_media/examples/server-usage.ts | 739 +++ api/_media/index.md | 182 + api/_media/keeper.md | 107 + api/_media/server-usage.ts | 739 +++ api/index.md | 157 +- api/modules/airaccount.md | 347 ++ api/modules/sdk.md | 157 +- changelog.md | 157 +- examples/README.md | 18 - examples/index.md | 62 +- guide/deployments/verify.sepolia.contracts.md | 35 +- guide/docs/BETA-ROADMAP.md | 125 + guide/docs/Configuration_Sync.md | 2 +- guide/docs/L3_Complete_Demo_Walkthrough.md | 110 - guide/docs/M7_SDK_TODO.md | 138 + guide/docs/RELEASE-CHECKLIST.md | 53 + guide/docs/UPSTREAM-SYNC.md | 102 + guide/docs/V5.3-SDK-Development-Plan.md | 411 ++ .../airaccount-v0.17.2-beta.4-migration.md | 56 + guide/docs/contract-gaps-proposal.md | 192 + guide/docs/coverage-report.md | 96 + guide/docs/dvt-wire-format.md | 88 + guide/docs/ethers-to-viem-adapter.md | 330 + guide/docs/old-solution.md | 4 +- guide/docs/onchain-evidence.md | 262 + guide/docs/release_plan_v0.19.0-beta.md | 245 + guide/docs/yaa-requirements.md | 95 + guide/getting-started.md | 153 +- guide/installation.md | 2 +- guide/old-solution.md | 4 +- index.md | 4 +- zh/guide/old-solution.md | 4 +- zh/guide/sdk-readme.md | 4 +- 1197 files changed, 82999 insertions(+), 3363 deletions(-) create mode 100644 api/@aastar/admin/classes/ProtocolGovernance.md create mode 100644 api/@aastar/admin/index.md create mode 100644 api/@aastar/admin/interfaces/ProtocolParams.md create mode 100644 api/@aastar/airaccount.md create mode 100644 api/@aastar/airaccount/auth/hardware/functions/connectLedger.md create mode 100644 api/@aastar/airaccount/auth/hardware/functions/createYubiKeySigner.md create mode 100644 api/@aastar/airaccount/auth/hardware/index.md create mode 100644 api/@aastar/airaccount/auth/hardware/interfaces/LedgerSigner.md create mode 100644 api/@aastar/airaccount/auth/hardware/interfaces/LedgerSignerConfig.md create mode 100644 api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySigner.md create mode 100644 api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySignerConfig.md create mode 100644 api/@aastar/airaccount/auth/passkey/index.md create mode 100644 api/@aastar/airaccount/classes/AirAccountClient.md create mode 100644 api/@aastar/airaccount/classes/BLSManager.md create mode 100644 api/@aastar/airaccount/classes/CryptoUtil.md create mode 100644 api/@aastar/airaccount/classes/ERC4337Utils.md create mode 100644 api/@aastar/airaccount/classes/PasskeyManager.md create mode 100644 api/@aastar/airaccount/classes/UserOpBuilder.md create mode 100644 api/@aastar/airaccount/core/bls/index.md create mode 100644 api/@aastar/airaccount/core/erc4337/index.md create mode 100644 api/@aastar/airaccount/functions/algIdForTier.md create mode 100644 api/@aastar/airaccount/functions/resolveTier.md create mode 100644 api/@aastar/airaccount/index.md create mode 100644 api/@aastar/airaccount/interfaces/AirAccountConfig.md create mode 100644 api/@aastar/airaccount/interfaces/BLSConfig.md create mode 100644 api/@aastar/airaccount/interfaces/BLSNode.md create mode 100644 api/@aastar/airaccount/interfaces/BLSSignatureData.md create mode 100644 api/@aastar/airaccount/interfaces/BeginAuthenticationResponse.md create mode 100644 api/@aastar/airaccount/interfaces/BeginRegistrationResponse.md create mode 100644 api/@aastar/airaccount/interfaces/BeginTransactionVerificationResponse.md create mode 100644 api/@aastar/airaccount/interfaces/CumulativeT2SignatureData.md create mode 100644 api/@aastar/airaccount/interfaces/CumulativeT3SignatureData.md create mode 100644 api/@aastar/airaccount/interfaces/GasEstimate.md create mode 100644 api/@aastar/airaccount/interfaces/GuardStatus.md create mode 100644 api/@aastar/airaccount/interfaces/PackedUserOperation.md create mode 100644 api/@aastar/airaccount/interfaces/PasskeyAuthenticationParams.md create mode 100644 api/@aastar/airaccount/interfaces/PasskeyInfo.md create mode 100644 api/@aastar/airaccount/interfaces/PasskeyRegistrationParams.md create mode 100644 api/@aastar/airaccount/interfaces/PasskeyRoutes.md create mode 100644 api/@aastar/airaccount/interfaces/PreCheckResult.md create mode 100644 api/@aastar/airaccount/interfaces/TierConfig.md create mode 100644 api/@aastar/airaccount/interfaces/TransactionVerificationParams.md create mode 100644 api/@aastar/airaccount/interfaces/UserOperation.md create mode 100644 api/@aastar/airaccount/server/classes/AccountManager.md create mode 100644 api/@aastar/airaccount/server/classes/AgentRegistryService.md create mode 100644 api/@aastar/airaccount/server/classes/AirAccountServerClient.md create mode 100644 api/@aastar/airaccount/server/classes/BLSSignatureService.md create mode 100644 api/@aastar/airaccount/server/classes/ConsoleLogger.md create mode 100644 api/@aastar/airaccount/server/classes/DvtPendingConfirmationError.md create mode 100644 api/@aastar/airaccount/server/classes/EIP7702DelegateService.md create mode 100644 api/@aastar/airaccount/server/classes/ERC8004Service.md create mode 100644 api/@aastar/airaccount/server/classes/EthereumProvider.md create mode 100644 api/@aastar/airaccount/server/classes/ForceExitService.md create mode 100644 api/@aastar/airaccount/server/classes/GuardChecker.md create mode 100644 api/@aastar/airaccount/server/classes/GuardStateReader.md create mode 100644 api/@aastar/airaccount/server/classes/KmsAgentService.md create mode 100644 api/@aastar/airaccount/server/classes/KmsHttpClient.md create mode 100644 api/@aastar/airaccount/server/classes/KmsManager.md create mode 100644 api/@aastar/airaccount/server/classes/KmsMonitorService.md create mode 100644 api/@aastar/airaccount/server/classes/KmsPaymentSigner.md create mode 100644 api/@aastar/airaccount/server/classes/KmsSessionService.md create mode 100644 api/@aastar/airaccount/server/classes/KmsSigner.md create mode 100644 api/@aastar/airaccount/server/classes/LocalWalletSigner.md create mode 100644 api/@aastar/airaccount/server/classes/MemoryStorage.md create mode 100644 api/@aastar/airaccount/server/classes/ModuleManager.md create mode 100644 api/@aastar/airaccount/server/classes/P256PasskeySigner.md create mode 100644 api/@aastar/airaccount/server/classes/PaymasterManager.md create mode 100644 api/@aastar/airaccount/server/classes/PaymasterPriceStalenessError.md create mode 100644 api/@aastar/airaccount/server/classes/RecoveryService.md create mode 100644 api/@aastar/airaccount/server/classes/SessionKeyService.md create mode 100644 api/@aastar/airaccount/server/classes/SilentLogger.md create mode 100644 api/@aastar/airaccount/server/classes/TokenService.md create mode 100644 api/@aastar/airaccount/server/classes/TransferManager.md create mode 100644 api/@aastar/airaccount/server/classes/WalletManager.md create mode 100644 api/@aastar/airaccount/server/classes/WeightedSignatureService.md create mode 100644 api/@aastar/airaccount/server/enumerations/EntryPointVersion.md create mode 100644 api/@aastar/airaccount/server/functions/base64UrlDecode.md create mode 100644 api/@aastar/airaccount/server/functions/base64UrlEncode.md create mode 100644 api/@aastar/airaccount/server/functions/beginAuthenticationChallenge.md create mode 100644 api/@aastar/airaccount/server/functions/beginGrantSessionChallenge.md create mode 100644 api/@aastar/airaccount/server/functions/buildAuthenticationCredential.md create mode 100644 api/@aastar/airaccount/server/functions/buildAuthenticatorData.md create mode 100644 api/@aastar/airaccount/server/functions/buildClientDataJSON.md create mode 100644 api/@aastar/airaccount/server/functions/buildInstallModuleHash.md create mode 100644 api/@aastar/airaccount/server/functions/buildUninstallModuleHash.md create mode 100644 api/@aastar/airaccount/server/functions/computeOapdSalt.md create mode 100644 api/@aastar/airaccount/server/functions/erc8004AddressesForChain.md create mode 100644 api/@aastar/airaccount/server/functions/getOapdAddress.md create mode 100644 api/@aastar/airaccount/server/functions/getOapdAddressWithChainId.md create mode 100644 api/@aastar/airaccount/server/functions/isExecuteUserOpWrapped.md create mode 100644 api/@aastar/airaccount/server/functions/isOapdDeployed.md create mode 100644 api/@aastar/airaccount/server/functions/isPendingConfirmation.md create mode 100644 api/@aastar/airaccount/server/functions/packP256SessionSignature.md create mode 100644 api/@aastar/airaccount/server/functions/packSecp256k1SessionSignature.md create mode 100644 api/@aastar/airaccount/server/functions/runAuthenticationCeremony.md create mode 100644 api/@aastar/airaccount/server/functions/runGrantSessionCeremony.md create mode 100644 api/@aastar/airaccount/server/functions/runWebAuthnCeremony.md create mode 100644 api/@aastar/airaccount/server/functions/sepoliaV07Config.md create mode 100644 api/@aastar/airaccount/server/functions/validateConfig.md create mode 100644 api/@aastar/airaccount/server/functions/wrapExecuteUserOp.md create mode 100644 api/@aastar/airaccount/server/index.md create mode 100644 api/@aastar/airaccount/server/interfaces/AccountRecord.md create mode 100644 api/@aastar/airaccount/server/interfaces/ActiveRecovery.md create mode 100644 api/@aastar/airaccount/server/interfaces/AgentReputationSummary.md create mode 100644 api/@aastar/airaccount/server/interfaces/AgentSessionConfig.md create mode 100644 api/@aastar/airaccount/server/interfaces/AgentSessionInfo.md create mode 100644 api/@aastar/airaccount/server/interfaces/BeginCeremonyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/BindERC8004AgentWalletParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/BlsConfigRecord.md create mode 100644 api/@aastar/airaccount/server/interfaces/BuildCredentialOptions.md create mode 100644 api/@aastar/airaccount/server/interfaces/CreateAgentAccountParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/DelegateInitParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/EIP7702Authorization.md create mode 100644 api/@aastar/airaccount/server/interfaces/EntryPointConfig.md create mode 100644 api/@aastar/airaccount/server/interfaces/EntryPointVersionConfig.md create mode 100644 api/@aastar/airaccount/server/interfaces/EstimateGasParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/ExecuteTransferParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/GrantP256SessionParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/GrantSessionParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/GuardState.md create mode 100644 api/@aastar/airaccount/server/interfaces/ILogger.md create mode 100644 api/@aastar/airaccount/server/interfaces/ISignerAdapter.md create mode 100644 api/@aastar/airaccount/server/interfaces/IStorageAdapter.md create mode 100644 api/@aastar/airaccount/server/interfaces/InstallModuleParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsAttestationManifestResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsAttestationProofResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsAttestationResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsChangePasskeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsCreateKeyRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsCreateKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsDeleteKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsDeriveAddressResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsDescribeKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsEip712Domain.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsEip712FieldValue.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsEip712TypeDef.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsEthereumTransaction.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsGetPublicKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsHealthResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsHttpClientOptions.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsKeyStatusResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsListKeysResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsPaymentSignatureResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsPurgeKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsQueueStatusResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsRollbackCounterResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignAgentRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignAgentResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignGTokenAuthorizationRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignHashResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignMicropaymentVoucherRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignP256GrantSessionRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignTypedDataRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignTypedDataResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsSignX402PaymentRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsStatsResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/KmsVersionResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/LegacyPasskeyAssertion.md create mode 100644 api/@aastar/airaccount/server/interfaces/MintAgentIdentityParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/OapdConfig.md create mode 100644 api/@aastar/airaccount/server/interfaces/PasskeyAssertionContext.md create mode 100644 api/@aastar/airaccount/server/interfaces/PasskeyCeremonySigner.md create mode 100644 api/@aastar/airaccount/server/interfaces/PaymasterRecord.md create mode 100644 api/@aastar/airaccount/server/interfaces/PendingExit.md create mode 100644 api/@aastar/airaccount/server/interfaces/PendingWeightChange.md create mode 100644 api/@aastar/airaccount/server/interfaces/QueryAgentReputationParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/RunCeremonyOptions.md create mode 100644 api/@aastar/airaccount/server/interfaces/ServerConfig.md create mode 100644 api/@aastar/airaccount/server/interfaces/SessionInfo.md create mode 100644 api/@aastar/airaccount/server/interfaces/SetAgentWalletParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/SignP256UserOpRequest.md create mode 100644 api/@aastar/airaccount/server/interfaces/SignP256UserOpResponse.md create mode 100644 api/@aastar/airaccount/server/interfaces/SubmitAgentReputationParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/TokenBalance.md create mode 100644 api/@aastar/airaccount/server/interfaces/TokenGuardState.md create mode 100644 api/@aastar/airaccount/server/interfaces/TokenInfo.md create mode 100644 api/@aastar/airaccount/server/interfaces/TransferRecord.md create mode 100644 api/@aastar/airaccount/server/interfaces/TransferResult.md create mode 100644 api/@aastar/airaccount/server/interfaces/UninstallModuleParams.md create mode 100644 api/@aastar/airaccount/server/interfaces/WebAuthnAssertion.md create mode 100644 api/@aastar/airaccount/server/interfaces/WebAuthnAuthenticationCredential.md create mode 100644 api/@aastar/airaccount/server/interfaces/WeightConfig.md create mode 100644 api/@aastar/airaccount/server/type-aliases/AirAccountVersion.md create mode 100644 api/@aastar/airaccount/server/type-aliases/KmsPaymentAuth.md create mode 100644 api/@aastar/airaccount/server/type-aliases/L2Type.md create mode 100644 api/@aastar/airaccount/server/type-aliases/ModuleTypeId.md create mode 100644 api/@aastar/airaccount/server/variables/ACCOUNT_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/AGENT_SESSION_KEY_VALIDATOR_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/AIRACCOUNT_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/AIRACCOUNT_ADDRESSES.md create mode 100644 api/@aastar/airaccount/server/variables/AIRACCOUNT_FACTORY_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ADDRESS.md create mode 100644 api/@aastar/airaccount/server/variables/ALG_ID.md create mode 100644 api/@aastar/airaccount/server/variables/CALLDATA_PARSER_REGISTRY_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/DEFAULT_CREDENTIAL_ID.md create mode 100644 api/@aastar/airaccount/server/variables/DEFAULT_KMS_ENDPOINT.md create mode 100644 api/@aastar/airaccount/server/variables/DEFAULT_ORIGIN.md create mode 100644 api/@aastar/airaccount/server/variables/DEFAULT_RP_ID.md create mode 100644 api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V6.md create mode 100644 api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V7_V8.md create mode 100644 api/@aastar/airaccount/server/variables/ENTRYPOINT_ADDRESSES.md create mode 100644 api/@aastar/airaccount/server/variables/ERC20_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/ERC8004_ADDRESSES.md create mode 100644 api/@aastar/airaccount/server/variables/EXECUTE_BATCH_SELECTOR.md create mode 100644 api/@aastar/airaccount/server/variables/EXECUTE_SELECTOR.md create mode 100644 api/@aastar/airaccount/server/variables/EXECUTE_USER_OP_SELECTOR.md create mode 100644 api/@aastar/airaccount/server/variables/FACTORY_ABI_V6.md create mode 100644 api/@aastar/airaccount/server/variables/FACTORY_ABI_V7_V8.md create mode 100644 api/@aastar/airaccount/server/variables/FORCE_EXIT_MODULE_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/GLOBAL_GUARD_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/L2_TYPE.md create mode 100644 api/@aastar/airaccount/server/variables/MAX_GUARDIANS.md create mode 100644 api/@aastar/airaccount/server/variables/MODULE_TYPE.md create mode 100644 api/@aastar/airaccount/server/variables/RECOVERY_THRESHOLD.md create mode 100644 api/@aastar/airaccount/server/variables/RECOVERY_TIMELOCK_SECONDS.md create mode 100644 api/@aastar/airaccount/server/variables/SESSION_KEY_VALIDATOR_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/TIER_GUARD_HOOK_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/VALIDATOR_ABI.md create mode 100644 api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_EXPIRY_SECONDS.md create mode 100644 api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_THRESHOLD.md create mode 100644 api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_TIMELOCK_SECONDS.md create mode 100644 api/@aastar/airaccount/server/variables/YAAAServerClient.md create mode 100644 api/@aastar/airaccount/type-aliases/AlgId.md create mode 100644 api/@aastar/airaccount/type-aliases/TierLevel.md create mode 100644 api/@aastar/airaccount/type-aliases/YAAAConfig.md create mode 100644 api/@aastar/airaccount/variables/ALG_BLS.md create mode 100644 api/@aastar/airaccount/variables/ALG_CUMULATIVE_T2.md create mode 100644 api/@aastar/airaccount/variables/ALG_CUMULATIVE_T3.md create mode 100644 api/@aastar/airaccount/variables/ALG_ECDSA.md create mode 100644 api/@aastar/airaccount/variables/ALG_P256.md create mode 100644 api/@aastar/airaccount/variables/DEFAULT_PASSKEY_ROUTES.md create mode 100644 api/@aastar/airaccount/variables/YAAAClient.md delete mode 100644 api/@aastar/analytics.md delete mode 100644 api/@aastar/analytics/classes/AnalyticsClient.md delete mode 100644 api/@aastar/analytics/index.md create mode 100644 api/@aastar/channel/classes/ChannelClient.md create mode 100644 api/@aastar/channel/functions/getVoucherDomain.md create mode 100644 api/@aastar/channel/functions/signVoucher.md create mode 100644 api/@aastar/channel/index.md create mode 100644 api/@aastar/channel/type-aliases/ChannelClientConfig.md create mode 100644 api/@aastar/channel/type-aliases/ChannelConfig.md create mode 100644 api/@aastar/channel/type-aliases/ChannelState.md create mode 100644 api/@aastar/channel/type-aliases/SignedVoucher.md create mode 100644 api/@aastar/channel/type-aliases/VoucherParams.md create mode 100644 api/@aastar/channel/variables/VOUCHER_TYPES.md delete mode 100644 api/@aastar/community/classes/CommunityClient.md delete mode 100644 api/@aastar/community/index.md delete mode 100644 api/@aastar/community/interfaces/CommunityLaunchConfig.md delete mode 100644 api/@aastar/community/interfaces/CommunityStats.md delete mode 100644 api/@aastar/community/interfaces/SBTRuleConfig.md delete mode 100644 api/@aastar/community/interfaces/XPNTsIssuanceParams.md create mode 100644 api/@aastar/core/enumerations/AuthorizationState.md create mode 100644 api/@aastar/core/enumerations/PolicyDecision.md create mode 100644 api/@aastar/core/functions/agentActions.md create mode 100644 api/@aastar/core/functions/agentRegistryActions.md create mode 100644 api/@aastar/core/functions/airAccountActions.md create mode 100644 api/@aastar/core/functions/airAccountFactoryActions.md create mode 100644 api/@aastar/core/functions/blsAlgorithmActions.md create mode 100644 api/@aastar/core/functions/channelActions.md create mode 100644 api/@aastar/core/functions/createHeliosTransport.md create mode 100644 api/@aastar/core/functions/describeSupportedChains.md create mode 100644 api/@aastar/core/functions/encodeDVTAccountSignature.md create mode 100644 api/@aastar/core/functions/encodeDVTVerifierProof.md create mode 100644 api/@aastar/core/functions/encodeG2Point.md create mode 100644 api/@aastar/core/functions/forceExitActions.md create mode 100644 api/@aastar/core/functions/gTokenAuthorizationActions.md create mode 100644 api/@aastar/core/functions/getCanonicalAddresses.md create mode 100644 api/@aastar/core/functions/hashToFieldU0U1.md create mode 100644 api/@aastar/core/functions/isSupportedChainId.md create mode 100644 api/@aastar/core/functions/listSupportedChainIds.md create mode 100644 api/@aastar/core/functions/lookupAddress.md create mode 100644 api/@aastar/core/functions/policyRegistryActions.md create mode 100644 api/@aastar/core/functions/resolveEns.md create mode 100644 api/@aastar/core/functions/resolveEnsVerified.md create mode 100644 api/@aastar/core/functions/sessionKeyValidatorActions.md create mode 100644 api/@aastar/core/functions/x402Actions.md create mode 100644 api/@aastar/core/functions/x402IsNonceUsed.md create mode 100644 api/@aastar/core/functions/x402NonceKey.md create mode 100644 api/@aastar/core/interfaces/CheckResourcesOptions.md create mode 100644 api/@aastar/core/interfaces/DVTAccountSignatureParams.md create mode 100644 api/@aastar/core/interfaces/EnsOptions.md create mode 100644 api/@aastar/core/interfaces/HashToFieldU0U1.md create mode 100644 api/@aastar/core/interfaces/HeliosTransportConfig.md create mode 100644 api/@aastar/core/interfaces/ResourceBoolCheck.md create mode 100644 api/@aastar/core/interfaces/ResourceReport.md create mode 100644 api/@aastar/core/interfaces/ResourceStakeCheck.md create mode 100644 api/@aastar/core/type-aliases/AgentActions.md create mode 100644 api/@aastar/core/type-aliases/AgentRegistryActions.md create mode 100644 api/@aastar/core/type-aliases/AgentSponsorshipPolicy.md create mode 100644 api/@aastar/core/type-aliases/AirAccountActions.md create mode 100644 api/@aastar/core/type-aliases/AirAccountFactoryActions.md create mode 100644 api/@aastar/core/type-aliases/AssetPolicy.md create mode 100644 api/@aastar/core/type-aliases/AssetPolicyInput.md create mode 100644 api/@aastar/core/type-aliases/BLSAlgorithmActions.md create mode 100644 api/@aastar/core/type-aliases/BLSG1Point.md create mode 100644 api/@aastar/core/type-aliases/BatchMintResult.md create mode 100644 api/@aastar/core/type-aliases/CanonicalAddresses.md create mode 100644 api/@aastar/core/type-aliases/ChannelActions.md create mode 100644 api/@aastar/core/type-aliases/ChannelState.md create mode 100644 api/@aastar/core/type-aliases/CommunityProfile.md create mode 100644 api/@aastar/core/type-aliases/ContractScope.md create mode 100644 api/@aastar/core/type-aliases/ContractScopeInput.md create mode 100644 api/@aastar/core/type-aliases/DVTTier.md create mode 100644 api/@aastar/core/type-aliases/DryRunValidationResult.md create mode 100644 api/@aastar/core/type-aliases/ForceExitActions.md create mode 100644 api/@aastar/core/type-aliases/GTokenAuthorizationActions.md create mode 100644 api/@aastar/core/type-aliases/InitConfig.md create mode 100644 api/@aastar/core/type-aliases/OperatorMode.md create mode 100644 api/@aastar/core/type-aliases/P256SessionState.md create mode 100644 api/@aastar/core/type-aliases/PackedUserOperation.md create mode 100644 api/@aastar/core/type-aliases/PendingExit.md create mode 100644 api/@aastar/core/type-aliases/PendingModuleInstall.md create mode 100644 api/@aastar/core/type-aliases/PolicyRegistryActions.md create mode 100644 api/@aastar/core/type-aliases/ResolvedAPNTsToken.md create mode 100644 api/@aastar/core/type-aliases/SessionKeyValidatorActions.md create mode 100644 api/@aastar/core/type-aliases/SpendCounter.md create mode 100644 api/@aastar/core/type-aliases/SupportedChainId.md create mode 100644 api/@aastar/core/type-aliases/TokenConfig.md create mode 100644 api/@aastar/core/type-aliases/X402Actions.md create mode 100644 api/@aastar/core/variables/AAStarAirAccountFactoryV7ABI.md create mode 100644 api/@aastar/core/variables/AAStarAirAccountFactoryV7Artifact.md create mode 100644 api/@aastar/core/variables/AAStarAirAccountV7ABI.md create mode 100644 api/@aastar/core/variables/AAStarAirAccountV7Artifact.md create mode 100644 api/@aastar/core/variables/AAStarBLSAggregatorABI.md create mode 100644 api/@aastar/core/variables/AAStarBLSAggregatorArtifact.md create mode 100644 api/@aastar/core/variables/AAStarBLSAlgorithmABI.md create mode 100644 api/@aastar/core/variables/AAStarBLSAlgorithmArtifact.md create mode 100644 api/@aastar/core/variables/AAStarValidatorABI.md create mode 100644 api/@aastar/core/variables/AAStarValidatorArtifact.md create mode 100644 api/@aastar/core/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md create mode 100644 api/@aastar/core/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md create mode 100644 api/@aastar/core/variables/AgentRegistryABI.md create mode 100644 api/@aastar/core/variables/AgentRegistryArtifact.md create mode 100644 api/@aastar/core/variables/AirAccountDelegateABI.md create mode 100644 api/@aastar/core/variables/AirAccountDelegateArtifact.md create mode 100644 api/@aastar/core/variables/AirAccountExtensionABI.md create mode 100644 api/@aastar/core/variables/AirAccountExtensionArtifact.md create mode 100644 api/@aastar/core/variables/BLS_POP_DST.md create mode 100644 api/@aastar/core/variables/CANONICAL_ADDRESSES.md create mode 100644 api/@aastar/core/variables/CalldataParserRegistryABI.md create mode 100644 api/@aastar/core/variables/CalldataParserRegistryArtifact.md create mode 100644 api/@aastar/core/variables/DVT_TIER_T2.md create mode 100644 api/@aastar/core/variables/DVT_TIER_T3.md create mode 100644 api/@aastar/core/variables/ForceExitModuleABI.md create mode 100644 api/@aastar/core/variables/ForceExitModuleArtifact.md create mode 100644 api/@aastar/core/variables/GTokenAuthorizationABI.md create mode 100644 api/@aastar/core/variables/GTokenAuthorizationArtifact.md create mode 100644 api/@aastar/core/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md create mode 100644 api/@aastar/core/variables/MicroPaymentChannelABI.md create mode 100644 api/@aastar/core/variables/MicroPaymentChannelArtifact.md create mode 100644 api/@aastar/core/variables/PolicyRegistryABI.md create mode 100644 api/@aastar/core/variables/PolicyRegistryArtifact.md create mode 100644 api/@aastar/core/variables/SessionKeyValidatorABI.md create mode 100644 api/@aastar/core/variables/SessionKeyValidatorArtifact.md create mode 100644 api/@aastar/core/variables/X402FacilitatorABI.md create mode 100644 api/@aastar/core/variables/X402FacilitatorArtifact.md create mode 100644 api/@aastar/dapp/classes/AirAccountEIP1193Provider.md create mode 100644 api/@aastar/dapp/functions/announceAirAccount.md create mode 100644 api/@aastar/dapp/functions/watchProviders.md create mode 100644 api/@aastar/dapp/interfaces/AirAccountProviderConfig.md create mode 100644 api/@aastar/dapp/interfaces/EIP6963ProviderDetail.md create mode 100644 api/@aastar/dapp/interfaces/EIP6963ProviderInfo.md create mode 100644 api/@aastar/paymaster/classes/PaymasterManager.md create mode 100644 api/@aastar/paymaster/interfaces/BuildPaymasterDataParams.md create mode 100644 api/@aastar/paymaster/type-aliases/PaymasterType.md create mode 100644 api/@aastar/sdk/classes/BLSSigner.md create mode 100644 api/@aastar/sdk/classes/BaseClient.md create mode 100644 api/@aastar/sdk/classes/BundlerClient.md create mode 100644 api/@aastar/sdk/classes/ChannelClient.md create mode 100644 api/@aastar/sdk/classes/CommunityClient.md create mode 100644 api/@aastar/sdk/classes/ContractConfigManager.md create mode 100644 api/@aastar/sdk/classes/ExperimentClient.md create mode 100644 api/@aastar/sdk/classes/FacilitatorClient.md create mode 100644 api/@aastar/sdk/classes/FinanceClient.md create mode 100644 api/@aastar/sdk/classes/FundingManager.md create mode 100644 api/@aastar/sdk/classes/KeyManager.md create mode 100644 api/@aastar/sdk/classes/OperatorLifecycle.md create mode 100644 api/@aastar/sdk/classes/PaymasterClient.md create mode 100644 api/@aastar/sdk/classes/PaymasterManager.md create mode 100644 api/@aastar/sdk/classes/PaymasterOperator.md create mode 100644 api/@aastar/sdk/classes/PaymasterOperatorClient.md create mode 100644 api/@aastar/sdk/classes/ProtocolClient.md create mode 100644 api/@aastar/sdk/classes/ProtocolGovernance.md create mode 100644 api/@aastar/sdk/classes/ReputationClient.md create mode 100644 api/@aastar/sdk/classes/RequirementChecker.md create mode 100644 api/@aastar/sdk/classes/SepoliaFaucetAPI.md create mode 100644 api/@aastar/sdk/classes/StateValidator.md create mode 100644 api/@aastar/sdk/classes/SuperPaymasterAdminClient.md create mode 100644 api/@aastar/sdk/classes/SuperPaymasterClient.md create mode 100644 api/@aastar/sdk/classes/UserClient.md create mode 100644 api/@aastar/sdk/classes/UserLifecycle.md create mode 100644 api/@aastar/sdk/classes/UserOpClient.md create mode 100644 api/@aastar/sdk/classes/UserOpScenarioBuilder.md create mode 100644 api/@aastar/sdk/classes/UserOperationBuilder.md create mode 100644 api/@aastar/sdk/classes/X402Client.md create mode 100644 api/@aastar/sdk/enumerations/AuthorizationState.md create mode 100644 api/@aastar/sdk/enumerations/EntryPointVersion.md create mode 100644 api/@aastar/sdk/enumerations/NodeType.md create mode 100644 api/@aastar/sdk/enumerations/PolicyDecision.md create mode 100644 api/@aastar/sdk/enumerations/ProposalState.md create mode 100644 api/@aastar/sdk/enumerations/RolePermissionLevel.md create mode 100644 api/@aastar/sdk/enumerations/UserOpScenarioType.md create mode 100644 api/@aastar/sdk/functions/accountActions.md create mode 100644 api/@aastar/sdk/functions/accountFactoryActions.md create mode 100644 api/@aastar/sdk/functions/agentActions.md create mode 100644 api/@aastar/sdk/functions/agentRegistryActions.md create mode 100644 api/@aastar/sdk/functions/aggregatorActions.md create mode 100644 api/@aastar/sdk/functions/airAccountActions.md create mode 100644 api/@aastar/sdk/functions/airAccountFactoryActions.md create mode 100644 api/@aastar/sdk/functions/applyConfig.md create mode 100644 api/@aastar/sdk/functions/blsAlgorithmActions.md create mode 100644 api/@aastar/sdk/functions/buildPaymasterData.md create mode 100644 api/@aastar/sdk/functions/buildSuperPaymasterData.md create mode 100644 api/@aastar/sdk/functions/channelActions.md create mode 100644 api/@aastar/sdk/functions/checkEligibility.md create mode 100644 api/@aastar/sdk/functions/checkMySBT.md create mode 100644 api/@aastar/sdk/functions/createAAStarPublicClient.md create mode 100644 api/@aastar/sdk/functions/createAdminClient.md create mode 100644 api/@aastar/sdk/functions/createCommunityClient.md create mode 100644 api/@aastar/sdk/functions/createEOAWalletClient.md create mode 100644 api/@aastar/sdk/functions/createEndUserClient.md create mode 100644 api/@aastar/sdk/functions/createHeliosTransport.md create mode 100644 api/@aastar/sdk/functions/createOperatorClient.md create mode 100644 api/@aastar/sdk/functions/decodeContractError.md create mode 100644 api/@aastar/sdk/functions/decodePaymentPayload.md create mode 100644 api/@aastar/sdk/functions/decodePaymentRequired.md create mode 100644 api/@aastar/sdk/functions/decodeSettleResponse.md create mode 100644 api/@aastar/sdk/functions/describeSupportedChains.md create mode 100644 api/@aastar/sdk/functions/dvtActions.md create mode 100644 api/@aastar/sdk/functions/encodeDVTAccountSignature.md create mode 100644 api/@aastar/sdk/functions/encodeDVTVerifierProof.md create mode 100644 api/@aastar/sdk/functions/encodeG2Point.md create mode 100644 api/@aastar/sdk/functions/encodePaymentPayload.md create mode 100644 api/@aastar/sdk/functions/encodePaymentRequired.md create mode 100644 api/@aastar/sdk/functions/encodeSettleResponse.md create mode 100644 api/@aastar/sdk/functions/entryPointActions.md create mode 100644 api/@aastar/sdk/functions/extractPaymentRequired.md create mode 100644 api/@aastar/sdk/functions/extractSettleResponse.md create mode 100644 api/@aastar/sdk/functions/forceExitActions.md create mode 100644 api/@aastar/sdk/functions/formatUserOpV07.md create mode 100644 api/@aastar/sdk/functions/gTokenActions.md create mode 100644 api/@aastar/sdk/functions/gTokenAuthorizationActions.md create mode 100644 api/@aastar/sdk/functions/generateNonce.md create mode 100644 api/@aastar/sdk/functions/getAddressUrl.md create mode 100644 api/@aastar/sdk/functions/getAllCommunityConfigs.md create mode 100644 api/@aastar/sdk/functions/getAllV2Contracts.md create mode 100644 api/@aastar/sdk/functions/getBlockExplorer.md create mode 100644 api/@aastar/sdk/functions/getCanonicalAddresses.md create mode 100644 api/@aastar/sdk/functions/getChainId.md create mode 100644 api/@aastar/sdk/functions/getCommunities.md create mode 100644 api/@aastar/sdk/functions/getCommunity.md create mode 100644 api/@aastar/sdk/functions/getCommunityConfig.md create mode 100644 api/@aastar/sdk/functions/getContract.md create mode 100644 api/@aastar/sdk/functions/getContractNetworks.md create mode 100644 api/@aastar/sdk/functions/getContracts.md create mode 100644 api/@aastar/sdk/functions/getCoreContracts.md create mode 100644 api/@aastar/sdk/functions/getDeploymentDate.md create mode 100644 api/@aastar/sdk/functions/getEIP3009Domain.md create mode 100644 api/@aastar/sdk/functions/getEntryPoint.md create mode 100644 api/@aastar/sdk/functions/getMySBTId.md create mode 100644 api/@aastar/sdk/functions/getNetwork.md create mode 100644 api/@aastar/sdk/functions/getPaymasterV4Middleware.md create mode 100644 api/@aastar/sdk/functions/getPaymasterV4_1.md create mode 100644 api/@aastar/sdk/functions/getRoleName.md create mode 100644 api/@aastar/sdk/functions/getRpcUrl.md create mode 100644 api/@aastar/sdk/functions/getSimpleAccountFactory.md create mode 100644 api/@aastar/sdk/functions/getSuperPaymasterMiddleware.md create mode 100644 api/@aastar/sdk/functions/getSuperPaymasterV2.md create mode 100644 api/@aastar/sdk/functions/getTestAccounts.md create mode 100644 api/@aastar/sdk/functions/getTestTokenContracts.md create mode 100644 api/@aastar/sdk/functions/getTokenContracts.md create mode 100644 api/@aastar/sdk/functions/getTxUrl.md create mode 100644 api/@aastar/sdk/functions/getUserOpHash.md create mode 100644 api/@aastar/sdk/functions/getUserOpHashV07.md create mode 100644 api/@aastar/sdk/functions/getV2ContractByAddress.md create mode 100644 api/@aastar/sdk/functions/getV2ContractByName.md create mode 100644 api/@aastar/sdk/functions/getV2ContractsByDate.md create mode 100644 api/@aastar/sdk/functions/getVoucherDomain.md create mode 100644 api/@aastar/sdk/functions/hashToFieldU0U1.md create mode 100644 api/@aastar/sdk/functions/isContractNetworkSupported.md create mode 100644 api/@aastar/sdk/functions/isRegisteredCommunity.md create mode 100644 api/@aastar/sdk/functions/isSupportedChainId.md create mode 100644 api/@aastar/sdk/functions/isV2Contract.md create mode 100644 api/@aastar/sdk/functions/listSupportedChainIds.md create mode 100644 api/@aastar/sdk/functions/lookupAddress.md create mode 100644 api/@aastar/sdk/functions/packUserOpLimits.md create mode 100644 api/@aastar/sdk/functions/paymasterActions.md create mode 100644 api/@aastar/sdk/functions/paymasterFactoryActions.md create mode 100644 api/@aastar/sdk/functions/policyRegistryActions.md create mode 100644 api/@aastar/sdk/functions/registryActions.md create mode 100644 api/@aastar/sdk/functions/reputationActions.md create mode 100644 api/@aastar/sdk/functions/resolveEns.md create mode 100644 api/@aastar/sdk/functions/resolveEnsVerified.md create mode 100644 api/@aastar/sdk/functions/sbtActions.md create mode 100644 api/@aastar/sdk/functions/sessionKeyValidatorActions.md create mode 100644 api/@aastar/sdk/functions/signCancelAuthorization.md create mode 100644 api/@aastar/sdk/functions/signGTokenTransferWithAuthorization.md create mode 100644 api/@aastar/sdk/functions/signReceiveWithAuthorization.md create mode 100644 api/@aastar/sdk/functions/signTransferWithAuthorization.md create mode 100644 api/@aastar/sdk/functions/signVoucher.md create mode 100644 api/@aastar/sdk/functions/stakingActions.md create mode 100644 api/@aastar/sdk/functions/superPaymasterActions.md create mode 100644 api/@aastar/sdk/functions/toSimpleSmartAccount.md create mode 100644 api/@aastar/sdk/functions/tokenActions.md create mode 100644 api/@aastar/sdk/functions/tuneGasLimit.md create mode 100644 api/@aastar/sdk/functions/x402Actions.md create mode 100644 api/@aastar/sdk/functions/x402IsNonceUsed.md create mode 100644 api/@aastar/sdk/functions/x402NonceKey.md create mode 100644 api/@aastar/sdk/functions/xPNTsFactoryActions.md create mode 100644 api/@aastar/sdk/functions/xPNTsTokenActions.md create mode 100644 api/@aastar/sdk/interfaces/AccountBalance.md create mode 100644 api/@aastar/sdk/interfaces/BalanceValidationParams.md create mode 100644 api/@aastar/sdk/interfaces/BuildPaymasterDataParams.md create mode 100644 api/@aastar/sdk/interfaces/BundlerResponse.md create mode 100644 api/@aastar/sdk/interfaces/CheckResourcesOptions.md create mode 100644 api/@aastar/sdk/interfaces/ClientConfig.md create mode 100644 api/@aastar/sdk/interfaces/CommunityClientConfig.md create mode 100644 api/@aastar/sdk/interfaces/CommunityConfig.md create mode 100644 api/@aastar/sdk/interfaces/CommunityInfo.md create mode 100644 api/@aastar/sdk/interfaces/ContractVersion.md create mode 100644 api/@aastar/sdk/interfaces/CreateCommunityParams.md create mode 100644 api/@aastar/sdk/interfaces/DVTAccountSignatureParams.md create mode 100644 api/@aastar/sdk/interfaces/DeploymentValidationParams.md create mode 100644 api/@aastar/sdk/interfaces/EnsOptions.md create mode 100644 api/@aastar/sdk/interfaces/EnsureFundingParams.md create mode 100644 api/@aastar/sdk/interfaces/ExperimentRecord.md create mode 100644 api/@aastar/sdk/interfaces/FundETHParams.md create mode 100644 api/@aastar/sdk/interfaces/FundTokenParams.md create mode 100644 api/@aastar/sdk/interfaces/FundingParams.md create mode 100644 api/@aastar/sdk/interfaces/FundingResult.md create mode 100644 api/@aastar/sdk/interfaces/GaslessConfig.md create mode 100644 api/@aastar/sdk/interfaces/HashToFieldU0U1.md create mode 100644 api/@aastar/sdk/interfaces/HeliosTransportConfig.md create mode 100644 api/@aastar/sdk/interfaces/KeyPair.md create mode 100644 api/@aastar/sdk/interfaces/OnboardResult.md create mode 100644 api/@aastar/sdk/interfaces/OperatorClientConfig.md create mode 100644 api/@aastar/sdk/interfaces/OperatorStatus.md create mode 100644 api/@aastar/sdk/interfaces/PackedUserOperation.md create mode 100644 api/@aastar/sdk/interfaces/PaymasterGasParams.md create mode 100644 api/@aastar/sdk/interfaces/ProtocolClientConfig.md create mode 100644 api/@aastar/sdk/interfaces/ProtocolParams.md create mode 100644 api/@aastar/sdk/interfaces/PublicClient.md create mode 100644 api/@aastar/sdk/interfaces/ReputationData.md create mode 100644 api/@aastar/sdk/interfaces/ResourceBoolCheck.md create mode 100644 api/@aastar/sdk/interfaces/ResourceReport.md create mode 100644 api/@aastar/sdk/interfaces/ResourceStakeCheck.md create mode 100644 api/@aastar/sdk/interfaces/RoleConfig.md create mode 100644 api/@aastar/sdk/interfaces/RoleRequirement.md create mode 100644 api/@aastar/sdk/interfaces/RoleValidationParams.md create mode 100644 api/@aastar/sdk/interfaces/ScenarioParams.md create mode 100644 api/@aastar/sdk/interfaces/SponsorshipPolicy.md create mode 100644 api/@aastar/sdk/interfaces/SuperPaymasterConfig.md create mode 100644 api/@aastar/sdk/interfaces/TokenBalanceValidationParams.md create mode 100644 api/@aastar/sdk/interfaces/TransactionOptions.md create mode 100644 api/@aastar/sdk/interfaces/UserClientConfig.md create mode 100644 api/@aastar/sdk/interfaces/UserLifecycleConfig.md create mode 100644 api/@aastar/sdk/interfaces/UserOpGasParams.md create mode 100644 api/@aastar/sdk/interfaces/UserOperationV07.md create mode 100644 api/@aastar/sdk/interfaces/ValidationParams.md create mode 100644 api/@aastar/sdk/interfaces/ValidationResult.md create mode 100644 api/@aastar/sdk/interfaces/WalletClient.md create mode 100644 api/@aastar/sdk/namespaces/KMS/classes/AirAccountClient.md create mode 100644 api/@aastar/sdk/namespaces/KMS/classes/BLSManager.md create mode 100644 api/@aastar/sdk/namespaces/KMS/classes/CryptoUtil.md create mode 100644 api/@aastar/sdk/namespaces/KMS/classes/ERC4337Utils.md create mode 100644 api/@aastar/sdk/namespaces/KMS/classes/PasskeyManager.md create mode 100644 api/@aastar/sdk/namespaces/KMS/classes/UserOpBuilder.md create mode 100644 api/@aastar/sdk/namespaces/KMS/functions/algIdForTier.md create mode 100644 api/@aastar/sdk/namespaces/KMS/functions/resolveTier.md create mode 100644 api/@aastar/sdk/namespaces/KMS/index.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/AirAccountConfig.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/BLSConfig.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/BLSNode.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/BLSSignatureData.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/BeginAuthenticationResponse.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/BeginRegistrationResponse.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/BeginTransactionVerificationResponse.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT2SignatureData.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT3SignatureData.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/GasEstimate.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/GuardStatus.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/PackedUserOperation.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyAuthenticationParams.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyInfo.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRegistrationParams.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRoutes.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/PreCheckResult.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/TierConfig.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/TransactionVerificationParams.md create mode 100644 api/@aastar/sdk/namespaces/KMS/interfaces/UserOperation.md create mode 100644 api/@aastar/sdk/namespaces/KMS/type-aliases/AlgId.md create mode 100644 api/@aastar/sdk/namespaces/KMS/type-aliases/TierLevel.md create mode 100644 api/@aastar/sdk/namespaces/KMS/type-aliases/YAAAConfig.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/ALG_BLS.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T2.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T3.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/ALG_ECDSA.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/ALG_P256.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/DEFAULT_PASSKEY_ROUTES.md create mode 100644 api/@aastar/sdk/namespaces/KMS/variables/YAAAClient.md create mode 100644 api/@aastar/sdk/type-aliases/AccountActions.md create mode 100644 api/@aastar/sdk/type-aliases/AccountFactoryActions.md create mode 100644 api/@aastar/sdk/type-aliases/AdminClient.md create mode 100644 api/@aastar/sdk/type-aliases/AgentActions.md create mode 100644 api/@aastar/sdk/type-aliases/AgentRegistryActions.md create mode 100644 api/@aastar/sdk/type-aliases/AgentSponsorshipPolicy.md create mode 100644 api/@aastar/sdk/type-aliases/AggregatorActions.md create mode 100644 api/@aastar/sdk/type-aliases/AirAccountActions.md create mode 100644 api/@aastar/sdk/type-aliases/AirAccountFactoryActions.md create mode 100644 api/@aastar/sdk/type-aliases/AssetPolicy.md create mode 100644 api/@aastar/sdk/type-aliases/AssetPolicyInput.md create mode 100644 api/@aastar/sdk/type-aliases/BLSAlgorithmActions.md create mode 100644 api/@aastar/sdk/type-aliases/BLSG1Point.md create mode 100644 api/@aastar/sdk/type-aliases/BatchMintResult.md create mode 100644 api/@aastar/sdk/type-aliases/BusinessResult.md create mode 100644 api/@aastar/sdk/type-aliases/CanonicalAddresses.md create mode 100644 api/@aastar/sdk/type-aliases/ChannelActions.md create mode 100644 api/@aastar/sdk/type-aliases/ChannelClientConfig.md create mode 100644 api/@aastar/sdk/type-aliases/ChannelConfig.md create mode 100644 api/@aastar/sdk/type-aliases/ChannelState.md create mode 100644 api/@aastar/sdk/type-aliases/CommunityProfile.md create mode 100644 api/@aastar/sdk/type-aliases/ContractCategory.md create mode 100644 api/@aastar/sdk/type-aliases/ContractNetwork.md create mode 100644 api/@aastar/sdk/type-aliases/ContractScope.md create mode 100644 api/@aastar/sdk/type-aliases/ContractScopeInput.md create mode 100644 api/@aastar/sdk/type-aliases/DVTActions.md create mode 100644 api/@aastar/sdk/type-aliases/DVTTier.md create mode 100644 api/@aastar/sdk/type-aliases/DirectPaymentPayload.md create mode 100644 api/@aastar/sdk/type-aliases/DryRunValidationResult.md create mode 100644 api/@aastar/sdk/type-aliases/EIP3009Authorization.md create mode 100644 api/@aastar/sdk/type-aliases/EOAWalletClient.md create mode 100644 api/@aastar/sdk/type-aliases/ERC20Actions.md create mode 100644 api/@aastar/sdk/type-aliases/EndUserClient.md create mode 100644 api/@aastar/sdk/type-aliases/EntryPointActions.md create mode 100644 api/@aastar/sdk/type-aliases/FacilitatorConfig.md create mode 100644 api/@aastar/sdk/type-aliases/FacilitatorSupported.md create mode 100644 api/@aastar/sdk/type-aliases/FaucetConfig.md create mode 100644 api/@aastar/sdk/type-aliases/FaucetPreparationResult.md create mode 100644 api/@aastar/sdk/type-aliases/ForceExitActions.md create mode 100644 api/@aastar/sdk/type-aliases/GTokenActions.md create mode 100644 api/@aastar/sdk/type-aliases/GTokenAuthorizationActions.md create mode 100644 api/@aastar/sdk/type-aliases/GaslessReadinessReport.md create mode 100644 api/@aastar/sdk/type-aliases/GaslessTransactionConfig.md create mode 100644 api/@aastar/sdk/type-aliases/InitConfig.md create mode 100644 api/@aastar/sdk/type-aliases/LegacyCommunityClient.md create mode 100644 api/@aastar/sdk/type-aliases/NetworkContracts.md create mode 100644 api/@aastar/sdk/type-aliases/NetworkId.md create mode 100644 api/@aastar/sdk/type-aliases/OperatorClient.md create mode 100644 api/@aastar/sdk/type-aliases/OperatorConfig.md create mode 100644 api/@aastar/sdk/type-aliases/OperatorMode.md create mode 100644 api/@aastar/sdk/type-aliases/P256SessionState.md create mode 100644 api/@aastar/sdk/type-aliases/PaymasterActions.md create mode 100644 api/@aastar/sdk/type-aliases/PaymasterConfig.md create mode 100644 api/@aastar/sdk/type-aliases/PaymasterFactoryActions.md create mode 100644 api/@aastar/sdk/type-aliases/PaymasterType.md create mode 100644 api/@aastar/sdk/type-aliases/PaymasterV4MiddlewareConfig.md create mode 100644 api/@aastar/sdk/type-aliases/PaymentPayload.md create mode 100644 api/@aastar/sdk/type-aliases/PaymentRequired.md create mode 100644 api/@aastar/sdk/type-aliases/PaymentRequirements.md create mode 100644 api/@aastar/sdk/type-aliases/PendingExit.md create mode 100644 api/@aastar/sdk/type-aliases/PendingModuleInstall.md create mode 100644 api/@aastar/sdk/type-aliases/PolicyRegistryActions.md create mode 100644 api/@aastar/sdk/type-aliases/RegistryActions.md create mode 100644 api/@aastar/sdk/type-aliases/ReputationActions.md create mode 100644 api/@aastar/sdk/type-aliases/ReputationBreakdown.md create mode 100644 api/@aastar/sdk/type-aliases/ReputationRule.md create mode 100644 api/@aastar/sdk/type-aliases/ResolvedAPNTsToken.md create mode 100644 api/@aastar/sdk/type-aliases/ResourceInfo.md create mode 100644 api/@aastar/sdk/type-aliases/RoleConfigDetailed.md create mode 100644 api/@aastar/sdk/type-aliases/RoleId.md create mode 100644 api/@aastar/sdk/type-aliases/SBTActions.md create mode 100644 api/@aastar/sdk/type-aliases/SBTData.md create mode 100644 api/@aastar/sdk/type-aliases/SBTMembership.md create mode 100644 api/@aastar/sdk/type-aliases/SessionKeyValidatorActions.md create mode 100644 api/@aastar/sdk/type-aliases/SettleResponse.md create mode 100644 api/@aastar/sdk/type-aliases/SignedVoucher.md create mode 100644 api/@aastar/sdk/type-aliases/SimpleSmartAccount.md create mode 100644 api/@aastar/sdk/type-aliases/SlashRecord.md create mode 100644 api/@aastar/sdk/type-aliases/SpendCounter.md create mode 100644 api/@aastar/sdk/type-aliases/StakingActions.md create mode 100644 api/@aastar/sdk/type-aliases/SuperPaymasterActions.md create mode 100644 api/@aastar/sdk/type-aliases/SupportedChainId.md create mode 100644 api/@aastar/sdk/type-aliases/SupportedNetwork.md create mode 100644 api/@aastar/sdk/type-aliases/TokenActions.md create mode 100644 api/@aastar/sdk/type-aliases/TokenConfig.md create mode 100644 api/@aastar/sdk/type-aliases/VerifyResponse.md create mode 100644 api/@aastar/sdk/type-aliases/VoucherParams.md create mode 100644 api/@aastar/sdk/type-aliases/X402Actions.md create mode 100644 api/@aastar/sdk/type-aliases/X402ClientConfig.md create mode 100644 api/@aastar/sdk/type-aliases/X402PaymentParams.md create mode 100644 api/@aastar/sdk/type-aliases/XPNTsFactoryActions.md create mode 100644 api/@aastar/sdk/type-aliases/XPNTsTokenActions.md create mode 100644 api/@aastar/sdk/variables/AASTAR_COMMUNITY.md create mode 100644 api/@aastar/sdk/variables/AAStarAirAccountFactoryV7ABI.md create mode 100644 api/@aastar/sdk/variables/AAStarAirAccountFactoryV7Artifact.md create mode 100644 api/@aastar/sdk/variables/AAStarAirAccountV7ABI.md create mode 100644 api/@aastar/sdk/variables/AAStarAirAccountV7Artifact.md create mode 100644 api/@aastar/sdk/variables/AAStarBLSAggregatorABI.md create mode 100644 api/@aastar/sdk/variables/AAStarBLSAggregatorArtifact.md create mode 100644 api/@aastar/sdk/variables/AAStarBLSAlgorithmABI.md create mode 100644 api/@aastar/sdk/variables/AAStarBLSAlgorithmArtifact.md create mode 100644 api/@aastar/sdk/variables/AAStarValidatorABI.md create mode 100644 api/@aastar/sdk/variables/AAStarValidatorArtifact.md create mode 100644 api/@aastar/sdk/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/ALL_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/ALL_ROLES.md create mode 100644 api/@aastar/sdk/variables/APNTS_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/AgentRegistryABI.md create mode 100644 api/@aastar/sdk/variables/AgentRegistryArtifact.md create mode 100644 api/@aastar/sdk/variables/AirAccountDelegateABI.md create mode 100644 api/@aastar/sdk/variables/AirAccountDelegateArtifact.md create mode 100644 api/@aastar/sdk/variables/AirAccountExtensionABI.md create mode 100644 api/@aastar/sdk/variables/AirAccountExtensionArtifact.md create mode 100644 api/@aastar/sdk/variables/BLSAggregatorABI.md create mode 100644 api/@aastar/sdk/variables/BLSAggregatorArtifact.md create mode 100644 api/@aastar/sdk/variables/BLSHelpers.md create mode 100644 api/@aastar/sdk/variables/BLSValidatorABI.md create mode 100644 api/@aastar/sdk/variables/BLSValidatorArtifact.md create mode 100644 api/@aastar/sdk/variables/BLS_AGGREGATOR_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/BLS_POP_DST.md create mode 100644 api/@aastar/sdk/variables/BLS_VALIDATOR_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/BPS_DENOMINATOR.md create mode 100644 api/@aastar/sdk/variables/BRANDING.md create mode 100644 api/@aastar/sdk/variables/BREAD_COMMUNITY.md create mode 100644 api/@aastar/sdk/variables/CANONICAL_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/CHAIN_MAINNET.md create mode 100644 api/@aastar/sdk/variables/CHAIN_SEPOLIA.md create mode 100644 api/@aastar/sdk/variables/COMMUNITIES.md create mode 100644 api/@aastar/sdk/variables/COMMUNITY_OWNERS.md create mode 100644 api/@aastar/sdk/variables/CONTRACTS.md create mode 100644 api/@aastar/sdk/variables/CONTRACT_METADATA.md create mode 100644 api/@aastar/sdk/variables/CONTRACT_SRC_HASH.md create mode 100644 api/@aastar/sdk/variables/CORE_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/CalldataParserRegistryABI.md create mode 100644 api/@aastar/sdk/variables/CalldataParserRegistryArtifact.md create mode 100644 api/@aastar/sdk/variables/CustomErrors.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_ADMIN_ROLE.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_APNTS_PRICE_USD.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_CALL_GAS_LIMIT.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_PRE_VERIFICATION_GAS.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_TIMEOUT_MS.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_TOKEN_NAME.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_TOKEN_SYMBOL.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_USDT_MINT_AMOUNT.md create mode 100644 api/@aastar/sdk/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md create mode 100644 api/@aastar/sdk/variables/DVTValidatorABI.md create mode 100644 api/@aastar/sdk/variables/DVTValidatorArtifact.md create mode 100644 api/@aastar/sdk/variables/DVT_TIER_T2.md create mode 100644 api/@aastar/sdk/variables/DVT_TIER_T3.md create mode 100644 api/@aastar/sdk/variables/DVT_VALIDATOR_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/EIP3009_TYPES.md create mode 100644 api/@aastar/sdk/variables/ENTRY_POINT_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/EntryPointABI.md create mode 100644 api/@aastar/sdk/variables/EntryPointArtifact.md create mode 100644 api/@aastar/sdk/variables/FAUCET_API_URL.md create mode 100644 api/@aastar/sdk/variables/ForceExitModuleABI.md create mode 100644 api/@aastar/sdk/variables/ForceExitModuleArtifact.md create mode 100644 api/@aastar/sdk/variables/GTOKEN_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/GTOKEN_EIP712_DOMAIN.md create mode 100644 api/@aastar/sdk/variables/GTOKEN_STAKING_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/GTokenABI.md create mode 100644 api/@aastar/sdk/variables/GTokenArtifact.md create mode 100644 api/@aastar/sdk/variables/GTokenAuthorizationABI.md create mode 100644 api/@aastar/sdk/variables/GTokenAuthorizationArtifact.md create mode 100644 api/@aastar/sdk/variables/GTokenStakingABI.md create mode 100644 api/@aastar/sdk/variables/GTokenStakingArtifact.md create mode 100644 api/@aastar/sdk/variables/HEADER_PAYMENT_REQUIRED.md create mode 100644 api/@aastar/sdk/variables/HEADER_PAYMENT_RESPONSE.md create mode 100644 api/@aastar/sdk/variables/HEADER_PAYMENT_SIGNATURE.md create mode 100644 api/@aastar/sdk/variables/HEADER_V1_PAYMENT.md create mode 100644 api/@aastar/sdk/variables/HEADER_V1_PAYMENT_RESPONSE.md create mode 100644 api/@aastar/sdk/variables/INITIAL_ROLE_STAKES.md create mode 100644 api/@aastar/sdk/variables/LINKS.md create mode 100644 api/@aastar/sdk/variables/MAX_SERVICE_FEE.md create mode 100644 api/@aastar/sdk/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/MONITORING_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/MicroPaymentChannelABI.md create mode 100644 api/@aastar/sdk/variables/MicroPaymentChannelArtifact.md create mode 100644 api/@aastar/sdk/variables/MySBTABI.md create mode 100644 api/@aastar/sdk/variables/MySBTArtifact.md create mode 100644 api/@aastar/sdk/variables/NETWORKS.md create mode 100644 api/@aastar/sdk/variables/NODE_STAKE_AMOUNTS.md create mode 100644 api/@aastar/sdk/variables/OFFICIAL_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/PAYMASTER_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/PAYMASTER_FACTORY_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/PAYMASTER_V4_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/PAYMASTER_V4_IMPL_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/PaymasterABI.md create mode 100644 api/@aastar/sdk/variables/PaymasterArtifact.md create mode 100644 api/@aastar/sdk/variables/PaymasterFactoryABI.md create mode 100644 api/@aastar/sdk/variables/PaymasterFactoryArtifact.md create mode 100644 api/@aastar/sdk/variables/PolicyRegistryABI.md create mode 100644 api/@aastar/sdk/variables/PolicyRegistryArtifact.md create mode 100644 api/@aastar/sdk/variables/REGISTRY_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/REPUTATION_SYSTEM_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/ROLE_ANODE.md create mode 100644 api/@aastar/sdk/variables/ROLE_COMMUNITY.md create mode 100644 api/@aastar/sdk/variables/ROLE_DVT.md create mode 100644 api/@aastar/sdk/variables/ROLE_ENDUSER.md create mode 100644 api/@aastar/sdk/variables/ROLE_KMS.md create mode 100644 api/@aastar/sdk/variables/ROLE_NAMES.md create mode 100644 api/@aastar/sdk/variables/ROLE_PAYMASTER_AOA.md create mode 100644 api/@aastar/sdk/variables/ROLE_PAYMASTER_SUPER.md create mode 100644 api/@aastar/sdk/variables/ROLE_PERMISSION_LEVELS.md create mode 100644 api/@aastar/sdk/variables/RegistryABI.md create mode 100644 api/@aastar/sdk/variables/RegistryArtifact.md create mode 100644 api/@aastar/sdk/variables/ReputationSystemABI.md create mode 100644 api/@aastar/sdk/variables/ReputationSystemArtifact.md create mode 100644 api/@aastar/sdk/variables/RoleDataFactory.md create mode 100644 api/@aastar/sdk/variables/RoleIds.md create mode 100644 api/@aastar/sdk/variables/SBT_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/SEPOLIA_CONTRACTS.md create mode 100644 api/@aastar/sdk/variables/SEPOLIA_V2_VERSIONS.md create mode 100644 api/@aastar/sdk/variables/SERVICE_FEE_RATE.md create mode 100644 api/@aastar/sdk/variables/SUPER_PAYMASTER_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/SessionKeyValidatorABI.md create mode 100644 api/@aastar/sdk/variables/SessionKeyValidatorArtifact.md create mode 100644 api/@aastar/sdk/variables/SimpleAccountABI.md create mode 100644 api/@aastar/sdk/variables/SimpleAccountArtifact.md create mode 100644 api/@aastar/sdk/variables/SimpleAccountFactoryABI.md create mode 100644 api/@aastar/sdk/variables/SimpleAccountFactoryArtifact.md create mode 100644 api/@aastar/sdk/variables/SuperPaymasterABI.md create mode 100644 api/@aastar/sdk/variables/SuperPaymasterArtifact.md create mode 100644 api/@aastar/sdk/variables/TEST_ACCOUNT_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/TEST_ACCOUNT_POOL_SIZE.md create mode 100644 api/@aastar/sdk/variables/TEST_COMMUNITIES.md create mode 100644 api/@aastar/sdk/variables/TEST_TOKEN_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/TOKEN_ADDRESSES.md create mode 100644 api/@aastar/sdk/variables/V2_SUMMARY.md create mode 100644 api/@aastar/sdk/variables/VOUCHER_TYPES.md create mode 100644 api/@aastar/sdk/variables/X402FacilitatorABI.md create mode 100644 api/@aastar/sdk/variables/X402FacilitatorArtifact.md create mode 100644 api/@aastar/sdk/variables/XPNTS_FACTORY_ADDRESS.md create mode 100644 api/@aastar/sdk/variables/xPNTsFactoryABI.md create mode 100644 api/@aastar/sdk/variables/xPNTsFactoryArtifact.md create mode 100644 api/@aastar/sdk/variables/xPNTsTokenABI.md create mode 100644 api/@aastar/sdk/variables/xPNTsTokenArtifact.md create mode 100644 api/@aastar/x402/classes/FacilitatorClient.md create mode 100644 api/@aastar/x402/classes/X402Client.md create mode 100644 api/@aastar/x402/functions/decodePaymentPayload.md create mode 100644 api/@aastar/x402/functions/decodePaymentRequired.md create mode 100644 api/@aastar/x402/functions/decodeSettleResponse.md create mode 100644 api/@aastar/x402/functions/encodePaymentPayload.md create mode 100644 api/@aastar/x402/functions/encodePaymentRequired.md create mode 100644 api/@aastar/x402/functions/encodeSettleResponse.md create mode 100644 api/@aastar/x402/functions/extractPaymentRequired.md create mode 100644 api/@aastar/x402/functions/extractSettleResponse.md create mode 100644 api/@aastar/x402/functions/generateNonce.md create mode 100644 api/@aastar/x402/functions/getEIP3009Domain.md create mode 100644 api/@aastar/x402/functions/signCancelAuthorization.md create mode 100644 api/@aastar/x402/functions/signGTokenTransferWithAuthorization.md create mode 100644 api/@aastar/x402/functions/signReceiveWithAuthorization.md create mode 100644 api/@aastar/x402/functions/signTransferWithAuthorization.md create mode 100644 api/@aastar/x402/index.md create mode 100644 api/@aastar/x402/type-aliases/DirectPaymentPayload.md create mode 100644 api/@aastar/x402/type-aliases/EIP3009Authorization.md create mode 100644 api/@aastar/x402/type-aliases/FacilitatorConfig.md create mode 100644 api/@aastar/x402/type-aliases/FacilitatorSupported.md create mode 100644 api/@aastar/x402/type-aliases/NetworkId.md create mode 100644 api/@aastar/x402/type-aliases/PaymentPayload.md create mode 100644 api/@aastar/x402/type-aliases/PaymentRequired.md create mode 100644 api/@aastar/x402/type-aliases/PaymentRequirements.md create mode 100644 api/@aastar/x402/type-aliases/ResourceInfo.md create mode 100644 api/@aastar/x402/type-aliases/SettleResponse.md create mode 100644 api/@aastar/x402/type-aliases/VerifyResponse.md create mode 100644 api/@aastar/x402/type-aliases/X402ClientConfig.md create mode 100644 api/@aastar/x402/type-aliases/X402PaymentParams.md create mode 100644 api/@aastar/x402/variables/EIP3009_TYPES.md create mode 100644 api/@aastar/x402/variables/GTOKEN_EIP712_DOMAIN.md create mode 100644 api/@aastar/x402/variables/HEADER_PAYMENT_REQUIRED.md create mode 100644 api/@aastar/x402/variables/HEADER_PAYMENT_RESPONSE.md create mode 100644 api/@aastar/x402/variables/HEADER_PAYMENT_SIGNATURE.md create mode 100644 api/@aastar/x402/variables/HEADER_V1_PAYMENT.md create mode 100644 api/@aastar/x402/variables/HEADER_V1_PAYMENT_RESPONSE.md create mode 100644 api/_media/basic-usage.ts create mode 100644 api/_media/examples/basic-usage.ts create mode 100644 api/_media/examples/index.md create mode 100644 api/_media/examples/server-usage.ts create mode 100644 api/_media/index.md create mode 100644 api/_media/keeper.md create mode 100644 api/_media/server-usage.ts create mode 100644 api/modules/airaccount.md delete mode 100644 examples/README.md create mode 100644 guide/docs/BETA-ROADMAP.md delete mode 100644 guide/docs/L3_Complete_Demo_Walkthrough.md create mode 100644 guide/docs/M7_SDK_TODO.md create mode 100644 guide/docs/RELEASE-CHECKLIST.md create mode 100644 guide/docs/UPSTREAM-SYNC.md create mode 100644 guide/docs/V5.3-SDK-Development-Plan.md create mode 100644 guide/docs/airaccount-v0.17.2-beta.4-migration.md create mode 100644 guide/docs/contract-gaps-proposal.md create mode 100644 guide/docs/coverage-report.md create mode 100644 guide/docs/dvt-wire-format.md create mode 100644 guide/docs/ethers-to-viem-adapter.md create mode 100644 guide/docs/onchain-evidence.md create mode 100644 guide/docs/release_plan_v0.19.0-beta.md create mode 100644 guide/docs/yaa-requirements.md diff --git a/.vitepress/config.ts b/.vitepress/config.ts index a8001a3f1..139b20042 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -71,7 +71,7 @@ const guideSidebar: DefaultTheme.SidebarItem[] = [ text: 'Lifecycle API (L3)', items: [ { text: 'Developer Guide', link: '/guide/docs/L3_Lifecycle_Developer_Guide' }, - { text: 'Complete Demo Walkthrough', link: '/guide/docs/L3_Complete_Demo_Walkthrough' }, + { text: 'Use Case Analysis', link: '/guide/docs/L3_Use_Case_Analysis' }, { text: 'Patterns Design', link: '/guide/docs/L3_Lifecycle_Patterns_Design' } ] } @@ -107,6 +107,52 @@ const zhGuideSidebar: DefaultTheme.SidebarItem[] = [ ] const apiSidebar: DefaultTheme.SidebarItem[] = [ + { + text: 'Getting Started', + items: [ + { text: 'Overview', link: '/api/' }, + { text: 'Installation', link: '/api/@aastar/sdk#installation' }, + { text: 'Quick Start', link: '/api/@aastar/sdk#usage' } + ] + }, + { + text: '@aastar/sdk (Meta Package)', + items: [ + { text: 'Overview', link: '/api/@aastar/sdk' }, + { text: 'Node.js Tools', link: '/api/@aastar/sdk/node' } + ] + }, + { + text: 'Core Modules', + collapsed: false, + items: [ + { text: '@aastar/core', link: '/api/@aastar/core' }, + { text: '@aastar/account', link: '/api/@aastar/account' }, + { text: '@aastar/paymaster', link: '/api/@aastar/paymaster' }, + { text: '@aastar/enduser', link: '/api/@aastar/enduser' }, + { text: '@aastar/operator', link: '/api/@aastar/operator' }, + { text: '@aastar/admin', link: '/api/@aastar/admin' }, + { text: '@aastar/dapp', link: '/api/@aastar/dapp' }, + { text: '@aastar/tokens', link: '/api/@aastar/tokens' }, + { text: '@aastar/identity', link: '/api/@aastar/identity' }, + { text: '@aastar/airaccount', link: '/api/@aastar/airaccount' }, + { text: '@aastar/channel', link: '/api/@aastar/channel' }, + { text: '@aastar/x402', link: '/api/@aastar/x402' } + ] + }, + { + text: 'Examples', + items: [ + { text: 'SDK Handbooks', link: '/api/@aastar/sdk#core-scenarios' } + ] + } +] + +// Frozen API sidebar for the archived v0.16.23 snapshot. v0.16.23 predates the +// single-package consolidation, so it still exposes @aastar/community and +// @aastar/analytics and lacks admin/airaccount/channel/x402. Kept separate so +// updating the latest apiSidebar above never rewrites the frozen archive. +const apiSidebarArchived: DefaultTheme.SidebarItem[] = [ { text: 'Getting Started', items: [ @@ -154,7 +200,7 @@ const examplesSidebar: DefaultTheme.SidebarItem[] = [ { text: 'Operator Flow', link: '/examples/operator-flow' }, { text: 'Community Flow', link: '/examples/community-flow' }, { text: 'End User Flow', link: '/examples/enduser-flow' }, - { text: 'L3 Complete Lifecycle', link: '/guide/docs/L3_Complete_Demo_Walkthrough' }, + { text: 'L3 Lifecycle Developer Guide', link: '/guide/docs/L3_Lifecycle_Developer_Guide' }, { text: 'Multi-Chain Setup', link: '/examples/multi-chain' } ] } @@ -228,9 +274,9 @@ export default defineConfig({ { text: 'Deployments', link: '/guide/deployments/' }, { text: 'History', link: '/changelog' }, { - text: 'v0.20.x (latest)', + text: 'v0.20.8 (latest)', items: [ - { text: 'v0.20.x (latest)', link: '/' }, + { text: 'v0.20.8 (latest)', link: '/' }, { text: 'v0.16.23', link: '/0.16.23/' } ] } @@ -245,7 +291,7 @@ export default defineConfig({ // Mirrored sidebars for the frozen archived version (v0.16.23). // Links are auto-prefixed with the version path via prefixSidebar(). '/0.16.23/guide/': prefixSidebar(guideSidebar, ARCHIVED_VERSION), - '/0.16.23/api/': prefixSidebar(apiSidebar, ARCHIVED_VERSION), + '/0.16.23/api/': prefixSidebar(apiSidebarArchived, ARCHIVED_VERSION), '/0.16.23/examples/': prefixSidebar(examplesSidebar, ARCHIVED_VERSION), '/0.16.23/zh/guide/': prefixSidebar(zhGuideSidebar, ARCHIVED_VERSION) }, diff --git a/api/@aastar/account/classes/UserOpClient.md b/api/@aastar/account/classes/UserOpClient.md index 72f6c0bdc..48318bf45 100644 --- a/api/@aastar/account/classes/UserOpClient.md +++ b/api/@aastar/account/classes/UserOpClient.md @@ -1,4 +1,4 @@ -Defined in: [packages/account/src/index.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/index.ts#L40) +Defined in: [packages/account/src/index.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L40) UserOperation Client for handling high-level flows @@ -18,7 +18,7 @@ UserOperation Client for handling high-level flows > `static` **estimateGas**(`bundler`, `op`, `entryPoint`): `Promise`\<`any`\> -Defined in: [packages/account/src/index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/index.ts#L41) +Defined in: [packages/account/src/index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L41) #### Parameters @@ -38,7 +38,7 @@ Defined in: [packages/account/src/index.ts:41](https://github.com/AAStarCommunit > `static` **getReceipt**(`bundler`, `hash`): `Promise`\<`any`\> -Defined in: [packages/account/src/index.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/index.ts#L55) +Defined in: [packages/account/src/index.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L55) #### Parameters @@ -57,7 +57,7 @@ Defined in: [packages/account/src/index.ts:55](https://github.com/AAStarCommunit > `static` **sendUserOp**(`bundler`, `op`, `entryPoint`): `Promise`\<`any`\> -Defined in: [packages/account/src/index.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/index.ts#L48) +Defined in: [packages/account/src/index.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L48) #### Parameters diff --git a/api/@aastar/account/functions/createEOAWalletClient.md b/api/@aastar/account/functions/createEOAWalletClient.md index e24a5ffca..8e423f8f8 100644 --- a/api/@aastar/account/functions/createEOAWalletClient.md +++ b/api/@aastar/account/functions/createEOAWalletClient.md @@ -1,6 +1,6 @@ > **createEOAWalletClient**(`privateKey`, `chain`, `transport`): [`EOAWalletClient`](../type-aliases/EOAWalletClient.md) -Defined in: [packages/account/src/eoa.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/eoa.ts#L9) +Defined in: [packages/account/src/eoa.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/eoa.ts#L9) ## Parameters diff --git a/api/@aastar/account/functions/getUserOpHash.md b/api/@aastar/account/functions/getUserOpHash.md index 81f365080..797827cc9 100644 --- a/api/@aastar/account/functions/getUserOpHash.md +++ b/api/@aastar/account/functions/getUserOpHash.md @@ -1,6 +1,6 @@ > **getUserOpHash**(`op`, `ep`, `chainId`): `` `0x${string}` `` -Defined in: [packages/account/src/index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/index.ts#L16) +Defined in: [packages/account/src/index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L16) Local implementation of EntryPoint v0.7 getUserOpHash diff --git a/api/@aastar/account/functions/packUserOpLimits.md b/api/@aastar/account/functions/packUserOpLimits.md index 6eaebb705..b230360e1 100644 --- a/api/@aastar/account/functions/packUserOpLimits.md +++ b/api/@aastar/account/functions/packUserOpLimits.md @@ -1,6 +1,6 @@ > **packUserOpLimits**(`high`, `low`): `` `0x${string}` `` -Defined in: [packages/account/src/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/index.ts#L9) +Defined in: [packages/account/src/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L9) Common Pack Logic for v0.7 UserOperations diff --git a/api/@aastar/account/functions/toSimpleSmartAccount.md b/api/@aastar/account/functions/toSimpleSmartAccount.md index 12b0e50a7..e11c24376 100644 --- a/api/@aastar/account/functions/toSimpleSmartAccount.md +++ b/api/@aastar/account/functions/toSimpleSmartAccount.md @@ -1,6 +1,6 @@ > **toSimpleSmartAccount**(`parameters`): `Promise`\<[`SimpleSmartAccount`](../type-aliases/SimpleSmartAccount.md)\> -Defined in: [packages/account/src/accounts/simple.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/accounts/simple.ts#L22) +Defined in: [packages/account/src/accounts/simple.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/accounts/simple.ts#L22) ## Parameters diff --git a/api/@aastar/account/type-aliases/EOAWalletClient.md b/api/@aastar/account/type-aliases/EOAWalletClient.md index 2ae0243f2..ee31fa105 100644 --- a/api/@aastar/account/type-aliases/EOAWalletClient.md +++ b/api/@aastar/account/type-aliases/EOAWalletClient.md @@ -1,6 +1,6 @@ > **EOAWalletClient** = [`WalletClient`](https://viem.sh/docs/index.html) & `object` -Defined in: [packages/account/src/eoa.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/eoa.ts#L4) +Defined in: [packages/account/src/eoa.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/eoa.ts#L4) ## Type Declaration diff --git a/api/@aastar/account/type-aliases/SimpleSmartAccount.md b/api/@aastar/account/type-aliases/SimpleSmartAccount.md index 2630ebf8e..ff152ac3f 100644 --- a/api/@aastar/account/type-aliases/SimpleSmartAccount.md +++ b/api/@aastar/account/type-aliases/SimpleSmartAccount.md @@ -1,6 +1,6 @@ > **SimpleSmartAccount** = [`LocalAccount`](https://viem.sh/docs/index.html) & `object` -Defined in: [packages/account/src/accounts/simple.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/account/src/accounts/simple.ts#L15) +Defined in: [packages/account/src/accounts/simple.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/accounts/simple.ts#L15) ## Type Declaration diff --git a/api/@aastar/admin/classes/ProtocolGovernance.md b/api/@aastar/admin/classes/ProtocolGovernance.md new file mode 100644 index 000000000..17fe0528a --- /dev/null +++ b/api/@aastar/admin/classes/ProtocolGovernance.md @@ -0,0 +1,380 @@ +Defined in: [admin/src/ProtocolGovernance.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L20) + +ProtocolGovernance - L3 Pattern + +Responsibilities: +1. Global Protocol Parameter Management (Registry, EntryPoint) +2. High-level Governance Operations (DAO Transfer, Upgrades) +3. SuperPaymaster & Module Approval + +## Extends + +- [`BaseClient`](../../sdk/classes/BaseClient.md) + +## Constructors + +### Constructor + +> **new ProtocolGovernance**(`config`): `ProtocolGovernance` + +Defined in: [admin/src/ProtocolGovernance.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L24) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ClientConfig`](../../sdk/interfaces/ClientConfig.md) & `object` | + +#### Returns + +`ProtocolGovernance` + +#### Overrides + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`constructor`](../../sdk/classes/BaseClient.md#constructor) + +## Properties + +### client + +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) + +Defined in: core/dist/clients/BaseClient.d.ts:5 + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`client`](../../sdk/classes/BaseClient.md#client) + +*** + +### entryPointAddress + +> **entryPointAddress**: `` `0x${string}` `` + +Defined in: [admin/src/ProtocolGovernance.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L22) + +#### Overrides + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`entryPointAddress`](../../sdk/classes/BaseClient.md#entrypointaddress) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:8 + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenAddress`](../../sdk/classes/BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:9 + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenStakingAddress`](../../sdk/classes/BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:10 + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`paymasterFactoryAddress`](../../sdk/classes/BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) + +Defined in: core/dist/clients/BaseClient.d.ts:6 + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`publicClient`](../../sdk/classes/BaseClient.md#publicclient) + +*** + +### registryAddress + +> **registryAddress**: `` `0x${string}` `` + +Defined in: [admin/src/ProtocolGovernance.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L21) + +#### Overrides + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`registryAddress`](../../sdk/classes/BaseClient.md#registryaddress) + +## Methods + +### configureRole() + +> **configureRole**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [admin/src/ProtocolGovernance.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L95) + +Configure a Role's parameters (Admin only). +Reads the current on-chain config first, then merges the provided overrides +and writes back the full struct via configureRole. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `exitFeePercent?`: `bigint`; `minExitFee?`: `bigint`; `minStake?`: `bigint`; `roleId`: `` `0x${string}` ``; `ticketPrice?`: `bigint`; \} | +| `params.exitFeePercent?` | `bigint` | +| `params.minExitFee?` | `bigint` | +| `params.minStake?` | `bigint` | +| `params.roleId?` | `` `0x${string}` `` | +| `params.ticketPrice?` | `bigint` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:16 + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getAddress`](../../sdk/classes/BaseClient.md#getaddress) + +*** + +### getProtocolParams() + +> **getProtocolParams**(): `Promise`\<[`ProtocolParams`](../interfaces/ProtocolParams.md)\> + +Defined in: [admin/src/ProtocolGovernance.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L137) + +#### Returns + +`Promise`\<[`ProtocolParams`](../interfaces/ProtocolParams.md)\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) + +Defined in: core/dist/clients/BaseClient.d.ts:20 + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getStartPublicClient`](../../sdk/classes/BaseClient.md#getstartpublicclient) + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:25 + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireEntryPoint`](../../sdk/classes/BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:22 + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGToken`](../../sdk/classes/BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:23 + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGTokenStaking`](../../sdk/classes/BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:24 + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requirePaymasterFactory`](../../sdk/classes/BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: core/dist/clients/BaseClient.d.ts:21 + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireRegistry`](../../sdk/classes/BaseClient.md#requireregistry) + +*** + +### setStaking() + +> **setStaking**(`staking`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [admin/src/ProtocolGovernance.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L82) + +Set the Staking contract address + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `staking` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setSuperPaymaster() + +> **setSuperPaymaster**(`paymaster`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [admin/src/ProtocolGovernance.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L71) + +Approve a new SuperPaymaster contract address + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymaster` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setTreasury() + +> **setTreasury**(`treasury`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [admin/src/ProtocolGovernance.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L40) + +Update the Global Treasury Address where protocol fees are collected + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `treasury` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### transferToDAO() + +> **transferToDAO**(`daoAddress`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [admin/src/ProtocolGovernance.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L125) + +Transfer Protocol Ownership to a DAO (Multisig/Timelock) +This is the final step of "Protocol Admin" lifecycle. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `daoAddress` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### updateEntryPoint() + +> **updateEntryPoint**(`entryPoint`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [admin/src/ProtocolGovernance.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L57) + +Update the supported EntryPoint address + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `entryPoint` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/admin/index.md b/api/@aastar/admin/index.md new file mode 100644 index 000000000..dc4ee3a76 --- /dev/null +++ b/api/@aastar/admin/index.md @@ -0,0 +1,7 @@ +## Classes + +- [ProtocolGovernance](classes/ProtocolGovernance.md) + +## Interfaces + +- [ProtocolParams](interfaces/ProtocolParams.md) diff --git a/api/@aastar/admin/interfaces/ProtocolParams.md b/api/@aastar/admin/interfaces/ProtocolParams.md new file mode 100644 index 000000000..c5f739c06 --- /dev/null +++ b/api/@aastar/admin/interfaces/ProtocolParams.md @@ -0,0 +1,33 @@ +Defined in: [admin/src/ProtocolGovernance.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L5) + +## Properties + +### entryPoint + +> **entryPoint**: `` `0x${string}` `` + +Defined in: [admin/src/ProtocolGovernance.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L8) + +*** + +### minStake + +> **minStake**: `bigint` + +Defined in: [admin/src/ProtocolGovernance.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L6) + +*** + +### superPaymaster + +> **superPaymaster**: `` `0x${string}` `` + +Defined in: [admin/src/ProtocolGovernance.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L9) + +*** + +### treasury + +> **treasury**: `` `0x${string}` `` + +Defined in: [admin/src/ProtocolGovernance.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L7) diff --git a/api/@aastar/airaccount.md b/api/@aastar/airaccount.md new file mode 100644 index 000000000..a8ebc8476 --- /dev/null +++ b/api/@aastar/airaccount.md @@ -0,0 +1,347 @@ +# @aastar/airaccount — AirAccount SDK + +> ERC-4337 Account Abstraction SDK with KMS WebAuthn, BLS Aggregate Signatures, and Tiered Signature Routing + +A framework-agnostic, production-ready SDK for building Web3 applications with +hardware-backed passkey authentication and ERC-4337 smart accounts. + +## Features + +- **KMS WebAuthn** — Hardware-backed passkey authentication via `kms1.aastar.io` +- **BLS Aggregate Signatures** — Multi-node BLS signing with gossip discovery +- **ERC-4337 Account Abstraction** — Smart contract wallets (v0.6 / v0.7 / v0.8) +- **M4 Account Factory** — Built-in guardian support and daily spending limits +- **Tiered Signature Routing** — Tier 1 (ECDSA) / Tier 2 (P256+BLS) / Tier 3 (P256+BLS+Guardian) +- **SuperPaymaster** — Auto-detected on M4 deployments for gasless transactions +- **Pluggable Adapters** — Bring your own storage, signer, and logger +- **TypeScript First** — Full type safety and IntelliSense support + +## Installation + +```bash +npm install @aastar/airaccount +``` + +## Quick Start — Browser Client + +```typescript +import { AirAccountClient } from "@aastar/airaccount"; + +// `apiURL` is the passkey RP backend. AAStar's official hosted RP will be +// `https://auth.aastar.io` (served by aNode); you can also point at your own +// backend implementing the standardized passkey contract. +const air = new AirAccountClient({ + apiURL: "https://auth.aastar.io", + tokenProvider: () => localStorage.getItem("token"), + bls: { + seedNodes: ["https://signer1.aastar.io"], + }, +}); + +// Register with KMS-backed Passkey +const { user, token } = await air.passkey.register({ + email: "user@example.com", + username: "JohnDoe", +}); + +// Login with Passkey +const result = await air.passkey.authenticate(); + +// Verify a transaction with Passkey (biometric prompt) +const verification = await air.passkey.verifyTransaction({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + value: "0.01", +}); +``` + +## Quick Start — Server Client + +```typescript +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, +} from "@aastar/airaccount/server"; + +const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), +}); + +// Create a smart account +const account = await client.accounts.createAccount("user-123"); + +// Execute a transfer +const result = await client.transfers.executeTransfer("user-123", { + to: "0xRecipient", + amount: "0.01", +}); +``` + +## API Reference + +### Browser SDK (`@aastar/airaccount`) + +#### AirAccountClient + +> `YAAAClient` remains as a deprecated alias of `AirAccountClient` for backward compatibility. + +```typescript +const air = new AirAccountClient(config: AirAccountConfig); +``` + +| Property | Type | Description | +| ------------- | ----------------- | ------------------------------------ | +| `air.passkey` | `PasskeyManager` | WebAuthn passkey authentication | +| `air.bls` | `BLSManager` | BLS node discovery & message points | + +#### AirAccountConfig + +> `YAAAConfig` remains as a deprecated alias of `AirAccountConfig`. + +```typescript +interface AirAccountConfig { + /** + * Backend RP (relying party) API URL — required, no default. + * AAStar's official hosted RP will be `https://auth.aastar.io` (served by aNode). + * You can also point at your own backend implementing the standardized passkey contract. + */ + apiURL: string; + tokenProvider?: () => string | null; + /** Optional overrides for the passkey backend route paths (defaults to `/auth/passkey/*`). */ + passkeyRoutes?: Partial; + bls: { + seedNodes: string[]; + discoveryTimeout?: number; + }; +} +``` + +### Server SDK (`@aastar/airaccount/server`) + +#### AirAccountServerClient + +> `YAAAServerClient` remains as a deprecated alias of `AirAccountServerClient`. + +```typescript +const client = new AirAccountServerClient(config: ServerConfig); +``` + +| Property | Type | Description | +| ------------------- | --------------------- | ---------------------------------------- | +| `client.accounts` | `AccountManager` | Smart account creation & queries | +| `client.transfers` | `TransferManager` | ETH/ERC20 transfers, gas estimation | +| `client.bls` | `BLSSignatureService` | BLS signing & tiered signatures | +| `client.paymaster` | `PaymasterManager` | Paymaster config, SuperPaymaster | +| `client.tokens` | `TokenService` | ERC20 info, balances, calldata | +| `client.wallets` | `WalletManager` | EOA/KMS wallet management | +| `client.ethereum` | `EthereumProvider` | RPC, bundler, contract interactions | + +#### ServerConfig + +```typescript +interface ServerConfig { + rpcUrl: string; + bundlerRpcUrl: string; + chainId: number; + entryPoints: { + v06?: EntryPointConfig; + v07?: EntryPointConfig; + v08?: EntryPointConfig; + }; + defaultVersion?: "0.6" | "0.7" | "0.8"; + blsSeedNodes?: string[]; + blsDiscoveryTimeout?: number; + kmsEndpoint?: string; + kmsEnabled?: boolean; + kmsApiKey?: string; + storage: IStorageAdapter; + signer: ISignerAdapter; + logger?: ILogger; +} +``` + +### Pluggable Interfaces + +#### IStorageAdapter + +```typescript +interface IStorageAdapter { + // Accounts + getAccounts(): Promise; + saveAccount(account: AccountRecord): Promise; + findAccountByUserId(userId: string): Promise; + updateAccount(userId: string, updates: Partial): Promise; + // Transfers + saveTransfer(transfer: TransferRecord): Promise; + findTransferById(id: string): Promise; + findTransfersByUserId(userId: string): Promise; + updateTransfer(id: string, updates: Partial): Promise; + // Paymasters + getPaymasters(userId: string): Promise; + savePaymaster(userId: string, paymaster: PaymasterRecord): Promise; + removePaymaster(userId: string, name: string): Promise; + // BLS + getBlsConfig(): Promise; + updateSignerNodesCache(nodes: unknown[]): Promise; +} +``` + +#### ISignerAdapter + +```typescript +interface ISignerAdapter { + getAddress(userId: string): Promise; + getSigner(userId: string, ctx?: PasskeyAssertionContext): Promise; + ensureSigner(userId: string): Promise<{ signer: ethers.Signer; address: string }>; +} +``` + +#### ILogger + +```typescript +interface ILogger { + debug(message: string, ...args: unknown[]): void; + log(message: string, ...args: unknown[]): void; + warn(message: string, ...args: unknown[]): void; + error(message: string, ...args: unknown[]): void; +} +``` + +### KMS Integration + +```typescript +import { KmsManager } from "@aastar/airaccount/server"; + +const kms = new KmsManager({ + kmsEndpoint: "https://kms1.aastar.io", + kmsApiKey: "your-api-key", + kmsEnabled: true, +}); + +// Create KMS-backed ethers.Signer +const signer = kms.createKmsSigner(keyId, address, assertionProvider); + +// Key management +await kms.createKey(description, passkeyPublicKey); +await kms.getKeyStatus(keyId); +await kms.pollUntilReady(keyId); + +// Signing (requires passkey assertion) +await kms.signHash(hash, assertion, target); + +// WebAuthn ceremonies +await kms.beginRegistration(params); +await kms.completeRegistration(params); +await kms.beginAuthentication(params); +``` + +### Transfer Params + +```typescript +interface ExecuteTransferParams { + to: string; + amount: string; + data?: string; + tokenAddress?: string; // ERC20 token address + usePaymaster?: boolean; + paymasterAddress?: string; + paymasterData?: string; + passkeyAssertion?: LegacyPasskeyAssertion; // KMS signing + p256Signature?: string; // Tier 2/3 + guardianSigner?: ethers.Signer; // Tier 3 + useAirAccountTiering?: boolean; // Enable tiered routing +} +``` + +### Signature Tiers (M4 AirAccount) + +| Tier | AlgId | Components | Use Case | +| ---- | ------ | -------------------------------- | ------------------- | +| 1 | `0x02` | Raw ECDSA (65 bytes) | Small transactions | +| 2 | `0x04` | P256 + BLS aggregate | Medium transactions | +| 3 | `0x05` | P256 + BLS + Guardian ECDSA | Large transactions | +| BLS | `0x01` | Legacy BLS (prepended to pack) | Default non-tiered | + +### ERC-4337 Utilities + +```typescript +import { ERC4337Utils } from "@aastar/airaccount"; + +ERC4337Utils.packAccountGasLimits(verGasLimit, callGasLimit); +ERC4337Utils.unpackAccountGasLimits(packed); +ERC4337Utils.packGasFees(maxPriorityFee, maxFeePerGas); +ERC4337Utils.unpackGasFees(packed); +ERC4337Utils.packUserOperation(userOp); +ERC4337Utils.unpackUserOperation(packedOp); +``` + +### Built-in Adapters + +| Adapter | Description | +| -------------------- | ---------------------------------------------- | +| `MemoryStorage` | In-memory storage (dev/testing) | +| `LocalWalletSigner` | Single private key signer (dev/testing) | +| `ConsoleLogger` | Console output with prefix | +| `SilentLogger` | No-op logger | + +## Examples + +See the [examples](./examples) directory for complete usage: + +- [Basic Usage](./examples/basic-usage.ts) — Browser: registration, login, transactions +- [Server Usage](./examples/server-usage.ts) — Backend: accounts, transfers, KMS, tiering, Express.js +- [Examples README](./examples/README.md) — Full guide with architecture and troubleshooting + +## Architecture + +``` +┌─────────────┐ +│ Browser │ @aastar/airaccount (AirAccountClient) +│ (SDK) │ - PasskeyManager (WebAuthn) +└──────┬───────┘ - BLSManager + │ HTTPS + ▼ +┌─────────────┐ +│ Your API │ @aastar/airaccount/server (AirAccountServerClient) +│ (Backend) │ - AccountManager, TransferManager +└──────┬───────┘ - BLSSignatureService, GuardChecker + │ - KmsManager, PaymasterManager + ├─────► Bundler (Pimlico/Alchemy) + ├─────► Paymaster / SuperPaymaster + ├─────► BLS Validators (gossip network) + └─────► KMS (kms1.aastar.io) +``` + +## Browser Support + +- Chrome/Edge 67+ +- Safari 13+ +- Firefox 60+ + +**Note**: WebAuthn/Passkey requires HTTPS (localhost is OK for development). + +## Development + +```bash +npm install # Install dependencies +npm run build # Build with tsup +npm test # Run tests +npm run dev # Watch mode +npm run lint # ESLint +npm run format # Prettier +``` + +## License + +MIT diff --git a/api/@aastar/airaccount/auth/hardware/functions/connectLedger.md b/api/@aastar/airaccount/auth/hardware/functions/connectLedger.md new file mode 100644 index 000000000..36230f904 --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/functions/connectLedger.md @@ -0,0 +1,30 @@ +> **connectLedger**(`config`): `Promise`\<[`LedgerSigner`](../interfaces/LedgerSigner.md)\> + +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L67) + +Connect to a Ledger device via WebHID and return a LedgerSigner. + +Must be called in response to a user gesture (button click, etc.) because +WebHID requestDevice() requires user activation. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`LedgerSignerConfig`](../interfaces/LedgerSignerConfig.md) | + +## Returns + +`Promise`\<[`LedgerSigner`](../interfaces/LedgerSigner.md)\> + +## Example + +```ts +const signer = await connectLedger(); +const address = await signer.getAddress(); +const provider = new AirAccountEIP1193Provider({ + ..., + accountAddress: myAirAccountAddress, + signer: (hash) => signer.sign(hash), +}); +``` diff --git a/api/@aastar/airaccount/auth/hardware/functions/createYubiKeySigner.md b/api/@aastar/airaccount/auth/hardware/functions/createYubiKeySigner.md new file mode 100644 index 000000000..7d5ae00c6 --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/functions/createYubiKeySigner.md @@ -0,0 +1,34 @@ +> **createYubiKeySigner**(`config`): [`YubiKeySigner`](../interfaces/YubiKeySigner.md) + +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L86) + +Create a YubiKey / FIDO2 P256 signer using WebAuthn. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`YubiKeySignerConfig`](../interfaces/YubiKeySignerConfig.md) | + +## Returns + +[`YubiKeySigner`](../interfaces/YubiKeySigner.md) + +## Example + +```ts +const signer = createYubiKeySigner({ + credentialIds: [base64UrlToBuffer(storedCredentialId)], +}); +// signer.sign() returns the raw WebAuthn P256 signature bytes. +// ⚠ This is NOT directly valid for standalone algId=0x03 on-chain verification +// because the contract expects a signature over userOpHash directly, but +// WebAuthn signs authData || SHA256(clientDataJSON) instead. +// For standalone algId=0x03 you need an EIP-7212-compatible Ethereum app on +// the security key (e.g. Keystone firmware), NOT standard WebAuthn CTAP2. +// +// Correct Tier 2/3 flow: +const webAuthnAssertion = await signer.sign(userOpHash); +// Send webAuthnAssertion to your Tier 2/3 server, which verifies the WebAuthn +// assertion off-chain and returns a composite signature for the UserOp. +``` diff --git a/api/@aastar/airaccount/auth/hardware/index.md b/api/@aastar/airaccount/auth/hardware/index.md new file mode 100644 index 000000000..ce493a927 --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/index.md @@ -0,0 +1,11 @@ +## Interfaces + +- [LedgerSigner](interfaces/LedgerSigner.md) +- [LedgerSignerConfig](interfaces/LedgerSignerConfig.md) +- [YubiKeySigner](interfaces/YubiKeySigner.md) +- [YubiKeySignerConfig](interfaces/YubiKeySignerConfig.md) + +## Functions + +- [connectLedger](functions/connectLedger.md) +- [createYubiKeySigner](functions/createYubiKeySigner.md) diff --git a/api/@aastar/airaccount/auth/hardware/interfaces/LedgerSigner.md b/api/@aastar/airaccount/auth/hardware/interfaces/LedgerSigner.md new file mode 100644 index 000000000..28aeeb0b6 --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/interfaces/LedgerSigner.md @@ -0,0 +1,55 @@ +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L31) + +Ledger signer instance returned by connectLedger(). + +## Methods + +### disconnect() + +> **disconnect**(): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L47) + +Disconnect and release the WebHID device. + +#### Returns + +`Promise`\<`void`\> + +*** + +### getAddress() + +> **getAddress**(): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L36) + +Returns the account address for the configured derivation path. +Use this to verify the Ledger matches the expected account owner. + +#### Returns + +`Promise`\<`string`\> + +*** + +### sign() + +> **sign**(`userOpHash`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L44) + +Signs the UserOp hash and returns a 66-byte hex signature +formatted as [0x02][r(32)][s(32)][v(1)] for algId=0x02 (ECDSA). + +Compatible with the `signer` field of AirAccountProviderConfig. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOpHash` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/airaccount/auth/hardware/interfaces/LedgerSignerConfig.md b/api/@aastar/airaccount/auth/hardware/interfaces/LedgerSignerConfig.md new file mode 100644 index 000000000..8b8f4b96b --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/interfaces/LedgerSignerConfig.md @@ -0,0 +1,28 @@ +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L22) + +ledger.ts — Ledger hardware wallet signer for AirAccount M7. + +Produces an ECDSA (algId=0x02) UserOp signature using a Ledger device +connected via WebHID in the browser. + +Signature format (66 bytes): + [0x02][r(32)][s(32)][v(1)] + +The contract's _validateECDSA applies EIP-191 prefix, so Ledger's +signPersonalMessage (which also adds EIP-191 prefix) matches exactly. + +Requirements: + - Browser environment with WebHID support (Chrome/Edge 89+) + - @ledgerhq/hw-transport-webhid + - @ledgerhq/hw-app-eth + +## Properties + +### derivationPath? + +> `optional` **derivationPath**: `string` + +Defined in: [packages/airaccount/src/auth/hardware/ledger.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/ledger.ts#L27) + +BIP-44 derivation path. Defaults to the first Ethereum account. +Use Ledger Live's "m/44'/60'/0'/0/0" for the default account. diff --git a/api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySigner.md b/api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySigner.md new file mode 100644 index 000000000..ceeaa1965 --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySigner.md @@ -0,0 +1,57 @@ +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L32) + +yubikey.ts — YubiKey / FIDO2 hardware wallet signer for AirAccount M7. + +Uses navigator.credentials.get() (WebAuthn CTAP2) to produce a P256 +signature from a YubiKey or any FIDO2 security key that stores a P-256 +credential. + +Signature format (65 bytes): + [0x03][r(32)][s(32)] + +Compatible with AirAccount algId=0x03 (P256) when the account has been +initialized with the matching P256 public key via setP256Key(x, y). + +⚠ WebAuthn authentication note: + Standard WebAuthn signs `authData || SHA256(clientDataJSON)`, not the + raw userOpHash. The P256 signature is VALID for the WebAuthn assertion + but NOT directly verifiable by the contract's _validateP256() which + expects a signature directly over `userOpHash`. + + Use cases: + 1. Tier 2/3 composite signatures (server-verifies WebAuthn assertion). + 2. Standalone algId=0x03: requires EIP-7212 raw P256 signing, which is + NOT standard WebAuthn. For this use case, pair with a server that + relays the FIDO2 assertion and verifies it off-chain, or use a + purpose-built Ethereum app on the YubiKey (e.g. Keystone firmware). + +Requirements: + - Browser environment with WebAuthn support + - YubiKey or FIDO2 device with a P-256 credential registered + +## Methods + +### sign() + +> **sign**(`userOpHash`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L43) + +Trigger a WebAuthn assertion and return the raw P256 signature bytes +formatted as [0x03][r(32)][s(32)] for AirAccount algId=0x03. + +The `challenge` is set to the userOpHash bytes so the assertion is +cryptographically bound to this specific UserOp. + +Compatible with the `signer` field of AirAccountProviderConfig (for +Tier 2/3 flows where the server validates the WebAuthn assertion). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOpHash` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySignerConfig.md b/api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySignerConfig.md new file mode 100644 index 000000000..a70b9e01f --- /dev/null +++ b/api/@aastar/airaccount/auth/hardware/interfaces/YubiKeySignerConfig.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L46) + +## Properties + +### credentialIds? + +> `optional` **credentialIds**: `Uint8Array`[] + +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L51) + +The credential ID(s) of the registered YubiKey P256 credential. +If empty, any FIDO2 resident credential is allowed (discoverable mode). + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L57) + +Relying Party ID (rpId), typically the website's eTLD+1. +Defaults to window.location.hostname. + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/hardware/yubikey.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/hardware/yubikey.ts#L62) + +Timeout for the WebAuthn request in milliseconds. Default: 60 000. diff --git a/api/@aastar/airaccount/auth/passkey/index.md b/api/@aastar/airaccount/auth/passkey/index.md new file mode 100644 index 000000000..0e262589e --- /dev/null +++ b/api/@aastar/airaccount/auth/passkey/index.md @@ -0,0 +1,59 @@ +## References + +### BeginAuthenticationResponse + +Re-exports [BeginAuthenticationResponse](../../interfaces/BeginAuthenticationResponse.md) + +*** + +### BeginRegistrationResponse + +Re-exports [BeginRegistrationResponse](../../interfaces/BeginRegistrationResponse.md) + +*** + +### BeginTransactionVerificationResponse + +Re-exports [BeginTransactionVerificationResponse](../../interfaces/BeginTransactionVerificationResponse.md) + +*** + +### DEFAULT\_PASSKEY\_ROUTES + +Re-exports [DEFAULT_PASSKEY_ROUTES](../../variables/DEFAULT_PASSKEY_ROUTES.md) + +*** + +### PasskeyAuthenticationParams + +Re-exports [PasskeyAuthenticationParams](../../interfaces/PasskeyAuthenticationParams.md) + +*** + +### PasskeyInfo + +Re-exports [PasskeyInfo](../../interfaces/PasskeyInfo.md) + +*** + +### PasskeyManager + +Re-exports [PasskeyManager](../../classes/PasskeyManager.md) + +*** + +### PasskeyRegistrationParams + +Re-exports [PasskeyRegistrationParams](../../interfaces/PasskeyRegistrationParams.md) + +*** + +### PasskeyRoutes + +Re-exports [PasskeyRoutes](../../interfaces/PasskeyRoutes.md) + +*** + +### TransactionVerificationParams + +Re-exports [TransactionVerificationParams](../../interfaces/TransactionVerificationParams.md) diff --git a/api/@aastar/airaccount/classes/AirAccountClient.md b/api/@aastar/airaccount/classes/AirAccountClient.md new file mode 100644 index 000000000..0211b190c --- /dev/null +++ b/api/@aastar/airaccount/classes/AirAccountClient.md @@ -0,0 +1,35 @@ +Defined in: [packages/airaccount/src/client.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L29) + +## Constructors + +### Constructor + +> **new AirAccountClient**(`config`): `AirAccountClient` + +Defined in: [packages/airaccount/src/client.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L33) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`AirAccountConfig`](../interfaces/AirAccountConfig.md) | + +#### Returns + +`AirAccountClient` + +## Properties + +### bls + +> `readonly` **bls**: [`BLSManager`](BLSManager.md) + +Defined in: [packages/airaccount/src/client.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L31) + +*** + +### passkey + +> `readonly` **passkey**: [`PasskeyManager`](PasskeyManager.md) + +Defined in: [packages/airaccount/src/client.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L30) diff --git a/api/@aastar/airaccount/classes/BLSManager.md b/api/@aastar/airaccount/classes/BLSManager.md new file mode 100644 index 000000000..fa06dfeda --- /dev/null +++ b/api/@aastar/airaccount/classes/BLSManager.md @@ -0,0 +1,168 @@ +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L16) + +## Constructors + +### Constructor + +> **new BLSManager**(`config`): `BLSManager` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`BLSConfig`](../interfaces/BLSConfig.md) | + +#### Returns + +`BLSManager` + +## Methods + +### aggregateSignatures() + +> **aggregateSignatures**(`node`, `signatures`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L131) + +Request aggregation from a node + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `node` | [`BLSNode`](../interfaces/BLSNode.md) | +| `signatures` | `string`[] | + +#### Returns + +`Promise`\<`string`\> + +*** + +### generateMessagePoint() + +> **generateMessagePoint**(`message`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L74) + +Calculate the MessagePoint G2 point for a given message (UserOpHash) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` \| `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getAvailableNodes() + +> **getAvailableNodes**(): `Promise`\<[`BLSNode`](../interfaces/BLSNode.md)[]\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L26) + +Discover available BLS nodes from seed nodes (Gossip network) + +#### Returns + +`Promise`\<[`BLSNode`](../interfaces/BLSNode.md)[]\> + +*** + +### packCumulativeT2Signature() + +> **packCumulativeT2Signature**(`data`): `string` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L88) + +Pack cumulative Tier 2 signature (algId 0x04): P256 + BLS. + +Format: + [algId=0x04 (1)] [P256 r (32)] [P256 s (32)] + [nodeIdsLength (32)] [nodeIds (N×32)] + [blsAggregateSig (256)] [messagePoint (256)] + [messagePointECDSA (65)] + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | [`CumulativeT2SignatureData`](../interfaces/CumulativeT2SignatureData.md) | + +#### Returns + +`string` + +*** + +### packCumulativeT3Signature() + +> **packCumulativeT3Signature**(`data`): `string` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L102) + +Pack cumulative Tier 3 signature (algId 0x05): P256 + BLS + Guardian. + +Format: + [algId=0x05 (1)] [P256 r (32)] [P256 s (32)] + [nodeIdsLength (32)] [nodeIds (N×32)] + [blsAggregateSig (256)] [messagePoint (256)] + [messagePointECDSA (65)] [guardianECDSA (65)] + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | [`CumulativeT3SignatureData`](../interfaces/CumulativeT3SignatureData.md) | + +#### Returns + +`string` + +*** + +### packSignature() + +> **packSignature**(`data`): `string` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L66) + +Helper to pack the full signature for ERC-4337 UserOp +Format: [nodeIdsLength][nodeIds...][blsSignature][messagePoint][aaSignature][messagePointSignature] + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | [`BLSSignatureData`](../interfaces/BLSSignatureData.md) | + +#### Returns + +`string` + +*** + +### requestNodeSignature() + +> **requestNodeSignature**(`node`, `message`): `Promise`\<\{ `publicKey`: `string`; `signature`: `string`; \}\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L110) + +Request signature from a single node + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `node` | [`BLSNode`](../interfaces/BLSNode.md) | +| `message` | `string` | + +#### Returns + +`Promise`\<\{ `publicKey`: `string`; `signature`: `string`; \}\> diff --git a/api/@aastar/airaccount/classes/CryptoUtil.md b/api/@aastar/airaccount/classes/CryptoUtil.md new file mode 100644 index 000000000..c37ce0613 --- /dev/null +++ b/api/@aastar/airaccount/classes/CryptoUtil.md @@ -0,0 +1,61 @@ +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L3) + +## Constructors + +### Constructor + +> **new CryptoUtil**(): `CryptoUtil` + +#### Returns + +`CryptoUtil` + +## Methods + +### decrypt() + +> `static` **decrypt**(`encryptedData`, `secretKey`): `string` + +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L28) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `encryptedData` | `string` | +| `secretKey` | `string` | + +#### Returns + +`string` + +*** + +### encrypt() + +> `static` **encrypt**(`text`, `secretKey`): `string` + +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `text` | `string` | +| `secretKey` | `string` | + +#### Returns + +`string` + +*** + +### generateSecretKey() + +> `static` **generateSecretKey**(): `string` + +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L53) + +#### Returns + +`string` diff --git a/api/@aastar/airaccount/classes/ERC4337Utils.md b/api/@aastar/airaccount/classes/ERC4337Utils.md new file mode 100644 index 000000000..140fd6bbe --- /dev/null +++ b/api/@aastar/airaccount/classes/ERC4337Utils.md @@ -0,0 +1,137 @@ +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L3) + +## Constructors + +### Constructor + +> **new ERC4337Utils**(): `ERC4337Utils` + +#### Returns + +`ERC4337Utils` + +## Methods + +### packAccountGasLimits() + +> `static` **packAccountGasLimits**(`verificationGasLimit`, `callGasLimit`): `string` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L4) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `verificationGasLimit` | `string` \| `bigint` | +| `callGasLimit` | `string` \| `bigint` | + +#### Returns + +`string` + +*** + +### packGasFees() + +> `static` **packGasFees**(`maxPriorityFeePerGas`, `maxFeePerGas`): `string` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `maxPriorityFeePerGas` | `string` \| `bigint` | +| `maxFeePerGas` | `string` \| `bigint` | + +#### Returns + +`string` + +*** + +### packUserOperation() + +> `static` **packUserOperation**(`userOp`): [`PackedUserOperation`](../interfaces/PackedUserOperation.md) + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `any` | + +#### Returns + +[`PackedUserOperation`](../interfaces/PackedUserOperation.md) + +*** + +### unpackAccountGasLimits() + +> `static` **unpackAccountGasLimits**(`accountGasLimits`): `object` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountGasLimits` | `string` | + +#### Returns + +`object` + +##### callGasLimit + +> **callGasLimit**: `bigint` + +##### verificationGasLimit + +> **verificationGasLimit**: `bigint` + +*** + +### unpackGasFees() + +> `static` **unpackGasFees**(`gasFees`): `object` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `gasFees` | `string` | + +#### Returns + +`object` + +##### maxFeePerGas + +> **maxFeePerGas**: `bigint` + +##### maxPriorityFeePerGas + +> **maxPriorityFeePerGas**: `bigint` + +*** + +### unpackUserOperation() + +> `static` **unpackUserOperation**(`packedOp`): `any` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L60) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `packedOp` | [`PackedUserOperation`](../interfaces/PackedUserOperation.md) | + +#### Returns + +`any` diff --git a/api/@aastar/airaccount/classes/PasskeyManager.md b/api/@aastar/airaccount/classes/PasskeyManager.md new file mode 100644 index 000000000..7fa8c4d2f --- /dev/null +++ b/api/@aastar/airaccount/classes/PasskeyManager.md @@ -0,0 +1,104 @@ +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L51) + +## Constructors + +### Constructor + +> **new PasskeyManager**(`baseURL`, `tokenProvider?`, `routes?`): `PasskeyManager` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `baseURL` | `string` | +| `tokenProvider?` | () => `string` \| `null` | +| `routes?` | `Partial`\<[`PasskeyRoutes`](../interfaces/PasskeyRoutes.md)\> | + +#### Returns + +`PasskeyManager` + +## Methods + +### addDevice() + +> **addDevice**(`params`): `Promise`\<[`PasskeyInfo`](../interfaces/PasskeyInfo.md)\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L161) + +Add a new device (Passkey) to existing account + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `email`: `string`; `password?`: `string`; \} | +| `params.email` | `string` | +| `params.password?` | `string` | + +#### Returns + +`Promise`\<[`PasskeyInfo`](../interfaces/PasskeyInfo.md)\> + +*** + +### authenticate() + +> **authenticate**(`params?`): `Promise`\<\{ `token`: `string`; `user`: `any`; \}\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L113) + +Complete Passkey Login/Authentication Flow + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params?` | [`PasskeyAuthenticationParams`](../interfaces/PasskeyAuthenticationParams.md) | + +#### Returns + +`Promise`\<\{ `token`: `string`; `user`: `any`; \}\> + +*** + +### register() + +> **register**(`params`): `Promise`\<\{ `passkey`: [`PasskeyInfo`](../interfaces/PasskeyInfo.md); `token`: `string`; `user`: `any`; \}\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L86) + +Complete Passkey Registration Flow + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`PasskeyRegistrationParams`](../interfaces/PasskeyRegistrationParams.md) | + +#### Returns + +`Promise`\<\{ `passkey`: [`PasskeyInfo`](../interfaces/PasskeyInfo.md); `token`: `string`; `user`: `any`; \}\> + +*** + +### verifyTransaction() + +> **verifyTransaction**(`params`): `Promise`\<`any`\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L133) + +Verify a transaction (Sign UserOpHash) with Passkey +Returns the verification credential needed for the transaction + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`TransactionVerificationParams`](../interfaces/TransactionVerificationParams.md) | + +#### Returns + +`Promise`\<`any`\> diff --git a/api/@aastar/airaccount/classes/UserOpBuilder.md b/api/@aastar/airaccount/classes/UserOpBuilder.md new file mode 100644 index 000000000..72f7f263c --- /dev/null +++ b/api/@aastar/airaccount/classes/UserOpBuilder.md @@ -0,0 +1,69 @@ +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L6) + +## Constructors + +### Constructor + +> **new UserOpBuilder**(): `UserOpBuilder` + +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L13) + +#### Returns + +`UserOpBuilder` + +## Methods + +### buildUserOp() + +> **buildUserOp**(`params`): `Promise`\<[`UserOperation`](../interfaces/UserOperation.md)\> + +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L21) + +Build specific parts of a UserOperation +Note: Full construction often requires chain interaction (nonce, gas price), +which typically happens in the application layer or via a Provider wrapper. +This builder focuses on formatting and structure. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `callData`: `string`; `callGasLimit?`: `bigint`; `initCode?`: `string`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `bigint`; `paymasterAndData?`: `string`; `preVerificationGas?`: `bigint`; `sender`: `string`; `signature?`: `string`; `verificationGasLimit?`: `bigint`; \} | +| `params.callData` | `string` | +| `params.callGasLimit?` | `bigint` | +| `params.initCode?` | `string` | +| `params.maxFeePerGas?` | `bigint` | +| `params.maxPriorityFeePerGas?` | `bigint` | +| `params.nonce?` | `bigint` | +| `params.paymasterAndData?` | `string` | +| `params.preVerificationGas?` | `bigint` | +| `params.sender` | `string` | +| `params.signature?` | `string` | +| `params.verificationGasLimit?` | `bigint` | + +#### Returns + +`Promise`\<[`UserOperation`](../interfaces/UserOperation.md)\> + +*** + +### getUserOpHash() + +> **getUserOpHash**(`userOp`, `entryPoint`, `chainId`): `string` + +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L54) + +Hash the UserOperation for signing (ERC-4337 v0.7) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | [`PackedUserOperation`](../interfaces/PackedUserOperation.md) | +| `entryPoint` | `string` | +| `chainId` | `number` | + +#### Returns + +`string` diff --git a/api/@aastar/airaccount/core/bls/index.md b/api/@aastar/airaccount/core/bls/index.md new file mode 100644 index 000000000..7aa180704 --- /dev/null +++ b/api/@aastar/airaccount/core/bls/index.md @@ -0,0 +1,35 @@ +## References + +### BLSConfig + +Re-exports [BLSConfig](../../interfaces/BLSConfig.md) + +*** + +### BLSManager + +Re-exports [BLSManager](../../classes/BLSManager.md) + +*** + +### BLSNode + +Re-exports [BLSNode](../../interfaces/BLSNode.md) + +*** + +### BLSSignatureData + +Re-exports [BLSSignatureData](../../interfaces/BLSSignatureData.md) + +*** + +### CumulativeT2SignatureData + +Re-exports [CumulativeT2SignatureData](../../interfaces/CumulativeT2SignatureData.md) + +*** + +### CumulativeT3SignatureData + +Re-exports [CumulativeT3SignatureData](../../interfaces/CumulativeT3SignatureData.md) diff --git a/api/@aastar/airaccount/core/erc4337/index.md b/api/@aastar/airaccount/core/erc4337/index.md new file mode 100644 index 000000000..6196dc818 --- /dev/null +++ b/api/@aastar/airaccount/core/erc4337/index.md @@ -0,0 +1,11 @@ +## References + +### ERC4337Utils + +Re-exports [ERC4337Utils](../../classes/ERC4337Utils.md) + +*** + +### UserOpBuilder + +Re-exports [UserOpBuilder](../../classes/UserOpBuilder.md) diff --git a/api/@aastar/airaccount/functions/algIdForTier.md b/api/@aastar/airaccount/functions/algIdForTier.md new file mode 100644 index 000000000..906f4a4df --- /dev/null +++ b/api/@aastar/airaccount/functions/algIdForTier.md @@ -0,0 +1,19 @@ +> **algIdForTier**(`tier`): [`AlgId`](../type-aliases/AlgId.md) + +Defined in: [packages/airaccount/src/core/tier/tier-router.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/tier-router.ts#L33) + +Get the algorithm ID to use for a given tier. + +- Tier 1: ALG_ECDSA (0x02) — raw 65-byte ECDSA, no prefix needed +- Tier 2: ALG_CUMULATIVE_T2 (0x04) — P256 + BLS +- Tier 3: ALG_CUMULATIVE_T3 (0x05) — P256 + BLS + Guardian + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `tier` | [`TierLevel`](../type-aliases/TierLevel.md) | + +## Returns + +[`AlgId`](../type-aliases/AlgId.md) diff --git a/api/@aastar/airaccount/functions/resolveTier.md b/api/@aastar/airaccount/functions/resolveTier.md new file mode 100644 index 000000000..25d61f31b --- /dev/null +++ b/api/@aastar/airaccount/functions/resolveTier.md @@ -0,0 +1,22 @@ +> **resolveTier**(`value`, `config`): [`TierLevel`](../type-aliases/TierLevel.md) + +Defined in: [packages/airaccount/src/core/tier/tier-router.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/tier-router.ts#L19) + +Determine the required tier for a given transaction value. + +- Tier 1: value <= tier1Limit — single ECDSA or P256 passkey +- Tier 2: tier1Limit < value <= tier2Limit — P256 + BLS aggregate +- Tier 3: value > tier2Limit — P256 + BLS + Guardian ECDSA + +If both limits are 0 (no enforcement), always returns Tier 1. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `bigint` | +| `config` | [`TierConfig`](../interfaces/TierConfig.md) | + +## Returns + +[`TierLevel`](../type-aliases/TierLevel.md) diff --git a/api/@aastar/airaccount/index.md b/api/@aastar/airaccount/index.md new file mode 100644 index 000000000..a8ebc8476 --- /dev/null +++ b/api/@aastar/airaccount/index.md @@ -0,0 +1,347 @@ +# @aastar/airaccount — AirAccount SDK + +> ERC-4337 Account Abstraction SDK with KMS WebAuthn, BLS Aggregate Signatures, and Tiered Signature Routing + +A framework-agnostic, production-ready SDK for building Web3 applications with +hardware-backed passkey authentication and ERC-4337 smart accounts. + +## Features + +- **KMS WebAuthn** — Hardware-backed passkey authentication via `kms1.aastar.io` +- **BLS Aggregate Signatures** — Multi-node BLS signing with gossip discovery +- **ERC-4337 Account Abstraction** — Smart contract wallets (v0.6 / v0.7 / v0.8) +- **M4 Account Factory** — Built-in guardian support and daily spending limits +- **Tiered Signature Routing** — Tier 1 (ECDSA) / Tier 2 (P256+BLS) / Tier 3 (P256+BLS+Guardian) +- **SuperPaymaster** — Auto-detected on M4 deployments for gasless transactions +- **Pluggable Adapters** — Bring your own storage, signer, and logger +- **TypeScript First** — Full type safety and IntelliSense support + +## Installation + +```bash +npm install @aastar/airaccount +``` + +## Quick Start — Browser Client + +```typescript +import { AirAccountClient } from "@aastar/airaccount"; + +// `apiURL` is the passkey RP backend. AAStar's official hosted RP will be +// `https://auth.aastar.io` (served by aNode); you can also point at your own +// backend implementing the standardized passkey contract. +const air = new AirAccountClient({ + apiURL: "https://auth.aastar.io", + tokenProvider: () => localStorage.getItem("token"), + bls: { + seedNodes: ["https://signer1.aastar.io"], + }, +}); + +// Register with KMS-backed Passkey +const { user, token } = await air.passkey.register({ + email: "user@example.com", + username: "JohnDoe", +}); + +// Login with Passkey +const result = await air.passkey.authenticate(); + +// Verify a transaction with Passkey (biometric prompt) +const verification = await air.passkey.verifyTransaction({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + value: "0.01", +}); +``` + +## Quick Start — Server Client + +```typescript +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, +} from "@aastar/airaccount/server"; + +const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), +}); + +// Create a smart account +const account = await client.accounts.createAccount("user-123"); + +// Execute a transfer +const result = await client.transfers.executeTransfer("user-123", { + to: "0xRecipient", + amount: "0.01", +}); +``` + +## API Reference + +### Browser SDK (`@aastar/airaccount`) + +#### AirAccountClient + +> `YAAAClient` remains as a deprecated alias of `AirAccountClient` for backward compatibility. + +```typescript +const air = new AirAccountClient(config: AirAccountConfig); +``` + +| Property | Type | Description | +| ------------- | ----------------- | ------------------------------------ | +| `air.passkey` | `PasskeyManager` | WebAuthn passkey authentication | +| `air.bls` | `BLSManager` | BLS node discovery & message points | + +#### AirAccountConfig + +> `YAAAConfig` remains as a deprecated alias of `AirAccountConfig`. + +```typescript +interface AirAccountConfig { + /** + * Backend RP (relying party) API URL — required, no default. + * AAStar's official hosted RP will be `https://auth.aastar.io` (served by aNode). + * You can also point at your own backend implementing the standardized passkey contract. + */ + apiURL: string; + tokenProvider?: () => string | null; + /** Optional overrides for the passkey backend route paths (defaults to `/auth/passkey/*`). */ + passkeyRoutes?: Partial; + bls: { + seedNodes: string[]; + discoveryTimeout?: number; + }; +} +``` + +### Server SDK (`@aastar/airaccount/server`) + +#### AirAccountServerClient + +> `YAAAServerClient` remains as a deprecated alias of `AirAccountServerClient`. + +```typescript +const client = new AirAccountServerClient(config: ServerConfig); +``` + +| Property | Type | Description | +| ------------------- | --------------------- | ---------------------------------------- | +| `client.accounts` | `AccountManager` | Smart account creation & queries | +| `client.transfers` | `TransferManager` | ETH/ERC20 transfers, gas estimation | +| `client.bls` | `BLSSignatureService` | BLS signing & tiered signatures | +| `client.paymaster` | `PaymasterManager` | Paymaster config, SuperPaymaster | +| `client.tokens` | `TokenService` | ERC20 info, balances, calldata | +| `client.wallets` | `WalletManager` | EOA/KMS wallet management | +| `client.ethereum` | `EthereumProvider` | RPC, bundler, contract interactions | + +#### ServerConfig + +```typescript +interface ServerConfig { + rpcUrl: string; + bundlerRpcUrl: string; + chainId: number; + entryPoints: { + v06?: EntryPointConfig; + v07?: EntryPointConfig; + v08?: EntryPointConfig; + }; + defaultVersion?: "0.6" | "0.7" | "0.8"; + blsSeedNodes?: string[]; + blsDiscoveryTimeout?: number; + kmsEndpoint?: string; + kmsEnabled?: boolean; + kmsApiKey?: string; + storage: IStorageAdapter; + signer: ISignerAdapter; + logger?: ILogger; +} +``` + +### Pluggable Interfaces + +#### IStorageAdapter + +```typescript +interface IStorageAdapter { + // Accounts + getAccounts(): Promise; + saveAccount(account: AccountRecord): Promise; + findAccountByUserId(userId: string): Promise; + updateAccount(userId: string, updates: Partial): Promise; + // Transfers + saveTransfer(transfer: TransferRecord): Promise; + findTransferById(id: string): Promise; + findTransfersByUserId(userId: string): Promise; + updateTransfer(id: string, updates: Partial): Promise; + // Paymasters + getPaymasters(userId: string): Promise; + savePaymaster(userId: string, paymaster: PaymasterRecord): Promise; + removePaymaster(userId: string, name: string): Promise; + // BLS + getBlsConfig(): Promise; + updateSignerNodesCache(nodes: unknown[]): Promise; +} +``` + +#### ISignerAdapter + +```typescript +interface ISignerAdapter { + getAddress(userId: string): Promise; + getSigner(userId: string, ctx?: PasskeyAssertionContext): Promise; + ensureSigner(userId: string): Promise<{ signer: ethers.Signer; address: string }>; +} +``` + +#### ILogger + +```typescript +interface ILogger { + debug(message: string, ...args: unknown[]): void; + log(message: string, ...args: unknown[]): void; + warn(message: string, ...args: unknown[]): void; + error(message: string, ...args: unknown[]): void; +} +``` + +### KMS Integration + +```typescript +import { KmsManager } from "@aastar/airaccount/server"; + +const kms = new KmsManager({ + kmsEndpoint: "https://kms1.aastar.io", + kmsApiKey: "your-api-key", + kmsEnabled: true, +}); + +// Create KMS-backed ethers.Signer +const signer = kms.createKmsSigner(keyId, address, assertionProvider); + +// Key management +await kms.createKey(description, passkeyPublicKey); +await kms.getKeyStatus(keyId); +await kms.pollUntilReady(keyId); + +// Signing (requires passkey assertion) +await kms.signHash(hash, assertion, target); + +// WebAuthn ceremonies +await kms.beginRegistration(params); +await kms.completeRegistration(params); +await kms.beginAuthentication(params); +``` + +### Transfer Params + +```typescript +interface ExecuteTransferParams { + to: string; + amount: string; + data?: string; + tokenAddress?: string; // ERC20 token address + usePaymaster?: boolean; + paymasterAddress?: string; + paymasterData?: string; + passkeyAssertion?: LegacyPasskeyAssertion; // KMS signing + p256Signature?: string; // Tier 2/3 + guardianSigner?: ethers.Signer; // Tier 3 + useAirAccountTiering?: boolean; // Enable tiered routing +} +``` + +### Signature Tiers (M4 AirAccount) + +| Tier | AlgId | Components | Use Case | +| ---- | ------ | -------------------------------- | ------------------- | +| 1 | `0x02` | Raw ECDSA (65 bytes) | Small transactions | +| 2 | `0x04` | P256 + BLS aggregate | Medium transactions | +| 3 | `0x05` | P256 + BLS + Guardian ECDSA | Large transactions | +| BLS | `0x01` | Legacy BLS (prepended to pack) | Default non-tiered | + +### ERC-4337 Utilities + +```typescript +import { ERC4337Utils } from "@aastar/airaccount"; + +ERC4337Utils.packAccountGasLimits(verGasLimit, callGasLimit); +ERC4337Utils.unpackAccountGasLimits(packed); +ERC4337Utils.packGasFees(maxPriorityFee, maxFeePerGas); +ERC4337Utils.unpackGasFees(packed); +ERC4337Utils.packUserOperation(userOp); +ERC4337Utils.unpackUserOperation(packedOp); +``` + +### Built-in Adapters + +| Adapter | Description | +| -------------------- | ---------------------------------------------- | +| `MemoryStorage` | In-memory storage (dev/testing) | +| `LocalWalletSigner` | Single private key signer (dev/testing) | +| `ConsoleLogger` | Console output with prefix | +| `SilentLogger` | No-op logger | + +## Examples + +See the [examples](./examples) directory for complete usage: + +- [Basic Usage](./examples/basic-usage.ts) — Browser: registration, login, transactions +- [Server Usage](./examples/server-usage.ts) — Backend: accounts, transfers, KMS, tiering, Express.js +- [Examples README](./examples/README.md) — Full guide with architecture and troubleshooting + +## Architecture + +``` +┌─────────────┐ +│ Browser │ @aastar/airaccount (AirAccountClient) +│ (SDK) │ - PasskeyManager (WebAuthn) +└──────┬───────┘ - BLSManager + │ HTTPS + ▼ +┌─────────────┐ +│ Your API │ @aastar/airaccount/server (AirAccountServerClient) +│ (Backend) │ - AccountManager, TransferManager +└──────┬───────┘ - BLSSignatureService, GuardChecker + │ - KmsManager, PaymasterManager + ├─────► Bundler (Pimlico/Alchemy) + ├─────► Paymaster / SuperPaymaster + ├─────► BLS Validators (gossip network) + └─────► KMS (kms1.aastar.io) +``` + +## Browser Support + +- Chrome/Edge 67+ +- Safari 13+ +- Firefox 60+ + +**Note**: WebAuthn/Passkey requires HTTPS (localhost is OK for development). + +## Development + +```bash +npm install # Install dependencies +npm run build # Build with tsup +npm test # Run tests +npm run dev # Watch mode +npm run lint # ESLint +npm run format # Prettier +``` + +## License + +MIT diff --git a/api/@aastar/airaccount/interfaces/AirAccountConfig.md b/api/@aastar/airaccount/interfaces/AirAccountConfig.md new file mode 100644 index 000000000..9b8f20dd1 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/AirAccountConfig.md @@ -0,0 +1,54 @@ +Defined in: [packages/airaccount/src/client.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L5) + +## Properties + +### apiURL + +> **apiURL**: `string` + +Defined in: [packages/airaccount/src/client.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L14) + +Backend RP (relying party) API URL — required, no default. + +AAStar's official hosted RP will be `https://auth.aastar.io` (served by +aNode, see AAStarCommunity/YetAnotherAA-Validator#81). You can also point +this at your own backend implementing the standardized passkey contract +(see `@aastar/passkey-server` / [PasskeyRoutes](PasskeyRoutes.md)). + +*** + +### bls + +> **bls**: [`BLSConfig`](BLSConfig.md) + +Defined in: [packages/airaccount/src/client.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L26) + +BLS Configuration + +*** + +### passkeyRoutes? + +> `optional` **passkeyRoutes**: `Partial`\<[`PasskeyRoutes`](PasskeyRoutes.md)\> + +Defined in: [packages/airaccount/src/client.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L24) + +Optional overrides for the passkey backend route paths. + +Defaults to the standardized `@aastar/passkey-server` contract +(`/auth/passkey/*`). Override individual paths to point at a backend that +exposes different routes without changing SDK code. + +*** + +### tokenProvider()? + +> `optional` **tokenProvider**: () => `string` \| `null` + +Defined in: [packages/airaccount/src/client.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L16) + +Function to get the current auth token (JWT) + +#### Returns + +`string` \| `null` diff --git a/api/@aastar/airaccount/interfaces/BLSConfig.md b/api/@aastar/airaccount/interfaces/BLSConfig.md new file mode 100644 index 000000000..32c3ed3d6 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/BLSConfig.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L23) + +## Properties + +### discoveryTimeout? + +> `optional` **discoveryTimeout**: `number` + +Defined in: [packages/airaccount/src/core/bls/types.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L25) + +*** + +### seedNodes + +> **seedNodes**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L24) diff --git a/api/@aastar/airaccount/interfaces/BLSNode.md b/api/@aastar/airaccount/interfaces/BLSNode.md new file mode 100644 index 000000000..fdd830ce8 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/BLSNode.md @@ -0,0 +1,57 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:1](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L1) + +## Properties + +### apiEndpoint + +> **apiEndpoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L5) + +*** + +### index? + +> `optional` **index**: `number` + +Defined in: [packages/airaccount/src/core/bls/types.ts:2](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L2) + +*** + +### lastSeen? + +> `optional` **lastSeen**: `Date` + +Defined in: [packages/airaccount/src/core/bls/types.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L8) + +*** + +### nodeId + +> **nodeId**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L3) + +*** + +### nodeName + +> **nodeName**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L4) + +*** + +### publicKey? + +> `optional` **publicKey**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L7) + +*** + +### status + +> **status**: `"active"` \| `"inactive"` + +Defined in: [packages/airaccount/src/core/bls/types.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L6) diff --git a/api/@aastar/airaccount/interfaces/BLSSignatureData.md b/api/@aastar/airaccount/interfaces/BLSSignatureData.md new file mode 100644 index 000000000..36b1ae867 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/BLSSignatureData.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L11) + +## Properties + +### aaAddress + +> **aaAddress**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L17) + +*** + +### aaSignature + +> **aaSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L18) + +*** + +### aggregatedSignature? + +> `optional` **aggregatedSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L20) + +*** + +### messagePoint + +> **messagePoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L16) + +*** + +### messagePointSignature + +> **messagePointSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L19) + +*** + +### nodeIds + +> **nodeIds**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L12) + +*** + +### publicKeys? + +> `optional` **publicKeys**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L14) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L15) + +*** + +### signatures? + +> `optional` **signatures**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L13) diff --git a/api/@aastar/airaccount/interfaces/BeginAuthenticationResponse.md b/api/@aastar/airaccount/interfaces/BeginAuthenticationResponse.md new file mode 100644 index 000000000..5d4040151 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/BeginAuthenticationResponse.md @@ -0,0 +1,45 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L36) + +## Extended by + +- [`BeginTransactionVerificationResponse`](BeginTransactionVerificationResponse.md) + +## Properties + +### allowCredentials? + +> `optional` **allowCredentials**: `any`[] + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L40) + +*** + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L37) + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L39) + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L38) + +*** + +### userVerification? + +> `optional` **userVerification**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L41) diff --git a/api/@aastar/airaccount/interfaces/BeginRegistrationResponse.md b/api/@aastar/airaccount/interfaces/BeginRegistrationResponse.md new file mode 100644 index 000000000..f17447bda --- /dev/null +++ b/api/@aastar/airaccount/interfaces/BeginRegistrationResponse.md @@ -0,0 +1,77 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L26) + +## Properties + +### attestation? + +> `optional` **attestation**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L33) + +*** + +### authenticatorSelection? + +> `optional` **authenticatorSelection**: `any` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L32) + +*** + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L27) + +*** + +### pubKeyCredParams + +> **pubKeyCredParams**: `any`[] + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L30) + +*** + +### rp + +> **rp**: `object` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L28) + +#### id + +> **id**: `string` + +#### name + +> **name**: `string` + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L31) + +*** + +### user + +> **user**: `object` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L29) + +#### displayName + +> **displayName**: `string` + +#### id + +> **id**: `string` + +#### name + +> **name**: `string` diff --git a/api/@aastar/airaccount/interfaces/BeginTransactionVerificationResponse.md b/api/@aastar/airaccount/interfaces/BeginTransactionVerificationResponse.md new file mode 100644 index 000000000..bba20d87f --- /dev/null +++ b/api/@aastar/airaccount/interfaces/BeginTransactionVerificationResponse.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L44) + +## Extends + +- [`BeginAuthenticationResponse`](BeginAuthenticationResponse.md) + +## Properties + +### allowCredentials? + +> `optional` **allowCredentials**: `any`[] + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L40) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`allowCredentials`](BeginAuthenticationResponse.md#allowcredentials) + +*** + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L37) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`challenge`](BeginAuthenticationResponse.md#challenge) + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L39) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`rpId`](BeginAuthenticationResponse.md#rpid) + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L38) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`timeout`](BeginAuthenticationResponse.md#timeout) + +*** + +### userOpHash + +> **userOpHash**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L45) + +*** + +### userVerification? + +> `optional` **userVerification**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L41) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`userVerification`](BeginAuthenticationResponse.md#userverification) diff --git a/api/@aastar/airaccount/interfaces/CumulativeT2SignatureData.md b/api/@aastar/airaccount/interfaces/CumulativeT2SignatureData.md new file mode 100644 index 000000000..d661b0057 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/CumulativeT2SignatureData.md @@ -0,0 +1,47 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L33) + +Data for cumulative Tier 2 signature (algId 0x04): P256 + BLS. + +## Extended by + +- [`CumulativeT3SignatureData`](CumulativeT3SignatureData.md) + +## Properties + +### blsSignature + +> **blsSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L36) + +*** + +### messagePoint + +> **messagePoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L37) + +*** + +### messagePointSignature + +> **messagePointSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L38) + +*** + +### nodeIds + +> **nodeIds**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L35) + +*** + +### p256Signature + +> **p256Signature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L34) diff --git a/api/@aastar/airaccount/interfaces/CumulativeT3SignatureData.md b/api/@aastar/airaccount/interfaces/CumulativeT3SignatureData.md new file mode 100644 index 000000000..9f3827316 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/CumulativeT3SignatureData.md @@ -0,0 +1,75 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L44) + +Data for cumulative Tier 3 signature (algId 0x05): P256 + BLS + Guardian. + +## Extends + +- [`CumulativeT2SignatureData`](CumulativeT2SignatureData.md) + +## Properties + +### blsSignature + +> **blsSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L36) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`blsSignature`](CumulativeT2SignatureData.md#blssignature) + +*** + +### guardianSignature + +> **guardianSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L45) + +*** + +### messagePoint + +> **messagePoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L37) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`messagePoint`](CumulativeT2SignatureData.md#messagepoint) + +*** + +### messagePointSignature + +> **messagePointSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L38) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`messagePointSignature`](CumulativeT2SignatureData.md#messagepointsignature) + +*** + +### nodeIds + +> **nodeIds**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L35) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`nodeIds`](CumulativeT2SignatureData.md#nodeids) + +*** + +### p256Signature + +> **p256Signature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L34) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`p256Signature`](CumulativeT2SignatureData.md#p256signature) diff --git a/api/@aastar/airaccount/interfaces/GasEstimate.md b/api/@aastar/airaccount/interfaces/GasEstimate.md new file mode 100644 index 000000000..bcdaf0079 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/GasEstimate.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/core/types/index.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L27) + +## Properties + +### callGasLimit + +> **callGasLimit**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L28) + +*** + +### preVerificationGas + +> **preVerificationGas**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L30) + +*** + +### verificationGasLimit + +> **verificationGasLimit**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L29) diff --git a/api/@aastar/airaccount/interfaces/GuardStatus.md b/api/@aastar/airaccount/interfaces/GuardStatus.md new file mode 100644 index 000000000..8deef62af --- /dev/null +++ b/api/@aastar/airaccount/interfaces/GuardStatus.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/core/tier/types.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L29) + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L32) + +*** + +### dailyRemaining + +> **dailyRemaining**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L33) + +*** + +### guardAddress + +> **guardAddress**: `string` + +Defined in: [packages/airaccount/src/core/tier/types.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L31) + +*** + +### hasGuard + +> **hasGuard**: `boolean` + +Defined in: [packages/airaccount/src/core/tier/types.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L30) diff --git a/api/@aastar/airaccount/interfaces/PackedUserOperation.md b/api/@aastar/airaccount/interfaces/PackedUserOperation.md new file mode 100644 index 000000000..0545b07f2 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/PackedUserOperation.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/core/types/index.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L15) + +## Properties + +### accountGasLimits + +> **accountGasLimits**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L20) + +*** + +### callData + +> **callData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L19) + +*** + +### gasFees + +> **gasFees**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L22) + +*** + +### initCode + +> **initCode**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L18) + +*** + +### nonce + +> **nonce**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L17) + +*** + +### paymasterAndData + +> **paymasterAndData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L23) + +*** + +### preVerificationGas + +> **preVerificationGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L21) + +*** + +### sender + +> **sender**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L16) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L24) diff --git a/api/@aastar/airaccount/interfaces/PasskeyAuthenticationParams.md b/api/@aastar/airaccount/interfaces/PasskeyAuthenticationParams.md new file mode 100644 index 000000000..fd097e810 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/PasskeyAuthenticationParams.md @@ -0,0 +1,9 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L7) + +## Properties + +### email? + +> `optional` **email**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L8) diff --git a/api/@aastar/airaccount/interfaces/PasskeyInfo.md b/api/@aastar/airaccount/interfaces/PasskeyInfo.md new file mode 100644 index 000000000..f0dc5f552 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/PasskeyInfo.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L17) + +## Properties + +### counter + +> **counter**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L20) + +*** + +### createdAt + +> **createdAt**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L22) + +*** + +### credentialId + +> **credentialId**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L18) + +*** + +### deviceType + +> **deviceType**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L21) + +*** + +### publicKey + +> **publicKey**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L19) diff --git a/api/@aastar/airaccount/interfaces/PasskeyRegistrationParams.md b/api/@aastar/airaccount/interfaces/PasskeyRegistrationParams.md new file mode 100644 index 000000000..7ddde475c --- /dev/null +++ b/api/@aastar/airaccount/interfaces/PasskeyRegistrationParams.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:1](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L1) + +## Properties + +### email + +> **email**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:2](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L2) + +*** + +### password? + +> `optional` **password**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L4) + +*** + +### username + +> **username**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L3) diff --git a/api/@aastar/airaccount/interfaces/PasskeyRoutes.md b/api/@aastar/airaccount/interfaces/PasskeyRoutes.md new file mode 100644 index 000000000..43b41892a --- /dev/null +++ b/api/@aastar/airaccount/interfaces/PasskeyRoutes.md @@ -0,0 +1,78 @@ +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L21) + +Configurable backend routes for the passkey (WebAuthn) flows. + +These default paths are the standardized contract served by AAStar's +`@aastar/passkey-server` (any compatible RP exposing the same endpoints). +They are NOT specific to any single backend. Consumers pointing at a +different backend can override individual paths without changing code. + +## Properties + +### deviceBegin + +> **deviceBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L31) + +POST — begin adding a new device (passkey). Default: `/auth/device/passkey/begin` + +*** + +### deviceComplete + +> **deviceComplete**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L33) + +POST — complete adding a new device (passkey). Default: `/auth/device/passkey/complete` + +*** + +### loginBegin + +> **loginBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L27) + +POST — begin passkey login/authentication. Default: `/auth/passkey/login/begin` + +*** + +### loginComplete + +> **loginComplete**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L29) + +POST — complete passkey login/authentication. Default: `/auth/passkey/login/complete` + +*** + +### registerBegin + +> **registerBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L23) + +POST — begin passkey registration. Default: `/auth/passkey/register/begin` + +*** + +### registerComplete + +> **registerComplete**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L25) + +POST — complete passkey registration. Default: `/auth/passkey/register/complete` + +*** + +### transactionVerifyBegin + +> **transactionVerifyBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L35) + +POST — begin transaction verification. Default: `/auth/transaction/verify/begin` diff --git a/api/@aastar/airaccount/interfaces/PreCheckResult.md b/api/@aastar/airaccount/interfaces/PreCheckResult.md new file mode 100644 index 000000000..ae80bc10c --- /dev/null +++ b/api/@aastar/airaccount/interfaces/PreCheckResult.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/core/tier/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L38) + +## Properties + +### algId + +> **algId**: [`AlgId`](../type-aliases/AlgId.md) + +Defined in: [packages/airaccount/src/core/tier/types.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L42) + +*** + +### errors + +> **errors**: `string`[] + +Defined in: [packages/airaccount/src/core/tier/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L40) + +*** + +### ok + +> **ok**: `boolean` + +Defined in: [packages/airaccount/src/core/tier/types.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L39) + +*** + +### tier + +> **tier**: [`TierLevel`](../type-aliases/TierLevel.md) + +Defined in: [packages/airaccount/src/core/tier/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L41) diff --git a/api/@aastar/airaccount/interfaces/TierConfig.md b/api/@aastar/airaccount/interfaces/TierConfig.md new file mode 100644 index 000000000..12dacfca5 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/TierConfig.md @@ -0,0 +1,21 @@ +Defined in: [packages/airaccount/src/core/tier/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L20) + +## Properties + +### tier1Limit + +> **tier1Limit**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L22) + +Max value for Tier 1 (single ECDSA/Passkey). 0 = no enforcement. + +*** + +### tier2Limit + +> **tier2Limit**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L24) + +Max value for Tier 2 (P256 + BLS). 0 = no enforcement. diff --git a/api/@aastar/airaccount/interfaces/TransactionVerificationParams.md b/api/@aastar/airaccount/interfaces/TransactionVerificationParams.md new file mode 100644 index 000000000..c6e425a27 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/TransactionVerificationParams.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L11) + +## Properties + +### data? + +> `optional` **data**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L14) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L12) + +*** + +### value? + +> `optional` **value**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L13) diff --git a/api/@aastar/airaccount/interfaces/UserOperation.md b/api/@aastar/airaccount/interfaces/UserOperation.md new file mode 100644 index 000000000..60ea9cd64 --- /dev/null +++ b/api/@aastar/airaccount/interfaces/UserOperation.md @@ -0,0 +1,89 @@ +Defined in: [packages/airaccount/src/core/types/index.ts:1](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L1) + +## Properties + +### callData + +> **callData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L5) + +*** + +### callGasLimit + +> **callGasLimit**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L6) + +*** + +### initCode + +> **initCode**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L4) + +*** + +### maxFeePerGas + +> **maxFeePerGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L9) + +*** + +### maxPriorityFeePerGas + +> **maxPriorityFeePerGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L10) + +*** + +### nonce + +> **nonce**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L3) + +*** + +### paymasterAndData + +> **paymasterAndData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L11) + +*** + +### preVerificationGas + +> **preVerificationGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L8) + +*** + +### sender + +> **sender**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:2](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L2) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L12) + +*** + +### verificationGasLimit + +> **verificationGasLimit**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L7) diff --git a/api/@aastar/airaccount/server/classes/AccountManager.md b/api/@aastar/airaccount/server/classes/AccountManager.md new file mode 100644 index 000000000..a56f5dd6f --- /dev/null +++ b/api/@aastar/airaccount/server/classes/AccountManager.md @@ -0,0 +1,237 @@ +Defined in: [packages/airaccount/src/server/services/account-manager.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L22) + +Account manager — extracted from NestJS AccountService. +Creates and retrieves smart accounts without framework dependencies. + +## Constructors + +### Constructor + +> **new AccountManager**(`ethereum`, `storage`, `signer`, `logger?`): `AccountManager` + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ethereum` | [`EthereumProvider`](EthereumProvider.md) | +| `storage` | [`IStorageAdapter`](../interfaces/IStorageAdapter.md) | +| `signer` | [`ISignerAdapter`](../interfaces/ISignerAdapter.md) | +| `logger?` | [`ILogger`](../interfaces/ILogger.md) | + +#### Returns + +`AccountManager` + +## Methods + +### buildGuardianAcceptanceHash() + +> **buildGuardianAcceptanceHash**(`owner`, `salt`, `factoryAddress`, `chainId`, `dailyLimit`): `string` + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L179) + +Build the acceptance hash that guardian devices must sign before account creation. + +Encoding: keccak256(solidityPacked( + ["string","uint256","address","address","uint256","uint256"], + ["ACCEPT_GUARDIAN", chainId, factoryAddress, owner, salt, dailyLimit] +)) + +dailyLimit is bound in the hash (PR #47 / C-3) to prevent a front-runner from +replaying guardian sigs with a weaker limit on the same counterfactual address. + +Returns the RAW keccak256 hash (no EIP-191 prefix). +Guardians MUST sign via personal_sign / ethers.signMessage(ethers.getBytes(hash)). +Do NOT use eth_sign — the EIP-191 "\x19Ethereum Signed Message:\n32" prefix +is applied inside the contract (toEthSignedMessageHash) before ecrecover, not here. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `owner` | `string` | +| `salt` | `number` \| `bigint` | +| `factoryAddress` | `string` | +| `chainId` | `number` | +| `dailyLimit` | `bigint` | + +#### Returns + +`string` + +raw hex keccak256 hash — encode this into the QR code shown to guardian devices + +*** + +### createAccount() + +> **createAccount**(`userId`, `options?`): `Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md)\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L34) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `userId` | `string` | - | +| `options?` | \{ `dailyLimit?`: `bigint`; `entryPointVersion?`: [`EntryPointVersion`](../enumerations/EntryPointVersion.md); `salt?`: `number` \| `bigint`; \} | - | +| `options.dailyLimit?` | `bigint` | Daily transfer limit in wei. When > 0 the account is created with on-chain guard enforcement. | +| `options.entryPointVersion?` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | - | +| `options.salt?` | `number` \| `bigint` | - | + +#### Returns + +`Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md)\> + +*** + +### createAccountWithGuardians() + +> **createAccountWithGuardians**(`userId`, `params`): `Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md)\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:234](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L234) + +Create an AirAccount with 3 on-chain guardians: + - guardian1 and guardian2: user's own devices (passkeys on phone 1 and phone 2) + - guardian3: team Safe multisig (defaultCommunityGuardian, set in factory at deploy time) + +Both guardian1 and guardian2 must sign the acceptance hash produced by +buildGuardianAcceptanceHash() before this method is called. + +Recovery: any 2-of-3 guardians can initiate social recovery after a 48h timelock. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `params` | \{ `dailyLimit`: `bigint`; `entryPointVersion?`: [`EntryPointVersion`](../enumerations/EntryPointVersion.md); `guardian1`: `string`; `guardian1Sig`: `string`; `guardian2`: `string`; `guardian2Sig`: `string`; `salt?`: `number` \| `bigint`; \} | +| `params.dailyLimit` | `bigint` | +| `params.entryPointVersion?` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | +| `params.guardian1` | `string` | +| `params.guardian1Sig` | `string` | +| `params.guardian2` | `string` | +| `params.guardian2Sig` | `string` | +| `params.salt?` | `number` \| `bigint` | + +#### Returns + +`Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md)\> + +*** + +### encodeModifyTierLimits() + +> **encodeModifyTierLimits**(`tier1`, `tier2`, `deadline`, `guardianSigs`): `string` + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:211](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L211) + +Encode calldata for modifyTierLimitsWithGuardians() — guardian-gated tier-limit change (PR #43). + +Both tier1 and tier2 can be raised or lowered, subject to guardian approval. +Caller is responsible for building and submitting the resulting UserOp. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `tier1` | `bigint` | New Tier-1 ceiling in wei (ECDSA-only spending; 0 = no limit) | +| `tier2` | `bigint` | New Tier-2 ceiling in wei (dual-factor; 0 = no limit) | +| `deadline` | `bigint` | Unix timestamp — guardian sigs rejected after this | +| `guardianSigs` | `string`[] | 65-byte EIP-191 hex signatures from required guardians | + +#### Returns + +`string` + +*** + +### getAccount() + +> **getAccount**(`userId`): `Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md) & `object` \| `null`\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L112) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md) & `object` \| `null`\> + +*** + +### getAccountAddress() + +> **getAccountAddress**(`userId`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L131) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getAccountBalance() + +> **getAccountBalance**(`userId`): `Promise`\<\{ `address`: `string`; `balance`: `string`; `balanceInWei`: `string`; \}\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L137) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<\{ `address`: `string`; `balance`: `string`; `balanceInWei`: `string`; \}\> + +*** + +### getAccountByUserId() + +> **getAccountByUserId**(`userId`): `Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L157) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md) \| `null`\> + +*** + +### getAccountNonce() + +> **getAccountNonce**(`userId`): `Promise`\<\{ `address`: `string`; `nonce`: `string`; \}\> + +Defined in: [packages/airaccount/src/server/services/account-manager.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/account-manager.ts#L150) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<\{ `address`: `string`; `nonce`: `string`; \}\> diff --git a/api/@aastar/airaccount/server/classes/AgentRegistryService.md b/api/@aastar/airaccount/server/classes/AgentRegistryService.md new file mode 100644 index 000000000..161ad0390 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/AgentRegistryService.md @@ -0,0 +1,494 @@ +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L83) + +AgentRegistryService — typed wrappers for the AAStar AgentRegistry contract plus the +AAStarAirAccountFactoryV7 agent-account creation helpers. + +**Two contracts, two responsibilities:** + +1. AgentRegistry (constructor `registryAddress`) — the canonical map of agent wallet → + human owner used by SuperPaymaster to authorise gasless sponsorship. The factory calls + `markValid`/registers the agent at deployment; humans manage the binding afterwards via + `registerAgent` / `revokeAgent` / `deregisterAgent`. + +2. AAStarAirAccountFactoryV7 — deploys an agent-owned AirAccount. `encodeCreateAgentAccount` + targets the factory (NOT the registry); `getAgentAccountAddress` predicts the CREATE2 + address before deployment. + +All `encode*` methods return ABI-encoded calldata ready for a UserOp (gasless) or a direct +owner transaction. Read methods require a viem `PublicClient`. + +## Constructors + +### Constructor + +> **new AgentRegistryService**(`client`, `registryAddress`): `AgentRegistryService` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L90) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | viem PublicClient for on-chain reads (e.g. `ethereum.getProvider()`). | +| `client.account` | `undefined` | The Account of the Client. | +| `client.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `client.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `client.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `client.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `client.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `client.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `client.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `client.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `client.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `client.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `client.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `client.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `client.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `client.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `client.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `client.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `client.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `client.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `client.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `client.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `client.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `client.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `client.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `client.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `client.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `client.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `client.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `client.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `client.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `client.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `client.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `client.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `client.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `client.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.key` | `string` | A key for the client. | +| `client.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `client.name` | `string` | A name for the client. | +| `client.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `client.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `client.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `client.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `client.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `client.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `client.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `client.type` | `string` | The type of client. | +| `client.uid` | `string` | A unique ID for the client. | +| `client.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `client.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `client.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `client.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `client.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `client.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `client.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `client.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `client.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `client.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `registryAddress` | `string` | deployed AgentRegistry contract address. | + +#### Returns + +`AgentRegistryService` + +## Methods + +### agentWalletOwner() + +> **agentWalletOwner**(`agentWallet`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:255](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L255) + +Raw `agentWalletOwner` mapping read (agentWallet → owner). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### encodeCreateAgentAccount() + +> **encodeCreateAgentAccount**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L283) + +Encode calldata for the factory's `createAgentAccount(...)`. + +Targets the AAStarAirAccountFactoryV7, NOT the AgentRegistry. The factory deploys the agent +AirAccount and registers it in the bound AgentRegistry in one transaction. Submit this +calldata to the factory address (direct tx or via a relayer). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`CreateAgentAccountParams`](../interfaces/CreateAgentAccountParams.md) | + +#### Returns + +`string` + +*** + +### encodeDeregisterAgent() + +> **encodeDeregisterAgent**(`agentWallet`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L162) + +Encode calldata for `deregisterAgent(agentWallet)`. + +Removes the agent wallet from the registry (full deregistration, distinct from the +lighter-weight `revokeAgent`). Caller must be the agent's human owner. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | + +#### Returns + +`string` + +*** + +### encodeRegisterAgent() + +> **encodeRegisterAgent**(`agentWallet`, `agentWalletSig`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L134) + +Encode calldata for `registerAgent(agentWallet, agentWalletSig)`. + +Binds `agentWallet` to the caller (the human owner). `agentWalletSig` must be the agent +wallet's EIP-191 signature proving control of the key. Reverts with +`SelfRegistrationForbidden` if the caller registers itself, or `AgentAlreadyRegistered` +if the wallet is already bound. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | +| `agentWalletSig` | `string` | + +#### Returns + +`string` + +*** + +### encodeRegisterAgentViaAccount() + +> **encodeRegisterAgentViaAccount**(`agentWallet`, `agentWalletSig`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L103) + +Encode `account.execute(registry, 0, registerAgent(agentWallet, agentWalletSig))`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | +| `agentWalletSig` | `string` | + +#### Returns + +`string` + +*** + +### encodeRevokeAgent() + +> **encodeRevokeAgent**(`agentWallet`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L148) + +Encode calldata for `revokeAgent(agentWallet)`. + +Owner-initiated revocation of a previously registered agent wallet. Caller must be the +agent's human owner (else `NotAgentOwner`). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | + +#### Returns + +`string` + +*** + +### encodeRevokeAgentViaAccount() + +> **encodeRevokeAgentViaAccount**(`agentWallet`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L116) + +Encode `account.execute(registry, 0, revokeAgent(agentWallet))`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | + +#### Returns + +`string` + +*** + +### encodeSetAgentRegistry() + +> **encodeSetAgentRegistry**(`agentRegistry`): `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:302](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L302) + +Encode calldata for the factory's `setAgentRegistry(_agentRegistry)` (factory-admin only). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentRegistry` | `string` | + +#### Returns + +`string` + +*** + +### getAgentAccountAddress() + +> **getAgentAccountAddress**(`factoryAddress`, `humanOwner`, `agentKey`, `agentId`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:318](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L318) + +Predict the CREATE2 address of an agent account via the factory's `getAgentAddress(...)`. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `factoryAddress` | `string` | AAStarAirAccountFactoryV7 address. | +| `humanOwner` | `string` | the human guardian/owner co-owning the agent account. | +| `agentKey` | `string` | the agent's signing key. | +| `agentId` | `string` | the bytes32 agent identifier. | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getAgentByIndex() + +> **getAgentByIndex**(`owner`, `index`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:215](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L215) + +The agent wallet at `index` in `owner`'s agent list. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `owner` | `string` | +| `index` | `number` \| `bigint` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getAgentCount() + +> **getAgentCount**(`owner`): `Promise`\<`bigint`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:203](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L203) + +Number of agents registered under `owner`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `owner` | `string` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getAgents() + +> **getAgents**(`humanOwner`): `Promise`\<`string`[]\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L225) + +Full list of agent wallets registered under `humanOwner`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `humanOwner` | `string` | + +#### Returns + +`Promise`\<`string`[]\> + +*** + +### getAgentsPage() + +> **getAgentsPage**(`owner`, `start`, `count`): `Promise`\<`string`[]\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:240](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L240) + +Paginated slice of `owner`'s agent wallets: `count` entries starting at `start`. +The contract clamps `count` to the remaining length, so the returned array may be shorter. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `owner` | `string` | +| `start` | `number` \| `bigint` | +| `count` | `number` \| `bigint` | + +#### Returns + +`Promise`\<`string`[]\> + +*** + +### getFactoryAgentRegistry() + +> **getFactoryAgentRegistry**(`factoryAddress`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:333](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L333) + +Read the AgentRegistry address currently bound to the factory. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `factoryAddress` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getHumanOwner() + +> **getHumanOwner**(`agentWallet`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L193) + +The human owner bound to `agentWallet` (ZeroAddress if unregistered). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### isRegisteredAgent() + +> **isRegisteredAgent**(`agentWallet`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L173) + +Whether `agentWallet` is currently registered in the registry. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `agentWallet` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isValidAccount() + +> **isValidAccount**(`account`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L183) + +Whether `account` has been marked valid (e.g. an AirAccount minted by the bound factory). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ownerAgents() + +> **ownerAgents**(`owner`, `index`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L265) + +Raw `ownerAgents` array read (owner, index → agentWallet). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `owner` | `string` | +| `index` | `number` \| `bigint` | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/airaccount/server/classes/AirAccountServerClient.md b/api/@aastar/airaccount/server/classes/AirAccountServerClient.md new file mode 100644 index 000000000..175f58805 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/AirAccountServerClient.md @@ -0,0 +1,101 @@ +Defined in: [packages/airaccount/src/server/server-client.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L37) + +Main facade for the YAAA Server SDK. +Wires all services together from a single config object. + +## Example + +```ts +import { AirAccountServerClient, MemoryStorage, LocalWalletSigner } from '@aastar/airaccount/server'; + +const client = new AirAccountServerClient({ + rpcUrl: 'https://sepolia.infura.io/v3/...', + bundlerRpcUrl: 'https://api.pimlico.io/v2/11155111/rpc?apikey=...', + chainId: 11155111, + entryPoints: { + v06: { + entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', + factoryAddress: '0x...', + validatorAddress: '0x...', + }, + }, + storage: new MemoryStorage(), + signer: new LocalWalletSigner('0xPRIVATE_KEY'), +}); + +const account = await client.accounts.createAccount('user-123'); +``` + +## Constructors + +### Constructor + +> **new AirAccountServerClient**(`config`): `AirAccountServerClient` + +Defined in: [packages/airaccount/src/server/server-client.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L46) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ServerConfig`](../interfaces/ServerConfig.md) | + +#### Returns + +`AirAccountServerClient` + +## Properties + +### accounts + +> `readonly` **accounts**: [`AccountManager`](AccountManager.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L39) + +*** + +### bls + +> `readonly` **bls**: [`BLSSignatureService`](BLSSignatureService.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L41) + +*** + +### ethereum + +> `readonly` **ethereum**: [`EthereumProvider`](EthereumProvider.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L38) + +*** + +### paymaster + +> `readonly` **paymaster**: [`PaymasterManager`](PaymasterManager.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L42) + +*** + +### tokens + +> `readonly` **tokens**: [`TokenService`](TokenService.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L43) + +*** + +### transfers + +> `readonly` **transfers**: [`TransferManager`](TransferManager.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L40) + +*** + +### wallets + +> `readonly` **wallets**: [`WalletManager`](WalletManager.md) + +Defined in: [packages/airaccount/src/server/server-client.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L44) diff --git a/api/@aastar/airaccount/server/classes/BLSSignatureService.md b/api/@aastar/airaccount/server/classes/BLSSignatureService.md new file mode 100644 index 000000000..bd3383bb3 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/BLSSignatureService.md @@ -0,0 +1,106 @@ +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L70) + +BLS signature service — extracted from NestJS BlsService. +Uses lazy initialization instead of onModuleInit. + +## Constructors + +### Constructor + +> **new BLSSignatureService**(`config`, `ethereum`, `storage`, `signer`, `logger?`): `BLSSignatureService` + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L74) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ServerConfig`](../interfaces/ServerConfig.md) | +| `ethereum` | [`EthereumProvider`](EthereumProvider.md) | +| `storage` | [`IStorageAdapter`](../interfaces/IStorageAdapter.md) | +| `signer` | [`ISignerAdapter`](../interfaces/ISignerAdapter.md) | +| `logger?` | [`ILogger`](../interfaces/ILogger.md) | + +#### Returns + +`BLSSignatureService` + +## Methods + +### generateBLSSignature() + +> **generateBLSSignature**(`userId`, `userOpHash`, `ctx?`): `Promise`\<[`BLSSignatureData`](../../interfaces/BLSSignatureData.md)\> + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L115) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `userOpHash` | `string` | +| `ctx?` | [`PasskeyAssertionContext`](../interfaces/PasskeyAssertionContext.md) | + +#### Returns + +`Promise`\<[`BLSSignatureData`](../../interfaces/BLSSignatureData.md)\> + +*** + +### generateTieredSignature() + +> **generateTieredSignature**(`params`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:250](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L250) + +Generate a tiered signature based on the required tier level. + +- Tier 1: raw 65-byte ECDSA (no algId prefix, backwards-compat) +- Tier 2: algId 0x04 — P256 + BLS aggregate + messagePoint ECDSA +- Tier 3: algId 0x05 — P256 + BLS + messagePoint ECDSA + Guardian ECDSA + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `ctx?`: [`PasskeyAssertionContext`](../interfaces/PasskeyAssertionContext.md); `guardianSigner?`: `GuardianSigner`; `p256Signature?`: `string`; `tier`: [`TierLevel`](../../type-aliases/TierLevel.md); `userId`: `string`; `userOpHash`: `string`; \} | +| `params.ctx?` | [`PasskeyAssertionContext`](../interfaces/PasskeyAssertionContext.md) | +| `params.guardianSigner?` | `GuardianSigner` | +| `params.p256Signature?` | `string` | +| `params.tier` | [`TierLevel`](../../type-aliases/TierLevel.md) | +| `params.userId` | `string` | +| `params.userOpHash` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getActiveSignerNodes() + +> **getActiveSignerNodes**(): `Promise`\<`unknown`[]\> + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L100) + +#### Returns + +`Promise`\<`unknown`[]\> + +*** + +### packSignature() + +> **packSignature**(`blsData`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L229) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `blsData` | [`BLSSignatureData`](../../interfaces/BLSSignatureData.md) | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/airaccount/server/classes/ConsoleLogger.md b/api/@aastar/airaccount/server/classes/ConsoleLogger.md new file mode 100644 index 000000000..adddc40da --- /dev/null +++ b/api/@aastar/airaccount/server/classes/ConsoleLogger.md @@ -0,0 +1,117 @@ +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L15) + +Default console logger used when no custom logger is provided. + +## Implements + +- [`ILogger`](../interfaces/ILogger.md) + +## Constructors + +### Constructor + +> **new ConsoleLogger**(`prefix`): `ConsoleLogger` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L16) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `prefix` | `string` | `"[YAAA]"` | + +#### Returns + +`ConsoleLogger` + +## Methods + +### debug() + +> **debug**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`debug`](../interfaces/ILogger.md#debug) + +*** + +### error() + +> **error**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`error`](../interfaces/ILogger.md#error) + +*** + +### log() + +> **log**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L22) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`log`](../interfaces/ILogger.md#log) + +*** + +### warn() + +> **warn**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`warn`](../interfaces/ILogger.md#warn) diff --git a/api/@aastar/airaccount/server/classes/DvtPendingConfirmationError.md b/api/@aastar/airaccount/server/classes/DvtPendingConfirmationError.md new file mode 100644 index 000000000..fc0c74e21 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/DvtPendingConfirmationError.md @@ -0,0 +1,155 @@ +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L36) + +Raised when a DVT node (aNode YetAnotherAA-Validator ≥ v1.3.0, running with +`CONFIRM_ENABLED=true`) withholds its co-signature on a high-value op pending +out-of-band approval. The node returns `{ status: "pending_confirmation", +userOpHash }` instead of a signature; the withheld co-sign is released by +`POST /signature/confirm { userOpHash, token }` once the user approves over an +independent channel (single-use token, TTL, fail-closed). The SDK surfaces this +as a typed error rather than silently dropping the node so callers can drive the +confirm flow. Default-off nodes never emit this (behaviour == v1.2.0). + +## Extends + +- `Error` + +## Constructors + +### Constructor + +> **new DvtPendingConfirmationError**(`userOpHash`, `nodeEndpoint`): `DvtPendingConfirmationError` + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L37) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOpHash` | `string` | +| `nodeEndpoint` | `string` | + +#### Returns + +`DvtPendingConfirmationError` + +#### Overrides + +`Error.constructor` + +## Properties + +### message + +> **message**: `string` + +Defined in: node\_modules/.pnpm/typescript@5.6.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +#### Inherited from + +`Error.message` + +*** + +### name + +> **name**: `string` + +Defined in: node\_modules/.pnpm/typescript@5.6.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +#### Inherited from + +`Error.name` + +*** + +### nodeEndpoint + +> `readonly` **nodeEndpoint**: `string` + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L39) + +*** + +### stack? + +> `optional` **stack**: `string` + +Defined in: node\_modules/.pnpm/typescript@5.6.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 + +#### Inherited from + +`Error.stack` + +*** + +### userOpHash + +> `readonly` **userOpHash**: `string` + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L38) + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Defined in: node\_modules/.pnpm/@types+node@20.11.5/node\_modules/@types/node/globals.d.ts:28 + +Optional override for formatting stack traces + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +Defined in: node\_modules/.pnpm/@types+node@20.11.5/node\_modules/@types/node/globals.d.ts:30 + +#### Inherited from + +`Error.stackTraceLimit` + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/.pnpm/@types+node@20.11.5/node\_modules/@types/node/globals.d.ts:21 + +Create .stack property on a target object + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` diff --git a/api/@aastar/airaccount/server/classes/EIP7702DelegateService.md b/api/@aastar/airaccount/server/classes/EIP7702DelegateService.md new file mode 100644 index 000000000..6e1b01223 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/EIP7702DelegateService.md @@ -0,0 +1,302 @@ +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L79) + +EIP7702DelegateService — Path A: SDK payload construction for AirAccountDelegate. + +Path A applies when the integrator controls the private key (KMS, server-side signer, +embedded wallet). The EOA signs a SET_CODE authorization offline; the integrator's relay +submits a Type-4 transaction to activate the delegation. + +This service does NOT submit transactions — it produces signed payloads for relay. + +Deployed address: AirAccountDelegate singleton at AIR_ACCOUNT_DELEGATE_ADDRESS (Sepolia). +The user's EOA address does NOT change — only its bytecode pointer changes to 0xef0100||addr. + +Usage: + 1. Build SET_CODE authorization payload (call signer.signAuthorization externally — viem) + 2. Build initialize() calldata for the first UserOp / direct tx + 3. Submit both via integrator's relay + +## Constructors + +### Constructor + +> **new EIP7702DelegateService**(`delegateAddress`, `client?`): `EIP7702DelegateService` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L85) + +#### Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `delegateAddress` | `string` | `AIR_ACCOUNT_DELEGATE_ADDRESS` | - | +| `client?` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | `undefined` | - | +| `client.account?` | `undefined` | `undefined` | The Account of the Client. | +| `client.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | `undefined` | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | `undefined` | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime?` | `number` | `undefined` | Time (in ms) that cached data will remain in memory. | +| `client.call?` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | `undefined` | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | Chain for the client. | +| `client.createAccessList?` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | `undefined` | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.createBlockFilter?` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | `undefined` | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `client.createContractEventFilter?` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | `undefined` | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `client.createEventFilter?` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | `undefined` | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `client.createPendingTransactionFilter?` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | `undefined` | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `client.estimateContractGas?` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | `undefined` | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `client.estimateFeesPerGas?` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | `undefined` | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `client.estimateGas?` | (`args`) => `Promise`\<`bigint`\> | `undefined` | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.estimateMaxPriorityFeePerGas?` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | `undefined` | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `client.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | `undefined` | Default block tag to use for RPC requests. | +| `client.extend?` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | `undefined` | - | +| `client.fillTransaction?` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | `undefined` | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.getBalance?` | (`args`) => `Promise`\<`bigint`\> | `undefined` | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `client.getBlobBaseFee?` | () => `Promise`\<`bigint`\> | `undefined` | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `client.getBlock?` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | `undefined` | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `client.getBlockNumber?` | (`args?`) => `Promise`\<`bigint`\> | `undefined` | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `client.getBlockTransactionCount?` | (`args?`) => `Promise`\<`number`\> | `undefined` | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `client.getBytecode?` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | **Deprecated** Use `getCode` instead. | +| `client.getChainId?` | () => `Promise`\<`number`\> | `undefined` | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `client.getCode?` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `client.getContractEvents?` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | `undefined` | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `client.getEip712Domain?` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `client.getEnsAddress?` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `client.getEnsAvatar?` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `client.getEnsName?` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `client.getEnsResolver?` | (`args`) => `Promise`\<`` `0x${string}` ``\> | `undefined` | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `client.getEnsText?` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `client.getFeeHistory?` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `client.getFilterChanges?` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | `undefined` | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `client.getFilterLogs?` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | `undefined` | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `client.getGasPrice?` | () => `Promise`\<`bigint`\> | `undefined` | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `client.getLogs?` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | `undefined` | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `client.getProof?` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `client.getStorageAt?` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | `undefined` | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `client.getTransaction?` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | `undefined` | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionConfirmations?` | (`args`) => `Promise`\<`bigint`\> | `undefined` | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionCount?` | (`args`) => `Promise`\<`number`\> | `undefined` | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.getTransactionReceipt?` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | `undefined` | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.key?` | `string` | `undefined` | A key for the client. | +| `client.multicall?` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | `undefined` | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `client.name?` | `string` | `undefined` | A name for the client. | +| `client.pollingInterval?` | `number` | `undefined` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest?` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | `undefined` | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `client.readContract?` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | `undefined` | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `client.request?` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | `undefined` | Request function wrapped with friendly error handling | +| `client.sendRawTransaction?` | (`args`) => `Promise`\<`` `0x${string}` ``\> | `undefined` | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.sendRawTransactionSync?` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | `undefined` | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.simulate?` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | `undefined` | **Deprecated** Use `simulateBlocks` instead. | +| `client.simulateBlocks?` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | `undefined` | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `client.simulateCalls?` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | `undefined` | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `client.simulateContract?` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | `undefined` | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.transport?` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | `undefined` | The RPC transport | +| `client.type?` | `string` | `undefined` | The type of client. | +| `client.uid?` | `string` | `undefined` | A unique ID for the client. | +| `client.uninstallFilter?` | (`args`) => `Promise`\<`boolean`\> | `undefined` | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `client.verifyHash?` | (`args`) => `Promise`\<`boolean`\> | `undefined` | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `client.verifyMessage?` | (`args`) => `Promise`\<`boolean`\> | `undefined` | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `client.verifySiweMessage?` | (`args`) => `Promise`\<`boolean`\> | `undefined` | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `client.verifyTypedData?` | (`args`) => `Promise`\<`boolean`\> | `undefined` | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `client.waitForTransactionReceipt?` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | `undefined` | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.watchBlockNumber?` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | `undefined` | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `client.watchBlocks?` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | `undefined` | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `client.watchContractEvent?` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | `undefined` | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `client.watchEvent?` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | `undefined` | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `client.watchPendingTransactions?` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | `undefined` | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | + +#### Returns + +`EIP7702DelegateService` + +## Methods + +### buildAuthorization() + +> **buildAuthorization**(`chainId`, `nonce`, `signature`): [`EIP7702Authorization`](../interfaces/EIP7702Authorization.md) + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L161) + +Build the full EIP-7702 authorization object for relay submission. +The caller must sign `buildAuthorizationHash()` externally and pass the result here. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `chainId` | `number` | Target chain ID | +| `nonce` | `bigint` | EOA's current nonce | +| `signature` | `string` | 65-byte ECDSA signature (R||S||V) over the authorization hash | + +#### Returns + +[`EIP7702Authorization`](../interfaces/EIP7702Authorization.md) + +*** + +### buildAuthorizationHash() + +> **buildAuthorizationHash**(`chainId`, `nonce`): `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L149) + +Compute the EIP-7702 SET_CODE authorization hash that the EOA must sign. + +Hash = keccak256(0x05 || RLP([chainId, address, nonce])) + +This is the hash the private key signs to delegate code execution to +AirAccountDelegate. Use this hash with your KMS sign-hash endpoint or +local viem account. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `chainId` | `number` | Target chain ID (11155111 for Sepolia) | +| `nonce` | `bigint` | EOA's current transaction nonce | + +#### Returns + +`string` + +32-byte hash (0x-prefixed) ready for signing + +*** + +### encodeExecute() + +> **encodeExecute**(`dest`, `value`, `data`): `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L114) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `dest` | `string` | +| `value` | `bigint` | +| `data` | `string` | + +#### Returns + +`string` + +*** + +### encodeExecuteBatch() + +> **encodeExecuteBatch**(`dests`, `values`, `datas`): `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L122) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `dests` | `string`[] | +| `values` | `bigint`[] | +| `datas` | `string`[] | + +#### Returns + +`string` + +*** + +### encodeInitialize() + +> **encodeInitialize**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L100) + +Encode initialize() calldata for the first post-delegation UserOp. +Must be the callData of a UserOp sent immediately after the SET_CODE delegation activates. +Guardian acceptance sigs follow the same EIP-712 scheme as AirAccountV7 createAccount. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`DelegateInitParams`](../interfaces/DelegateInitParams.md) | + +#### Returns + +`string` + +*** + +### getGuardians() + +> **getGuardians**(`eoa`): `Promise`\<\[`string`, `string`, `string`\]\> + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:215](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L215) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `eoa` | `string` | + +#### Returns + +`Promise`\<\[`string`, `string`, `string`\]\> + +*** + +### getOwner() + +> **getOwner**(`eoa`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L206) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `eoa` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### isInitialized() + +> **isInitialized**(`eoa`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L197) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `eoa` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### verifyAuthorization() + +> **verifyAuthorization**(`eoa`, `chainId`, `nonce`, `signature`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:180](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L180) + +Verify that a signature is a valid EIP-7702 authorization for the given EOA address. +Recovers the signer from the authorization hash and checks it matches `eoa`. + +NOTE: now async — viem's `recoverAddress` is asynchronous (ethers' was sync). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `eoa` | `string` | +| `chainId` | `number` | +| `nonce` | `bigint` | +| `signature` | `string` | + +#### Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/airaccount/server/classes/ERC8004Service.md b/api/@aastar/airaccount/server/classes/ERC8004Service.md new file mode 100644 index 000000000..8e9915f1e --- /dev/null +++ b/api/@aastar/airaccount/server/classes/ERC8004Service.md @@ -0,0 +1,276 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L123) + +ERC8004Service — TypeScript wrappers for AirAccount's ERC-8004 "Trustless Agents" functions. + +**Two distinct registration paths:** + +1. `encodeSetAgentWallet` — AAStar/SuperPaymaster path. + Registers the agent wallet in the AAStar AgentRegistry contract. Use this when you want + SuperPaymaster to recognise the agent for gasless sponsorship. The `agentRegistry` argument + is the deployed AgentRegistry address, NOT the official ERC-8004 IdentityRegistry. + +2. `encodeMintAgentIdentity` + `encodeBindERC8004AgentWallet` — official ERC-8004 path. + Mints an ERC-721 identity NFT in the official ERC-8004 IdentityRegistry and binds an + execution wallet to it. The registry address MUST be from `erc8004AddressesForChain()`. + These calls revert on-chain if the wrong registry address is supplied. + +All `encode*` methods return ABI-encoded calldata ready to be submitted via UserOp (gasless) +or a direct owner transaction. The calldata targets the AirAccount address — the account's +fallback delegates to AirAccountExtension for these selectors. + +## Constructors + +### Constructor + +> **new ERC8004Service**(`provider?`): `ERC8004Service` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L127) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider?` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account?` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime?` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call?` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList?` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter?` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter?` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter?` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter?` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas?` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas?` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas?` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas?` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend?` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction?` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance?` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee?` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock?` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber?` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount?` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode?` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId?` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode?` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents?` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain?` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress?` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar?` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName?` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver?` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText?` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory?` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges?` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs?` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice?` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs?` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof?` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt?` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction?` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations?` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount?` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt?` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key?` | `string` | A key for the client. | +| `provider.multicall?` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name?` | `string` | A name for the client. | +| `provider.pollingInterval?` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest?` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract?` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request?` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction?` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync?` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate?` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks?` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls?` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract?` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport?` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type?` | `string` | The type of client. | +| `provider.uid?` | `string` | A unique ID for the client. | +| `provider.uninstallFilter?` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash?` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage?` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage?` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData?` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt?` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber?` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks?` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent?` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent?` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions?` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | + +#### Returns + +`ERC8004Service` + +## Methods + +### encodeBindERC8004AgentWallet() + +> **encodeBindERC8004AgentWallet**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L197) + +Encode calldata for `bindERC8004AgentWallet`. + +Binds an execution wallet to an existing ERC-8004 agent identity NFT. Requires a +deadline-bounded signature from the expected signer (see the IdentityRegistry contract). +The `identityRegistry` must be the official chain-specific address. + +Callable: owner EOA direct tx OR via UserOp (gasless). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`BindERC8004AgentWalletParams`](../interfaces/BindERC8004AgentWalletParams.md) | + +#### Returns + +`string` + +*** + +### encodeMintAgentIdentity() + +> **encodeMintAgentIdentity**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:180](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L180) + +Encode calldata for `mintAgentIdentity`. + +Mints an ERC-721 agent identity NFT in the official ERC-8004 IdentityRegistry and returns +the new `agentId` (decoded from the tx receipt). The `identityRegistry` must be +`erc8004AddressesForChain(chainId).identityRegistry` — the contract reverts otherwise. + +Callable: owner EOA direct tx OR via UserOp (gasless). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`MintAgentIdentityParams`](../interfaces/MintAgentIdentityParams.md) | + +#### Returns + +`string` + +*** + +### encodeQueryAgentReputation() + +> **encodeQueryAgentReputation**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:262](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L262) + +Encode calldata for `queryAgentReputation` (for static-call or eth_call without a signer). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`QueryAgentReputationParams`](../interfaces/QueryAgentReputationParams.md) | + +#### Returns + +`string` + +*** + +### encodeSetAgentWallet() + +> **encodeSetAgentWallet**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L161) + +Encode calldata for `setAgentWallet`. + +Registers `agentWallet` in the AAStar AgentRegistry (SuperPaymaster-facing). This is the +correct path when the goal is SuperPaymaster gasless sponsorship for the agent. + +**Not** a call to the official ERC-8004 IdentityRegistry. Use `encodeMintAgentIdentity` ++ `encodeBindERC8004AgentWallet` for the ERC-8004 standard path. + +Callable: owner EOA direct tx OR via UserOp (gasless). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`SetAgentWalletParams`](../interfaces/SetAgentWalletParams.md) | + +#### Returns + +`string` + +*** + +### encodeSubmitAgentReputation() + +> **encodeSubmitAgentReputation**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:221](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L221) + +Encode calldata for `submitAgentReputation`. + +Submits a reputation feedback entry to the official ERC-8004 ReputationRegistry. +`reputationRegistry` must be `erc8004AddressesForChain(chainId).reputationRegistry`. + +Callable: owner EOA direct tx OR via UserOp (gasless). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`SubmitAgentReputationParams`](../interfaces/SubmitAgentReputationParams.md) | + +#### Returns + +`string` + +*** + +### getAgentExtensionAddress() + +> **getAgentExtensionAddress**(`accountAddress`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:279](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L279) + +Read the agentExtension implementation address from a deployed AirAccount. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### queryAgentReputation() + +> **queryAgentReputation**(`accountAddress`, `params`): `Promise`\<[`AgentReputationSummary`](../interfaces/AgentReputationSummary.md)\> + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:243](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L243) + +Query aggregated reputation for an agent from the official ERC-8004 ReputationRegistry. +Returns `null` when no provider was supplied at construction. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | +| `params` | [`QueryAgentReputationParams`](../interfaces/QueryAgentReputationParams.md) | + +#### Returns + +`Promise`\<[`AgentReputationSummary`](../interfaces/AgentReputationSummary.md)\> diff --git a/api/@aastar/airaccount/server/classes/EthereumProvider.md b/api/@aastar/airaccount/server/classes/EthereumProvider.md new file mode 100644 index 000000000..7fc99baa5 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/EthereumProvider.md @@ -0,0 +1,5510 @@ +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L60) + +Unified Ethereum provider — replaces NestJS EthereumService. +Manages RPC + Bundler clients (viem) and contract interactions. + +## Constructors + +### Constructor + +> **new EthereumProvider**(`config`): `EthereumProvider` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ServerConfig`](../interfaces/ServerConfig.md) | + +#### Returns + +`EthereumProvider` + +## Methods + +### estimateUserOperationGas() + +> **estimateUserOperationGas**(`userOp`, `version`): `Promise`\<\{ `callGasLimit`: `string`; `preVerificationGas`: `string`; `verificationGasLimit`: `string`; \}\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:245](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L245) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `userOp` | `unknown` | `undefined` | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`Promise`\<\{ `callGasLimit`: `string`; `preVerificationGas`: `string`; `verificationGasLimit`: `string`; \}\> + +*** + +### getAccountContract() + +> **getAccountContract**(`address`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L159) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `string` | + +#### Returns + +`ViemContract` + +*** + +### getAgentSessionKeyValidatorContract() + +> **getAgentSessionKeyValidatorContract**(`address`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L167) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `address` | `string` | `AIRACCOUNT_ADDRESSES.sepolia.agentSessionKeyValidatorM7r4` | + +#### Returns + +`ViemContract` + +*** + +### getBalance() + +> **getBalance**(`address`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L185) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getBundlerProvider() + +> **getBundlerProvider**(): `object` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L81) + +Returns the viem PublicClient bound to the bundler RPC (raw .request only). + +#### Returns + +##### account + +> **account**: `undefined` + +The Account of the Client. + +##### batch? + +> `optional` **batch**: `object` + +Flags for batch settings. + +###### batch.multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +###### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +##### cacheTime + +> **cacheTime**: `number` + +Time (in ms) that cached data will remain in memory. + +##### call() + +> **call**: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CallParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +###### Returns + +`Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +The call data. [CallReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +##### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +###### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +##### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) \| `undefined` + +Chain for the client. + +##### createAccessList() + +> **createAccessList**: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +Creates an EIP-2930 access list that you can include in a transaction. + +- Docs: https://viem.sh/docs/actions/public/createAccessList +- JSON-RPC Methods: `eth_createAccessList` + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CreateAccessListParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +###### Returns + +`Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +The call data. [CreateAccessListReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const data = await client.createAccessList({ + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +##### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +###### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Filter. [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +##### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +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). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`CreateContractEventFilterParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> | [CreateContractEventFilterParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateContractEventFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +##### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`CreateEventFilterParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> | [CreateEventFilterParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateEventFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +##### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +###### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +##### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +###### Type Parameters + +| Type Parameter | +| ------ | +| `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateContractGasParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `chain`\> | [EstimateContractGasParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateContractGasReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +##### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `type` *extends* [`FeeValuesType`](https://viem.sh/docs/index.html) | `"eip1559"` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | [`EstimateFeesPerGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `type`\> | + +###### Returns + +`Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +An estimate (in wei) for the fees per gas. [EstimateFeesPerGasReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +##### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [EstimateGasParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateGasReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +##### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `chain`: `chainOverride` \| `null`; \} | +| `args.chain?` | `chainOverride` \| `null` | + +###### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. [EstimateMaxPriorityFeePerGasReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +##### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Default block tag to use for RPC requests. + +##### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +###### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`\>\> | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +###### Returns + +[`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +##### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | + +###### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +##### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetBalanceParameters`](https://viem.sh/docs/index.html) | [GetBalanceParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. [GetBalanceReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +##### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +###### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). [GetBlobBaseFeeReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +##### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockParameters`](https://viem.sh/docs/index.html)\<`includeTransactions`, `blockTag`\> | [GetBlockParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Information about the block. [GetBlockReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +##### getBlockNumber() + +> **getBlockNumber**: (`args?`) => `Promise`\<`bigint`\> + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockNumberParameters`](https://viem.sh/docs/index.html) | [GetBlockNumberParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The number of the block. [GetBlockNumberReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +##### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args?`) => `Promise`\<`number`\> + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetBlockTransactionCountParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`number`\> + +The block transaction count. [GetBlockTransactionCountReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +##### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +###### Deprecated + +Use `getCode` instead. + +##### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +###### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +##### getCode() + +> **getCode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | GetBytecodeParameters | + +###### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +The contract's bytecode. GetBytecodeReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +##### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetContractEventsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | + +###### Returns + +`Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetContractEventsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +##### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetEip712DomainParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +The EIP-712 domain, fields, and extensions. [GetEip712DomainReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +##### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAddressParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | Name to get the address for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS name or `null` if not found. [GetEnsAddressReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +##### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `assetGatewayUrls?`: [`AssetGatewayUrls`](https://viem.sh/docs/index.html); `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAvatarParameters](https://viem.sh/docs/index.html) | +| `args.assetGatewayUrls?` | [`AssetGatewayUrls`](https://viem.sh/docs/index.html) | Gateway urls to resolve IPFS and/or Arweave assets. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Avatar URI or `null` if not found. [GetEnsAvatarReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +##### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsNameParameters](https://viem.sh/docs/index.html) | +| `args.address` | `` `0x${string}` `` | Address to get ENS name for. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Name or `null` if not found. [GetEnsNameReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +##### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `name`: `string`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsResolverParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.name` | `string` | Name to get the address for. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<`` `0x${string}` ``\> + +Address for ENS resolver. [GetEnsResolverReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +##### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `key`: `string`; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsTextParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.key` | `string` | Text record to retrieve. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS resolver. [GetEnsTextReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +##### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFeeHistoryParameters`](https://viem.sh/docs/index.html) | [GetFeeHistoryParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +The gas estimate (in wei). [GetFeeHistoryReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +##### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterChangesParameters`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterChangesParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. [GetFilterChangesReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +###### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +##### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterLogsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterLogsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetFilterLogsReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +###### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +##### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +###### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). [GetGasPriceReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +##### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetLogsParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> | [GetLogsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetLogsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +##### getProof() + +> **getProof**: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetProofParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Proof data. [GetProofReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +##### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetStorageAtParameters`](https://viem.sh/docs/index.html) | [GetStorageAtParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +The value of the storage slot. [GetStorageAtReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +##### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionParameters`](https://viem.sh/docs/index.html)\<`blockTag`\> | [GetTransactionParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +The transaction information. [GetTransactionReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionConfirmationsParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [GetTransactionConfirmationsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. [GetTransactionConfirmationsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetTransactionCountParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. [GetTransactionCountReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +##### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionReceiptParameters`](https://viem.sh/docs/index.html) | [GetTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [GetTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### key + +> **key**: `string` + +A key for the client. + +##### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `contracts` *extends* readonly `unknown`[] | - | +| `allowFailure` *extends* `boolean` | `true` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`MulticallParameters`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\> | [MulticallParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. [MulticallReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +##### name + +> **name**: `string` + +A name for the client. + +##### pollingInterval + +> **pollingInterval**: `number` + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +##### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +###### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +##### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts + +###### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`ReadContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\> | [ReadContractParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. [ReadContractReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +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. + +Internally, 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). + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +##### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> + +Request function wrapped with friendly error handling + +##### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +##### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +##### ~~simulate()~~ + +> **simulate**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +###### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +###### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +###### Deprecated + +Use `simulateBlocks` instead. + +##### simulateBlocks() + +> **simulateBlocks**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls on block(s) with optional block and state overrides. + +###### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +###### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulated blocks. SimulateReturnType + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateBlocks({ + blocks: [{ + blockOverrides: { + number: 69420n, + }, + calls: [{ + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + }], + stateOverrides: [{ + address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + balance: parseEther('10'), + }], + }] +}) +``` + +##### simulateCalls() + +> **simulateCalls**: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls. + +###### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateCallsParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +###### Returns + +`Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Results. [SimulateCallsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateCalls({ + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + calls: [{ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + ] +}) +``` + +##### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SimulateContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | [SimulateContractParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. [SimulateContractReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +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. + +Internally, 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). + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +##### transport + +> **transport**: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> + +The RPC transport + +##### type + +> **type**: `string` + +The type of client. + +##### uid + +> **uid**: `string` + +A unique ID for the client. + +##### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`UninstallFilterParameters`](https://viem.sh/docs/index.html) | [UninstallFilterParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. [UninstallFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +##### verifyHash() + +> **verifyHash**: (`args`) => `Promise`\<`boolean`\> + +Verify that a hash was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyHashParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyHashReturnType](https://viem.sh/docs/index.html) + +##### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `` `0x${string}` `` \| `Uint8Array` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args.address` | `` `0x${string}` `` | The address that signed the original message. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `null` | The chain to use. | +| `args.erc6492VerifierAddress?` | `` `0x${string}` `` | The address of the ERC-6492 signature verifier contract. | +| `args.factory?` | `` `0x${string}` `` | - | +| `args.factoryData?` | `` `0x${string}` `` | - | +| `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | +| `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | +| `args.signature` | `` `0x${string}` `` \| `Uint8Array` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyMessageReturnType](https://viem.sh/docs/index.html) + +##### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address?`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `domain?`: `string`; `message`: `string`; `nonce?`: `string`; `scheme?`: `string`; `signature`: `` `0x${string}` ``; `time?`: `Date`; \} | - | +| `args.address?` | `` `0x${string}` `` | Ethereum address to check against. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.domain?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. | +| `args.message` | `string` | EIP-4361 formatted message. | +| `args.nonce?` | `string` | Random string to check against. | +| `args.scheme?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. | +| `args.signature` | `` `0x${string}` `` | Signature to check against. | +| `args.time?` | `Date` | Current time to check optional `expirationTime` and `notBefore` fields. **Default** `new Date()` | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifySiweMessageReturnType](https://viem.sh/docs/index.html) + +##### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyTypedDataParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyTypedDataReturnType](https://viem.sh/docs/index.html) + +##### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WaitForTransactionReceiptParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [WaitForTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [WaitForTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlockNumberParameters`](https://viem.sh/docs/index.html) | [WatchBlockNumberParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlockNumberReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +##### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlocksParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `includeTransactions`, `blockTag`\> | [WatchBlocksParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlocksReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +##### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchContractEventParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchContractEventParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new event logs. [WatchContractEventReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +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). + +`watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +##### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchEventParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchEventParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new Event Logs. [WatchEventReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +##### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchPendingTransactionsParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html)\> | [WatchPendingTransactionsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new pending transaction hashes. [WatchPendingTransactionsReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +*** + +### getCompositeValidatorContract() + +> **getCompositeValidatorContract**(`address`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L175) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `address` | `string` | `AIRACCOUNT_ADDRESSES.sepolia.compositeValidatorM7r4` | + +#### Returns + +`ViemContract` + +*** + +### getDefaultVersion() + +> **getDefaultVersion**(): [`EntryPointVersion`](../enumerations/EntryPointVersion.md) + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L124) + +#### Returns + +[`EntryPointVersion`](../enumerations/EntryPointVersion.md) + +*** + +### getEntryPointAddress() + +> **getEntryPointAddress**(`version`): `string` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L112) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | + +#### Returns + +`string` + +*** + +### getEntryPointContract() + +> **getEntryPointContract**(`version`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L148) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`ViemContract` + +*** + +### getFactoryAddress() + +> **getFactoryAddress**(`version`): `string` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L116) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | + +#### Returns + +`string` + +*** + +### getFactoryContract() + +> **getFactoryContract**(`version`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L142) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`ViemContract` + +*** + +### getForceExitModuleContract() + +> **getForceExitModuleContract**(`address`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L179) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `string` | + +#### Returns + +`ViemContract` + +*** + +### getNonce() + +> **getNonce**(`accountAddress`, `key`, `version`): `Promise`\<`bigint`\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:190](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L190) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `accountAddress` | `string` | `undefined` | +| `key` | `number` | `0` | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getProvider() + +> **getProvider**(): `object` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L76) + +Returns the viem PublicClient for the main network RPC. + +#### Returns + +##### account + +> **account**: `undefined` + +The Account of the Client. + +##### batch? + +> `optional` **batch**: `object` + +Flags for batch settings. + +###### batch.multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +###### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +##### cacheTime + +> **cacheTime**: `number` + +Time (in ms) that cached data will remain in memory. + +##### call() + +> **call**: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CallParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +###### Returns + +`Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +The call data. [CallReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +##### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +###### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +##### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) \| `undefined` + +Chain for the client. + +##### createAccessList() + +> **createAccessList**: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +Creates an EIP-2930 access list that you can include in a transaction. + +- Docs: https://viem.sh/docs/actions/public/createAccessList +- JSON-RPC Methods: `eth_createAccessList` + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CreateAccessListParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +###### Returns + +`Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +The call data. [CreateAccessListReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const data = await client.createAccessList({ + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +##### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +###### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Filter. [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +##### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +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). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`CreateContractEventFilterParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> | [CreateContractEventFilterParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateContractEventFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +##### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`CreateEventFilterParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> | [CreateEventFilterParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateEventFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +##### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +###### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +##### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +###### Type Parameters + +| Type Parameter | +| ------ | +| `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateContractGasParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `chain`\> | [EstimateContractGasParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateContractGasReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +##### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `type` *extends* [`FeeValuesType`](https://viem.sh/docs/index.html) | `"eip1559"` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | [`EstimateFeesPerGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `type`\> | + +###### Returns + +`Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +An estimate (in wei) for the fees per gas. [EstimateFeesPerGasReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +##### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [EstimateGasParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateGasReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +##### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `chain`: `chainOverride` \| `null`; \} | +| `args.chain?` | `chainOverride` \| `null` | + +###### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. [EstimateMaxPriorityFeePerGasReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +##### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Default block tag to use for RPC requests. + +##### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +###### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`\>\> | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +###### Returns + +[`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +##### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | + +###### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +##### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetBalanceParameters`](https://viem.sh/docs/index.html) | [GetBalanceParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. [GetBalanceReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +##### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +###### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). [GetBlobBaseFeeReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +##### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockParameters`](https://viem.sh/docs/index.html)\<`includeTransactions`, `blockTag`\> | [GetBlockParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Information about the block. [GetBlockReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +##### getBlockNumber() + +> **getBlockNumber**: (`args?`) => `Promise`\<`bigint`\> + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockNumberParameters`](https://viem.sh/docs/index.html) | [GetBlockNumberParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The number of the block. [GetBlockNumberReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +##### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args?`) => `Promise`\<`number`\> + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetBlockTransactionCountParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`number`\> + +The block transaction count. [GetBlockTransactionCountReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +##### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +###### Deprecated + +Use `getCode` instead. + +##### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +###### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +##### getCode() + +> **getCode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | GetBytecodeParameters | + +###### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +The contract's bytecode. GetBytecodeReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +##### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetContractEventsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | + +###### Returns + +`Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetContractEventsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +##### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetEip712DomainParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +The EIP-712 domain, fields, and extensions. [GetEip712DomainReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +##### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAddressParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | Name to get the address for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS name or `null` if not found. [GetEnsAddressReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +##### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `assetGatewayUrls?`: [`AssetGatewayUrls`](https://viem.sh/docs/index.html); `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAvatarParameters](https://viem.sh/docs/index.html) | +| `args.assetGatewayUrls?` | [`AssetGatewayUrls`](https://viem.sh/docs/index.html) | Gateway urls to resolve IPFS and/or Arweave assets. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Avatar URI or `null` if not found. [GetEnsAvatarReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +##### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsNameParameters](https://viem.sh/docs/index.html) | +| `args.address` | `` `0x${string}` `` | Address to get ENS name for. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Name or `null` if not found. [GetEnsNameReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +##### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `name`: `string`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsResolverParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.name` | `string` | Name to get the address for. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<`` `0x${string}` ``\> + +Address for ENS resolver. [GetEnsResolverReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +##### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `key`: `string`; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsTextParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.key` | `string` | Text record to retrieve. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +###### Returns + +`Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS resolver. [GetEnsTextReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +##### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFeeHistoryParameters`](https://viem.sh/docs/index.html) | [GetFeeHistoryParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +The gas estimate (in wei). [GetFeeHistoryReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +##### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterChangesParameters`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterChangesParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. [GetFilterChangesReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +###### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +##### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterLogsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterLogsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetFilterLogsReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +###### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +##### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +###### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). [GetGasPriceReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +##### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetLogsParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> | [GetLogsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetLogsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +##### getProof() + +> **getProof**: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetProofParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Proof data. [GetProofReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +##### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetStorageAtParameters`](https://viem.sh/docs/index.html) | [GetStorageAtParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +The value of the storage slot. [GetStorageAtReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +##### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionParameters`](https://viem.sh/docs/index.html)\<`blockTag`\> | [GetTransactionParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +The transaction information. [GetTransactionReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionConfirmationsParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [GetTransactionConfirmationsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. [GetTransactionConfirmationsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetTransactionCountParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. [GetTransactionCountReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +##### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionReceiptParameters`](https://viem.sh/docs/index.html) | [GetTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [GetTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### key + +> **key**: `string` + +A key for the client. + +##### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `contracts` *extends* readonly `unknown`[] | - | +| `allowFailure` *extends* `boolean` | `true` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`MulticallParameters`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\> | [MulticallParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. [MulticallReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +##### name + +> **name**: `string` + +A name for the client. + +##### pollingInterval + +> **pollingInterval**: `number` + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +##### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +###### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +##### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts + +###### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`ReadContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\> | [ReadContractParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. [ReadContractReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +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. + +Internally, 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). + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +##### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> + +Request function wrapped with friendly error handling + +##### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +##### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +##### ~~simulate()~~ + +> **simulate**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +###### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +###### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +###### Deprecated + +Use `simulateBlocks` instead. + +##### simulateBlocks() + +> **simulateBlocks**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls on block(s) with optional block and state overrides. + +###### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +###### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulated blocks. SimulateReturnType + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateBlocks({ + blocks: [{ + blockOverrides: { + number: 69420n, + }, + calls: [{ + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + }], + stateOverrides: [{ + address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + balance: parseEther('10'), + }], + }] +}) +``` + +##### simulateCalls() + +> **simulateCalls**: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls. + +###### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateCallsParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +###### Returns + +`Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Results. [SimulateCallsReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateCalls({ + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + calls: [{ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + ] +}) +``` + +##### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SimulateContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | [SimulateContractParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. [SimulateContractReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +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. + +Internally, 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). + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +##### transport + +> **transport**: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> + +The RPC transport + +##### type + +> **type**: `string` + +The type of client. + +##### uid + +> **uid**: `string` + +A unique ID for the client. + +##### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`UninstallFilterParameters`](https://viem.sh/docs/index.html) | [UninstallFilterParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. [UninstallFilterReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +##### verifyHash() + +> **verifyHash**: (`args`) => `Promise`\<`boolean`\> + +Verify that a hash was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyHashParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyHashReturnType](https://viem.sh/docs/index.html) + +##### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `` `0x${string}` `` \| `Uint8Array` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args.address` | `` `0x${string}` `` | The address that signed the original message. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `null` | The chain to use. | +| `args.erc6492VerifierAddress?` | `` `0x${string}` `` | The address of the ERC-6492 signature verifier contract. | +| `args.factory?` | `` `0x${string}` `` | - | +| `args.factoryData?` | `` `0x${string}` `` | - | +| `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | +| `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | +| `args.signature` | `` `0x${string}` `` \| `Uint8Array` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyMessageReturnType](https://viem.sh/docs/index.html) + +##### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address?`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `domain?`: `string`; `message`: `string`; `nonce?`: `string`; `scheme?`: `string`; `signature`: `` `0x${string}` ``; `time?`: `Date`; \} | - | +| `args.address?` | `` `0x${string}` `` | Ethereum address to check against. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.domain?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. | +| `args.message` | `string` | EIP-4361 formatted message. | +| `args.nonce?` | `string` | Random string to check against. | +| `args.scheme?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. | +| `args.signature` | `` `0x${string}` `` | Signature to check against. | +| `args.time?` | `Date` | Current time to check optional `expirationTime` and `notBefore` fields. **Default** `new Date()` | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifySiweMessageReturnType](https://viem.sh/docs/index.html) + +##### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +###### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyTypedDataParameters`](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyTypedDataReturnType](https://viem.sh/docs/index.html) + +##### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WaitForTransactionReceiptParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [WaitForTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +###### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [WaitForTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlockNumberParameters`](https://viem.sh/docs/index.html) | [WatchBlockNumberParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlockNumberReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +##### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlocksParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `includeTransactions`, `blockTag`\> | [WatchBlocksParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlocksReturnType](https://viem.sh/docs/index.html) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +##### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchContractEventParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchContractEventParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new event logs. [WatchContractEventReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +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). + +`watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +##### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +###### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchEventParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchEventParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new Event Logs. [WatchEventReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +##### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +###### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchPendingTransactionsParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html)\> | [WatchPendingTransactionsParameters](https://viem.sh/docs/index.html) | + +###### Returns + +[`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new pending transaction hashes. [WatchPendingTransactionsReturnType](https://viem.sh/docs/index.html) + +###### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +*** + +### getTierGuardHookContract() + +> **getTierGuardHookContract**(`address`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:171](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L171) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `address` | `string` | `AIRACCOUNT_ADDRESSES.sepolia.tierGuardHookM7r4` | + +#### Returns + +`ViemContract` + +*** + +### getUserOperationGasPrice() + +> **getUserOperationGasPrice**(): `Promise`\<\{ `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; \}\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:301](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L301) + +#### Returns + +`Promise`\<\{ `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; \}\> + +*** + +### getUserOperationReceipt() + +> **getUserOperationReceipt**(`userOpHash`): `Promise`\<`unknown`\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:273](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L273) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOpHash` | `string` | + +#### Returns + +`Promise`\<`unknown`\> + +*** + +### getUserOpHash() + +> **getUserOpHash**(`userOp`, `version`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L202) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `userOp` | [`UserOperation`](../../interfaces/UserOperation.md) \| [`PackedUserOperation`](../../interfaces/PackedUserOperation.md) | `undefined` | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getValidatorAddress() + +> **getValidatorAddress**(`version`): `string` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L120) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | + +#### Returns + +`string` + +*** + +### getValidatorContract() + +> **getValidatorContract**(`version`): `ViemContract` + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L154) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`ViemContract` + +*** + +### sendUserOperation() + +> **sendUserOperation**(`userOp`, `version`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:263](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L263) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `userOp` | `unknown` | `undefined` | +| `version` | [`EntryPointVersion`](../enumerations/EntryPointVersion.md) | `EntryPointVersion.V0_6` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### waitForUserOp() + +> **waitForUserOp**(`userOpHash`, `maxAttempts`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/providers/ethereum-provider.ts:277](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/providers/ethereum-provider.ts#L277) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `userOpHash` | `string` | `undefined` | +| `maxAttempts` | `number` | `60` | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/airaccount/server/classes/ForceExitService.md b/api/@aastar/airaccount/server/classes/ForceExitService.md new file mode 100644 index 000000000..072d70c83 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/ForceExitService.md @@ -0,0 +1,304 @@ +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L90) + +ForceExitService — typed wrappers for ForceExitModule ERC-7579 emergency L2→L1 exit. + +Flow: + 1. Owner installs module via account.installModule(2, forceExitModuleAddr, encodeOnInstall(L2_TYPE.OPTIMISM)) + 2. Any party calls proposeForceExit(target, value, data) to submit a bridge-out proposal + 3. 2-of-3 guardians each call approveForceExit(account, guardianSig) within their window + 4. Anyone calls executeForceExit(account) once threshold is met — triggers L2→L1 bridge call + +The module is an ERC-7579 Executor (moduleTypeId=2) — call installModule on the account, not here. + +## Constructors + +### Constructor + +> **new ForceExitService**(`moduleAddress`, `client`): `ForceExitService` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L93) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `moduleAddress` | `string` | +| `client` | `ForceExitClient` | + +#### Returns + +`ForceExitService` + +## Methods + +### approveForceExit() + +> **approveForceExit**(`account`, `guardianSig`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:221](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L221) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `guardianSig` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### cancelForceExit() + +> **cancelForceExit**(`account`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L232) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### encodeApproveForceExit() + +> **encodeApproveForceExit**(`account`, `guardianSig`): `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L187) + +Encode calldata for approveForceExit — guardian signs off on the pending proposal. +`guardianSig` must be an EIP-191 personal_sign over the proposal hash. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `guardianSig` | `string` | + +#### Returns + +`string` + +*** + +### encodeCancelForceExit() + +> **encodeCancelForceExit**(`account`): `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:203](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L203) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`string` + +*** + +### encodeExecuteForceExit() + +> **encodeExecuteForceExit**(`account`): `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L195) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`string` + +*** + +### encodeOnInstall() + +> **encodeOnInstall**(`l2Type`): `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L155) + +Encode onInstall calldata for installModule() call on the smart account. +Must be submitted by the account owner, with moduleTypeId=2 (EXECUTOR). + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `l2Type` | [`L2Type`](../type-aliases/L2Type.md) | L2_TYPE.OPTIMISM (1) or L2_TYPE.ARBITRUM (2) | + +#### Returns + +`string` + +#### Example + +```ts +const calldata = forceExit.encodeOnInstall(L2_TYPE.OPTIMISM); +// account.installModule(2, forceExitModuleAddress, calldata) +``` + +*** + +### encodeOnUninstall() + +> **encodeOnUninstall**(): `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:163](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L163) + +#### Returns + +`string` + +*** + +### encodeProposeForceExit() + +> **encodeProposeForceExit**(`target`, `value`, `data`): `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L175) + +Encode calldata for proposeForceExit — the exit payload to bridge out of L2. +`target` is the L2→L1 bridge contract; `data` is the bridge call payload. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `target` | `string` | +| `value` | `bigint` | +| `data` | `string` | + +#### Returns + +`string` + +*** + +### executeForceExit() + +> **executeForceExit**(`account`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:228](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L228) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAccountL2Type() + +> **getAccountL2Type**(`account`): `Promise`\<`number`\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L132) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`Promise`\<`number`\> + +*** + +### getApprovalThreshold() + +> **getApprovalThreshold**(): `Promise`\<`number`\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:136](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L136) + +#### Returns + +`Promise`\<`number`\> + +*** + +### getModuleVersion() + +> **getModuleVersion**(): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:140](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L140) + +#### Returns + +`Promise`\<`string`\> + +*** + +### getPendingExit() + +> **getPendingExit**(`account`): `Promise`\<[`PendingExit`](../interfaces/PendingExit.md)\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L112) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`Promise`\<[`PendingExit`](../interfaces/PendingExit.md)\> + +*** + +### isInitialized() + +> **isInitialized**(`smartAccount`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L108) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `smartAccount` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### proposeForceExit() + +> **proposeForceExit**(`target`, `value`, `data`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:213](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L213) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `target` | `string` | +| `value` | `bigint` | +| `data` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/airaccount/server/classes/GuardChecker.md b/api/@aastar/airaccount/server/classes/GuardChecker.md new file mode 100644 index 000000000..da9d18029 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/GuardChecker.md @@ -0,0 +1,85 @@ +Defined in: [packages/airaccount/src/server/services/guard-checker.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-checker.ts#L39) + +Pre-checks transactions against GlobalGuard before submitting on-chain. +Avoids wasted gas from predictable reverts. + +## Constructors + +### Constructor + +> **new GuardChecker**(`ethereum`, `logger?`): `GuardChecker` + +Defined in: [packages/airaccount/src/server/services/guard-checker.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-checker.ts#L42) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ethereum` | [`EthereumProvider`](EthereumProvider.md) | +| `logger?` | [`ILogger`](../interfaces/ILogger.md) | + +#### Returns + +`GuardChecker` + +## Methods + +### fetchGuardStatus() + +> **fetchGuardStatus**(`accountAddress`): `Promise`\<[`GuardStatus`](../../interfaces/GuardStatus.md)\> + +Defined in: [packages/airaccount/src/server/services/guard-checker.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-checker.ts#L61) + +Fetch guard status from the account's GlobalGuard. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | + +#### Returns + +`Promise`\<[`GuardStatus`](../../interfaces/GuardStatus.md)\> + +*** + +### fetchTierConfig() + +> **fetchTierConfig**(`accountAddress`): `Promise`\<[`TierConfig`](../../interfaces/TierConfig.md)\> + +Defined in: [packages/airaccount/src/server/services/guard-checker.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-checker.ts#L52) + +Fetch tier limits from an AirAccount contract. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | + +#### Returns + +`Promise`\<[`TierConfig`](../../interfaces/TierConfig.md)\> + +*** + +### preCheck() + +> **preCheck**(`accountAddress`, `value`): `Promise`\<[`PreCheckResult`](../../interfaces/PreCheckResult.md)\> + +Defined in: [packages/airaccount/src/server/services/guard-checker.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-checker.ts#L97) + +Pre-check a transaction: determine tier, check guard limits and algorithm approval. +Returns errors array (empty = OK to proceed). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | +| `value` | `bigint` | + +#### Returns + +`Promise`\<[`PreCheckResult`](../../interfaces/PreCheckResult.md)\> diff --git a/api/@aastar/airaccount/server/classes/GuardStateReader.md b/api/@aastar/airaccount/server/classes/GuardStateReader.md new file mode 100644 index 000000000..cc9919c68 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/GuardStateReader.md @@ -0,0 +1,184 @@ +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L60) + +GuardStateReader — F6: read AAStarGlobalGuard spending state. + +Enables UI components to show: + - Daily spend progress bar + - Current required tier (T1/T2/T3) for next transaction + - Per-token limits and remaining allowances + +## Constructors + +### Constructor + +> **new GuardStateReader**(`provider`): `GuardStateReader` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L63) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key` | `string` | A key for the client. | +| `provider.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name` | `string` | A name for the client. | +| `provider.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type` | `string` | The type of client. | +| `provider.uid` | `string` | A unique ID for the client. | +| `provider.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | + +#### Returns + +`GuardStateReader` + +## Methods + +### getGuardState() + +> **getGuardState**(`accountAddress`): `Promise`\<[`GuardState`](../interfaces/GuardState.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L87) + +Read the full ETH guard state for an account. +Returns null if the account has no guard (dailyLimit=0). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | + +#### Returns + +`Promise`\<[`GuardState`](../interfaces/GuardState.md) \| `null`\> + +*** + +### getTokenGuardState() + +> **getTokenGuardState**(`accountAddress`, `token`): `Promise`\<[`TokenGuardState`](../interfaces/TokenGuardState.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L123) + +Read per-token guard state. +Returns null if the token is not configured on the guard. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | +| `token` | `string` | + +#### Returns + +`Promise`\<[`TokenGuardState`](../interfaces/TokenGuardState.md) \| `null`\> + +*** + +### isAlgorithmApproved() + +> **isAlgorithmApproved**(`accountAddress`, `algId`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L167) + +Check if a given algorithm ID is approved on the guard. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | +| `algId` | `number` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### requiredTierForAmount() + +> **requiredTierForAmount**(`accountAddress`, `amountWei`): `Promise`\<`TierLevel`\> + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L153) + +Determine the minimum tier required to send a given ETH amount. +Useful for showing "this transfer needs 2 signatures" before submission. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `string` | +| `amountWei` | `bigint` | + +#### Returns + +`Promise`\<`TierLevel`\> diff --git a/api/@aastar/airaccount/server/classes/KmsAgentService.md b/api/@aastar/airaccount/server/classes/KmsAgentService.md new file mode 100644 index 000000000..4b2f51e10 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsAgentService.md @@ -0,0 +1,199 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L111) + +Agent-key lifecycle service for the AAStar TEE KMS (v0.20.0). + +An "agent key" is a TEE-JWT credential minted under a human key, used for +gasless ERC-4337 sponsorship without re-prompting the human for each signature. +Lifecycle: + 1. [createAgentKey](#createagentkey) — human mints the agent key (WebAuthn-gated) + 2. [signAgent](#signagent) — agent signs userOpHashes (Bearer JWT auth) + 3. [refreshAgentCredential](#refreshagentcredential)— re-mint before expiry (Bearer JWT + WebAuthn) + 4. [revokeAgentCredential](#revokeagentcredential) — human revokes the agent key (WebAuthn-gated) + +Wraps a shared [KmsHttpClient](KmsHttpClient.md) — obtain it via [KmsManager.httpClient](KmsManager.md#httpclient) +so this service reuses the same connection config and auth headers. + +## Constructors + +### Constructor + +> **new KmsAgentService**(`http`): `KmsAgentService` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L112) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](KmsHttpClient.md) | + +#### Returns + +`KmsAgentService` + +## Methods + +### createAgentKey() + +> **createAgentKey**(`params`): `Promise`\<[`KmsCreateAgentKeyResponse`](../interfaces/KmsCreateAgentKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L121) + +Mint a new agent key under an existing human key (WebAuthn-gated). + +The WebAuthn challenge is obtained from a generic +[KmsManager.beginAuthentication](KmsManager.md#beginauthentication) ceremony (purpose="authentication"); +the caller supplies the resulting assertion in the request. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsCreateAgentKeyRequest`](../interfaces/KmsCreateAgentKeyRequest.md) | + +#### Returns + +`Promise`\<[`KmsCreateAgentKeyResponse`](../interfaces/KmsCreateAgentKeyResponse.md)\> + +*** + +### createAgentKeyWithCeremony() + +> **createAgentKeyWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`KmsCreateAgentKeyResponse`](../interfaces/KmsCreateAgentKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L187) + +Mint an agent key, running the challenge-binding ceremony internally. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsCreateAgentKeyRequest`](../interfaces/KmsCreateAgentKeyRequest.md), `"webAuthnAssertion"` \| `"passkeyAssertion"`\> | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsCreateAgentKeyResponse`](../interfaces/KmsCreateAgentKeyResponse.md)\> + +*** + +### refreshAgentCredential() + +> **refreshAgentCredential**(`params`, `jwt`): `Promise`\<[`KmsRefreshAgentCredentialResponse`](../interfaces/KmsRefreshAgentCredentialResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L148) + +Refresh (re-mint) an agent credential before it expires. Authenticated with +the existing credential (`jwt`, Bearer) plus a human WebAuthn / passkey +assertion in the request. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsRefreshAgentCredentialRequest`](../interfaces/KmsRefreshAgentCredentialRequest.md) | +| `jwt` | `string` | + +#### Returns + +`Promise`\<[`KmsRefreshAgentCredentialResponse`](../interfaces/KmsRefreshAgentCredentialResponse.md)\> + +*** + +### refreshAgentCredentialWithCeremony() + +> **refreshAgentCredentialWithCeremony**(`params`, `humanKeyId`, `jwt`, `signer`, `options?`): `Promise`\<[`KmsRefreshAgentCredentialResponse`](../interfaces/KmsRefreshAgentCredentialResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:207](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L207) + +Refresh an agent credential, running the challenge-binding ceremony +internally. `humanKeyId` is the owning human key challenged by the ceremony +(distinct from the agent `keyId` in `params`); `jwt` is the existing credential. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsRefreshAgentCredentialRequest`](../interfaces/KmsRefreshAgentCredentialRequest.md), `"webAuthnAssertion"` \| `"passkeyAssertion"`\> | +| `humanKeyId` | `string` | +| `jwt` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsRefreshAgentCredentialResponse`](../interfaces/KmsRefreshAgentCredentialResponse.md)\> + +*** + +### revokeAgentCredential() + +> **revokeAgentCredential**(`params`): `Promise`\<[`KmsRevokeAgentCredentialResponse`](../interfaces/KmsRevokeAgentCredentialResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:168](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L168) + +Revoke an agent's credential (WebAuthn-gated). + +The WebAuthn challenge is obtained from a generic +[KmsManager.beginAuthentication](KmsManager.md#beginauthentication) ceremony (purpose="authentication"); +the caller supplies the resulting assertion in the request. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsRevokeAgentCredentialRequest`](../interfaces/KmsRevokeAgentCredentialRequest.md) | + +#### Returns + +`Promise`\<[`KmsRevokeAgentCredentialResponse`](../interfaces/KmsRevokeAgentCredentialResponse.md)\> + +*** + +### revokeAgentCredentialWithCeremony() + +> **revokeAgentCredentialWithCeremony**(`params`, `humanKeyId`, `signer`, `options?`): `Promise`\<[`KmsRevokeAgentCredentialResponse`](../interfaces/KmsRevokeAgentCredentialResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:224](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L224) + +Revoke an agent credential, running the challenge-binding ceremony internally. +`humanKeyId` is the owning human key challenged by the ceremony (distinct from +the agent `keyId` in `params`). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsRevokeAgentCredentialRequest`](../interfaces/KmsRevokeAgentCredentialRequest.md), `"webAuthnAssertion"` \| `"passkeyAssertion"`\> | +| `humanKeyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsRevokeAgentCredentialResponse`](../interfaces/KmsRevokeAgentCredentialResponse.md)\> + +*** + +### signAgent() + +> **signAgent**(`params`, `jwt`): `Promise`\<[`KmsSignAgentResponse`](../interfaces/KmsSignAgentResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L134) + +Sign a userOpHash with an agent key, authenticated by the agent's TEE-JWT +credential (`jwt`, the `agentCredential` from [createAgentKey](#createagentkey)). +Returns the 106-byte packed signature for ERC-4337 sponsorship. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignAgentRequest`](../interfaces/KmsSignAgentRequest.md) | +| `jwt` | `string` | + +#### Returns + +`Promise`\<[`KmsSignAgentResponse`](../interfaces/KmsSignAgentResponse.md)\> diff --git a/api/@aastar/airaccount/server/classes/KmsHttpClient.md b/api/@aastar/airaccount/server/classes/KmsHttpClient.md new file mode 100644 index 000000000..441c769f4 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsHttpClient.md @@ -0,0 +1,181 @@ +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L29) + +Shared low-level HTTP transport for all KMS service classes. + +Centralises axios setup (baseURL, x-api-key), the `enabled` gate, and the three +request flavours the KMS uses: + - plain JSON → `post` / `get` + - AWS-KMS framed → `amzPost` (adds x-amz-target + x-amz-json-1.1 content type) + - agent/session JWT → `postWithBearer` (Authorization: Bearer <jwt>) + +KmsManager and the composed services (agent / session / payment / monitor) all share +one instance so they reuse the same connection config and auth headers. + +## Constructors + +### Constructor + +> **new KmsHttpClient**(`options`): `KmsHttpClient` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L36) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options` | [`KmsHttpClientOptions`](../interfaces/KmsHttpClientOptions.md) | + +#### Returns + +`KmsHttpClient` + +## Properties + +### enabled + +> `readonly` **enabled**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L31) + +*** + +### endpoint + +> `readonly` **endpoint**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L30) + +*** + +### logger + +> `readonly` **logger**: [`ILogger`](../interfaces/ILogger.md) + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L32) + +## Methods + +### amzPost() + +> **amzPost**\<`T`\>(`path`, `target`, `body`): `Promise`\<`T`\> + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L78) + +POST with AWS-KMS framing (x-amz-target header) — required for wallet/signing ops. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `target` | `string` | +| `body` | `unknown` | + +#### Returns + +`Promise`\<`T`\> + +*** + +### ensureEnabled() + +> **ensureEnabled**(): `void` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L51) + +Throw if KMS is not enabled — every operation must call this first. + +#### Returns + +`void` + +*** + +### get() + +> **get**\<`T`\>(`path`, `config?`): `Promise`\<`T`\> + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L70) + +Plain JSON GET. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `config?` | `AxiosRequestConfig`\<`any`\> | + +#### Returns + +`Promise`\<`T`\> + +*** + +### post() + +> **post**\<`T`\>(`path`, `body?`, `config?`): `Promise`\<`T`\> + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L62) + +Plain JSON POST. The axios `config` arg is only forwarded when defined, so a +config-less call results in `http.post(path, body)` (2 args) — preserving the +exact call shape the existing unit tests assert against. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `body?` | `unknown` | +| `config?` | `AxiosRequestConfig`\<`any`\> | + +#### Returns + +`Promise`\<`T`\> + +*** + +### postWithBearer() + +> **postWithBearer**\<`T`\>(`path`, `body`, `jwt`): `Promise`\<`T`\> + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L88) + +POST authenticated with a TEE-issued agent/session JWT (Authorization: Bearer). + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `body` | `unknown` | +| `jwt` | `string` | + +#### Returns + +`Promise`\<`T`\> diff --git a/api/@aastar/airaccount/server/classes/KmsManager.md b/api/@aastar/airaccount/server/classes/KmsManager.md new file mode 100644 index 000000000..4305ed728 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsManager.md @@ -0,0 +1,740 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:310](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L310) + +KMS service for remote key management with WebAuthn/Passkey integration. + +Targets the AAStar TEE KMS (v0.20.0, kms.aastar.io). WebAuthn registration / +authentication ceremonies are handled by the KMS directly; signing operations +require a Passkey assertion (Legacy hex) or a one-time WebAuthn ceremony. + +Wraps a shared [KmsHttpClient](KmsHttpClient.md); the composed services (agent / session / +payment / monitor) reuse the same client via [KmsManager.httpClient](#httpclient). + +## Constructors + +### Constructor + +> **new KmsManager**(`options`): `KmsManager` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:314](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L314) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options` | \{ `kmsApiKey?`: `string`; `kmsEnabled?`: `boolean`; `kmsEndpoint?`: `string`; `logger?`: [`ILogger`](../interfaces/ILogger.md); \} | +| `options.kmsApiKey?` | `string` | +| `options.kmsEnabled?` | `boolean` | +| `options.kmsEndpoint?` | `string` | +| `options.logger?` | [`ILogger`](../interfaces/ILogger.md) | + +#### Returns + +`KmsManager` + +## Properties + +### logger + +> `readonly` **logger**: [`ILogger`](../interfaces/ILogger.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:312](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L312) + +## Accessors + +### httpClient + +#### Get Signature + +> **get** **httpClient**(): [`KmsHttpClient`](KmsHttpClient.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:329](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L329) + +Shared HTTP transport — pass to KmsAgentService / KmsSessionService / etc. + +##### Returns + +[`KmsHttpClient`](KmsHttpClient.md) + +## Methods + +### beginAuthentication() + +> **beginAuthentication**(`params`): `Promise`\<[`KmsBeginAuthenticationResponse`](../interfaces/KmsBeginAuthenticationResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:729](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L729) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsBeginAuthenticationRequest`](../interfaces/KmsBeginAuthenticationRequest.md) | + +#### Returns + +`Promise`\<[`KmsBeginAuthenticationResponse`](../interfaces/KmsBeginAuthenticationResponse.md)\> + +*** + +### beginGrantSessionAuth() + +> **beginGrantSessionAuth**(`params`): `Promise`\<[`KmsBeginGrantSessionAuthResponse`](../interfaces/KmsBeginGrantSessionAuthResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:564](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L564) + +Begin a grant-session WebAuthn challenge. +The returned challengeId can ONLY be used with sign-grant-session, not sign-typed-data. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsBeginGrantSessionAuthRequest`](../interfaces/KmsBeginGrantSessionAuthRequest.md) | + +#### Returns + +`Promise`\<[`KmsBeginGrantSessionAuthResponse`](../interfaces/KmsBeginGrantSessionAuthResponse.md)\> + +*** + +### beginRegistration() + +> **beginRegistration**(`params`): `Promise`\<[`KmsBeginRegistrationResponse`](../interfaces/KmsBeginRegistrationResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:713](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L713) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsBeginRegistrationRequest`](../interfaces/KmsBeginRegistrationRequest.md) | + +#### Returns + +`Promise`\<[`KmsBeginRegistrationResponse`](../interfaces/KmsBeginRegistrationResponse.md)\> + +*** + +### beginWebAuthnAuth() + +> **beginWebAuthnAuth**(`keyId`): `Promise`\<[`KmsBeginAuthenticationResponse`](../interfaces/KmsBeginAuthenticationResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:745](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L745) + +Begin a generic WebAuthn authentication ceremony for a key, returning a +challenge usable for SignHash / SignTypedData (purpose="authentication"). + +NOTE: there is no dedicated `begin-webauthn-auth` endpoint — this delegates +to `POST /BeginAuthentication`. (Grant-session signing needs a purpose-bound +challenge from [beginGrantSessionAuth](#begingrantsessionauth) instead.) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | + +#### Returns + +`Promise`\<[`KmsBeginAuthenticationResponse`](../interfaces/KmsBeginAuthenticationResponse.md)\> + +*** + +### changePasskey() + +> **changePasskey**(`params`): `Promise`\<[`KmsChangePasskeyResponse`](../interfaces/KmsChangePasskeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:431](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L431) + +Rotate the WebAuthn passkey bound to a key (WebAuthn-gated, RPMB-bound). +`PasskeyPublicKey` is the NEW P-256 public key (0x04… 65-byte uncompressed). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `KeyId`: `string`; `Passkey?`: [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md); `PasskeyPublicKey`: `string`; `WebAuthn?`: [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md); \} | +| `params.KeyId` | `string` | +| `params.Passkey?` | [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md) | +| `params.PasskeyPublicKey` | `string` | +| `params.WebAuthn?` | [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md) | + +#### Returns + +`Promise`\<[`KmsChangePasskeyResponse`](../interfaces/KmsChangePasskeyResponse.md)\> + +*** + +### completeRegistration() + +> **completeRegistration**(`params`): `Promise`\<[`KmsCompleteRegistrationResponse`](../interfaces/KmsCompleteRegistrationResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:721](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L721) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsCompleteRegistrationRequest`](../interfaces/KmsCompleteRegistrationRequest.md) | + +#### Returns + +`Promise`\<[`KmsCompleteRegistrationResponse`](../interfaces/KmsCompleteRegistrationResponse.md)\> + +*** + +### createKey() + +> **createKey**(`description`, `passkeyPublicKey`): `Promise`\<[`KmsCreateKeyResponse`](../interfaces/KmsCreateKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:344](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L344) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `description` | `string` | +| `passkeyPublicKey` | `string` | + +#### Returns + +`Promise`\<[`KmsCreateKeyResponse`](../interfaces/KmsCreateKeyResponse.md)\> + +*** + +### createKmsSigner() + +> **createKmsSigner**(`keyId`, `address`, `assertionProvider`): [`KmsSigner`](KmsSigner.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:753](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L753) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | +| `address` | `string` | +| `assertionProvider` | () => `Promise`\<[`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md)\> | + +#### Returns + +[`KmsSigner`](KmsSigner.md) + +*** + +### deleteKey() + +> **deleteKey**(`params`): `Promise`\<[`KmsDeleteKeyResponse`](../interfaces/KmsDeleteKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:400](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L400) + +Schedule key deletion (AWS-KMS action ScheduleKeyDeletion; WebAuthn-gated). +RPMB-bound on the TEE — requires a passkey/WebAuthn assertion on the normal path. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `KeyId`: `string`; `Passkey?`: [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md); `PendingWindowInDays?`: `number`; `WebAuthn?`: [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md); \} | +| `params.KeyId` | `string` | +| `params.Passkey?` | [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md) | +| `params.PendingWindowInDays?` | `number` | +| `params.WebAuthn?` | [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md) | + +#### Returns + +`Promise`\<[`KmsDeleteKeyResponse`](../interfaces/KmsDeleteKeyResponse.md)\> + +*** + +### deriveAddress() + +> **deriveAddress**(`params`): `Promise`\<[`KmsDeriveAddressResponse`](../interfaces/KmsDeriveAddressResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:380](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L380) + +Derive an Ethereum address at a BIP-44 path (WebAuthn-gated). +Provide a WebAuthn ceremony assertion (preferred) or a Legacy passkey assertion. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `DerivationPath`: `string`; `KeyId`: `string`; `Passkey?`: [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md); `WebAuthn?`: [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md); \} | +| `params.DerivationPath` | `string` | +| `params.KeyId` | `string` | +| `params.Passkey?` | [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md) | +| `params.WebAuthn?` | [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md) | + +#### Returns + +`Promise`\<[`KmsDeriveAddressResponse`](../interfaces/KmsDeriveAddressResponse.md)\> + +*** + +### deriveAddressWithCeremony() + +> **deriveAddressWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`KmsDeriveAddressResponse`](../interfaces/KmsDeriveAddressResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:636](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L636) + +Derive an address, running the challenge-binding ceremony internally. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `DerivationPath`: `string`; `KeyId`: `string`; \} | +| `params.DerivationPath` | `string` | +| `params.KeyId` | `string` | +| `signer?` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsDeriveAddressResponse`](../interfaces/KmsDeriveAddressResponse.md)\> + +*** + +### describeKey() + +> **describeKey**(`keyId`): `Promise`\<[`KmsDescribeKeyResponse`](../interfaces/KmsDescribeKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:364](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L364) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | + +#### Returns + +`Promise`\<[`KmsDescribeKeyResponse`](../interfaces/KmsDescribeKeyResponse.md)\> + +*** + +### getKeyStatus() + +> **getKeyStatus**(`keyId`): `Promise`\<[`KmsKeyStatusResponse`](../interfaces/KmsKeyStatusResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:356](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L356) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | + +#### Returns + +`Promise`\<[`KmsKeyStatusResponse`](../interfaces/KmsKeyStatusResponse.md)\> + +*** + +### getPublicKey() + +> **getPublicKey**(`target`): `Promise`\<[`KmsGetPublicKeyResponse`](../interfaces/KmsGetPublicKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:371](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L371) + +Get a key's public key (uncompressed). Not WebAuthn-gated. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `target` | \{ `Address?`: `string`; `KeyId?`: `string`; \} | +| `target.Address?` | `string` | +| `target.KeyId?` | `string` | + +#### Returns + +`Promise`\<[`KmsGetPublicKeyResponse`](../interfaces/KmsGetPublicKeyResponse.md)\> + +*** + +### isKmsEnabled() + +> **isKmsEnabled**(): `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:324](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L324) + +#### Returns + +`boolean` + +*** + +### listKeys() + +> **listKeys**(`params`): `Promise`\<[`KmsListKeysResponse`](../interfaces/KmsListKeysResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:391](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L391) + +List keys (paginated). Not WebAuthn-gated. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `Limit?`: `number`; `Marker?`: `string`; \} | +| `params.Limit?` | `number` | +| `params.Marker?` | `string` | + +#### Returns + +`Promise`\<[`KmsListKeysResponse`](../interfaces/KmsListKeysResponse.md)\> + +*** + +### pollUntilReady() + +> **pollUntilReady**(`keyId`, `timeoutMs`, `intervalMs`): `Promise`\<[`KmsKeyStatusResponse`](../interfaces/KmsKeyStatusResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:455](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L455) + +Poll KeyStatus until the key is ready (address derived) or timeout. +STM32 key derivation takes 60-75 seconds on first creation. + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `keyId` | `string` | `undefined` | +| `timeoutMs` | `number` | `120_000` | +| `intervalMs` | `number` | `3_000` | + +#### Returns + +`Promise`\<[`KmsKeyStatusResponse`](../interfaces/KmsKeyStatusResponse.md)\> + +*** + +### runAuthenticationCeremony() + +> **runAuthenticationCeremony**(`keyId`, `signer`, `options?`): `Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:612](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L612) + +Run a generic authentication ceremony (purpose="authentication") bound to a +fresh TA challenge. The returned assertion is valid for DeriveAddress / Sign +/ SignHash / SignTypedData / agent-key / p256-session signing. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +*** + +### runGrantSessionCeremony() + +> **runGrantSessionCeremony**(`keyId`, `signer`, `options?`): `Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:626](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L626) + +Run a grant-session ceremony (purpose="grant-session") bound to a fresh TA +challenge — required by [signGrantSession](#signgrantsession) / [signP256GrantSession](#signp256grantsession) +(the generic 'authentication' challenge is rejected there for replay safety). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +*** + +### sign() + +> **sign**(`params`): `Promise`\<[`KmsSignResponse`](../interfaces/KmsSignResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:446](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L446) + +Sign a message or an EIP-155 transaction (WebAuthn-gated). +Provide exactly one of `Message` (hex) or `Transaction`. For a raw 32-byte +digest use [signHash](#signhash) / [signHashWithWebAuthn](#signhashwithwebauthn) instead. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignRequest`](../interfaces/KmsSignRequest.md) | + +#### Returns + +`Promise`\<[`KmsSignResponse`](../interfaces/KmsSignResponse.md)\> + +*** + +### signGrantSession() + +> **signGrantSession**(`params`): `Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:578](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L578) + +Sign a GRANT_SESSION_V2 hash off-chain inside the TEE (secp256k1 session key). +Returns a 65-byte signature (R||S||V, V=27/28) for use in grantSessionWithSig(). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignGrantSessionRequest`](../interfaces/KmsSignGrantSessionRequest.md) | + +#### Returns + +`Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +*** + +### signGrantSessionWithCeremony() + +> **signGrantSessionWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:687](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L687) + +Sign a GRANT_SESSION_V2 hash, running the grant-session ceremony internally +(uses the purpose-bound `begin-grant-session-auth` challenge). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsSignGrantSessionRequest`](../interfaces/KmsSignGrantSessionRequest.md), `"webAuthnAssertion"`\> | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +*** + +### signHash() + +> **signHash**(`hash`, `assertion`, `target`): `Promise`\<[`KmsSignHashResponse`](../interfaces/KmsSignHashResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:486](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L486) + +Sign a hash using Legacy Passkey assertion (reusable for BLS dual-signing). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `hash` | `string` | +| `assertion` | [`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md) | +| `target` | \{ `Address?`: `string`; `KeyId?`: `string`; \} | +| `target.Address?` | `string` | +| `target.KeyId?` | `string` | + +#### Returns + +`Promise`\<[`KmsSignHashResponse`](../interfaces/KmsSignHashResponse.md)\> + +*** + +### signHashWithCeremony() + +> **signHashWithCeremony**(`hash`, `target`, `signer`, `options?`): `Promise`\<[`KmsSignHashResponse`](../interfaces/KmsSignHashResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:661](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L661) + +Sign a 32-byte digest, running the challenge-binding ceremony internally. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `hash` | `string` | +| `target` | \{ `KeyId`: `string`; \} | +| `target.KeyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsSignHashResponse`](../interfaces/KmsSignHashResponse.md)\> + +*** + +### signHashWithWebAuthn() + +> **signHashWithWebAuthn**(`hash`, `challengeId`, `credential`, `target`): `Promise`\<[`KmsSignHashResponse`](../interfaces/KmsSignHashResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:513](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L513) + +Sign a hash using a WebAuthn ceremony assertion (one-time use). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `hash` | `string` | +| `challengeId` | `string` | +| `credential` | `unknown` | +| `target` | \{ `Address?`: `string`; `KeyId?`: `string`; \} | +| `target.Address?` | `string` | +| `target.KeyId?` | `string` | + +#### Returns + +`Promise`\<[`KmsSignHashResponse`](../interfaces/KmsSignHashResponse.md)\> + +*** + +### signP256GrantSession() + +> **signP256GrantSession**(`params`): `Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:590](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L590) + +Sign a GRANT_P256_SESSION_V2 hash off-chain inside the TEE (P256 session key). +Returns a 65-byte signature for use in grantP256SessionWithSig(). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignP256GrantSessionRequest`](../interfaces/KmsSignP256GrantSessionRequest.md) | + +#### Returns + +`Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +*** + +### signP256GrantSessionWithCeremony() + +> **signP256GrantSessionWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:701](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L701) + +Sign a GRANT_P256_SESSION_V2 hash, running the grant-session ceremony +internally (uses the purpose-bound `begin-grant-session-auth` challenge). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsSignP256GrantSessionRequest`](../interfaces/KmsSignP256GrantSessionRequest.md), `"webAuthnAssertion"`\> | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsSignGrantSessionResponse`](../interfaces/KmsSignGrantSessionResponse.md)\> + +*** + +### signTypedDataWithCeremony() + +> **signTypedDataWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`KmsSignTypedDataResponse`](../interfaces/KmsSignTypedDataResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:673](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L673) + +Sign EIP-712 typed data, running the challenge-binding ceremony internally. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsSignTypedDataRequest`](../interfaces/KmsSignTypedDataRequest.md), `"webAuthnAssertion"`\> | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsSignTypedDataResponse`](../interfaces/KmsSignTypedDataResponse.md)\> + +*** + +### signTypedDataWithWebAuthn() + +> **signTypedDataWithWebAuthn**(`params`): `Promise`\<[`KmsSignTypedDataResponse`](../interfaces/KmsSignTypedDataResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:550](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L550) + +Sign arbitrary EIP-712 typed data via `POST /kms/SignTypedData` (v0.20.0). + +The KMS hashes the typed data host-side, so the FULL EIP-712 structure +(domain / primaryType / types / message) is sent — not a pre-hashed +domainSeparator/structHash. The `webAuthnAssertion` challenge comes from a +generic [beginAuthentication](#beginauthentication) ceremony (purpose="authentication"). + +Alternatively, agents authenticate with a Bearer JWT — see KmsAgentService. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignTypedDataRequest`](../interfaces/KmsSignTypedDataRequest.md) | + +#### Returns + +`Promise`\<[`KmsSignTypedDataResponse`](../interfaces/KmsSignTypedDataResponse.md)\> + +*** + +### signWithCeremony() + +> **signWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`KmsSignResponse`](../interfaces/KmsSignResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:650](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L650) + +Sign a message or EIP-155 transaction, running the challenge-binding ceremony +internally. `params.KeyId` is required (it identifies the wallet to challenge). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`KmsSignRequest`](../interfaces/KmsSignRequest.md), `"Passkey"` \| `"WebAuthn"`\> & `object` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`KmsSignResponse`](../interfaces/KmsSignResponse.md)\> + +*** + +### unfreezeKey() + +> **unfreezeKey**(`params`): `Promise`\<`KmsUnfreezeKeyResponse`\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:419](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L419) + +Unfreeze a dormant (frozen) key (issue #42; WebAuthn-gated). +A key auto-frozen by the dormant-key sweep rejects signing until unfrozen. +The TEE verifies the owner via the same strict WebAuthn ceremony as +[deleteKey](#deletekey); ownership is checked even when the key is already active, +so this cannot be used as an unauthenticated key-state probe. Unlike DeleteKey +this endpoint takes no `x-amz-target` header — it authenticates via the default +API key plus the WebAuthn assertion in the body. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `KeyId`: `string`; `WebAuthn?`: [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md); \} | +| `params.KeyId` | `string` | +| `params.WebAuthn?` | [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md) | + +#### Returns + +`Promise`\<`KmsUnfreezeKeyResponse`\> diff --git a/api/@aastar/airaccount/server/classes/KmsMonitorService.md b/api/@aastar/airaccount/server/classes/KmsMonitorService.md new file mode 100644 index 000000000..3b61023d9 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsMonitorService.md @@ -0,0 +1,185 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L117) + +Infrastructure monitoring + operator admin surface for the AAStar TEE KMS +(v0.20.0, kms.aastar.io). + +Wraps a shared [KmsHttpClient](KmsHttpClient.md). Liveness probes (`health`, `version`) +intentionally bypass the `enabled` gate so they work even when the SDK's KMS +feature flag is off; every other method calls `ensureEnabled()` first. + +## Constructors + +### Constructor + +> **new KmsMonitorService**(`http`): `KmsMonitorService` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L118) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](KmsHttpClient.md) | + +#### Returns + +`KmsMonitorService` + +## Methods + +### adminPurgeKey() + +> **adminPurgeKey**(`params`, `adminToken`): `Promise`\<[`KmsPurgeKeyResponse`](../interfaces/KmsPurgeKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L198) + +**`Internal`** + +WARNING — DESTRUCTIVE, IRREVERSIBLE. Force-purges a key from both the TEE +and the SQLite store with NO passkey/WebAuthn check (`POST /admin/purge-key`, +v0.20.0). Operator-only: authorised solely by the `KMS_ADMIN_TOKEN` operator +secret sent as `Authorization: Bearer `. There is no recovery +once a key is purged. + + Operator/break-glass tooling only — not part of the general SDK surface. + The endpoint is gated server-side and intentionally omitted from the public KMS + docs; do not expose it in application-facing flows. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `key_id`: `string`; `reason`: `string`; \} | +| `params.key_id` | `string` | +| `params.reason` | `string` | +| `adminToken` | `string` | + +#### Returns + +`Promise`\<[`KmsPurgeKeyResponse`](../interfaces/KmsPurgeKeyResponse.md)\> + +*** + +### getAttestation() + +> **getAttestation**(`nonce`): `Promise`\<[`KmsAttestationResponse`](../interfaces/KmsAttestationResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L167) + +TEE remote-attestation evidence bound to a caller nonce (`GET /attestation`, +#37). Public (no auth) — pass a fresh random `nonce` (hex, ≤64 bytes) to bind +the evidence + defeat replay, then verify the returned signed measurement. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `nonce` | `string` | + +#### Returns + +`Promise`\<[`KmsAttestationResponse`](../interfaces/KmsAttestationResponse.md)\> + +*** + +### getAttestationMeasurements() + +> **getAttestationMeasurements**(): `Promise`\<[`KmsAttestationManifestResponse`](../interfaces/KmsAttestationManifestResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L175) + +Ed25519-signed measurement manifest, version → ta_measurement +(`GET /.well-known/attestation-measurements.json`, #12). Public. + +#### Returns + +`Promise`\<[`KmsAttestationManifestResponse`](../interfaces/KmsAttestationManifestResponse.md)\> + +*** + +### getAttestationMeasurementsProof() + +> **getAttestationMeasurementsProof**(): `Promise`\<[`KmsAttestationProofResponse`](../interfaces/KmsAttestationProofResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L183) + +Sigsum transparency proof sidecar for the measurement manifest +(`GET /.well-known/attestation-measurements-proof.json`, #87). Public. + +#### Returns + +`Promise`\<[`KmsAttestationProofResponse`](../interfaces/KmsAttestationProofResponse.md)\> + +*** + +### health() + +> **health**(): `Promise`\<[`KmsHealthResponse`](../interfaces/KmsHealthResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L124) + +Liveness probe (`GET /health`, no auth). Does NOT require the KMS feature +flag to be enabled. + +#### Returns + +`Promise`\<[`KmsHealthResponse`](../interfaces/KmsHealthResponse.md)\> + +*** + +### queueStatus() + +> **queueStatus**(): `Promise`\<[`KmsQueueStatusResponse`](../interfaces/KmsQueueStatusResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L139) + +Request-queue health and circuit-breaker state (`GET /QueueStatus`). + +#### Returns + +`Promise`\<[`KmsQueueStatusResponse`](../interfaces/KmsQueueStatusResponse.md)\> + +*** + +### rollbackCounter() + +> **rollbackCounter**(): `Promise`\<[`KmsRollbackCounterResponse`](../interfaces/KmsRollbackCounterResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L148) + +RPMB anti-rollback monotonic counter (`GET /RollbackCounter`, diagnostic, +v0.20.0). + +#### Returns + +`Promise`\<[`KmsRollbackCounterResponse`](../interfaces/KmsRollbackCounterResponse.md)\> + +*** + +### stats() + +> **stats**(): `Promise`\<[`KmsStatsResponse`](../interfaces/KmsStatsResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L157) + +Machine-readable runtime statistics (`GET /stats`, v0.20.0) — wallets, tx, +queue, warnings. + +#### Returns + +`Promise`\<[`KmsStatsResponse`](../interfaces/KmsStatsResponse.md)\> + +*** + +### version() + +> **version**(): `Promise`\<[`KmsVersionResponse`](../interfaces/KmsVersionResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L132) + +Version / capability descriptor (`GET /version`, no auth). Does NOT require +the KMS feature flag to be enabled. + +#### Returns + +`Promise`\<[`KmsVersionResponse`](../interfaces/KmsVersionResponse.md)\> diff --git a/api/@aastar/airaccount/server/classes/KmsPaymentSigner.md b/api/@aastar/airaccount/server/classes/KmsPaymentSigner.md new file mode 100644 index 000000000..096424cb4 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsPaymentSigner.md @@ -0,0 +1,94 @@ +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L69) + +Convenience signers for SuperPaymaster payment flows (v0.20.0 P2). + +Each method maps to a fixed EIP-712 domain + type that the KMS builds host-side +and signs inside the TEE; the SDK only forwards the structured parameters. Every +endpoint accepts EITHER a one-time `webAuthnAssertion` in the body OR an agent +Bearer JWT — see [KmsPaymentAuth](../type-aliases/KmsPaymentAuth.md). + +Wraps a shared [KmsHttpClient](KmsHttpClient.md); reuse the same instance across the agent / +session / payment / monitor services. + +## Constructors + +### Constructor + +> **new KmsPaymentSigner**(`http`): `KmsPaymentSigner` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L70) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](KmsHttpClient.md) | + +#### Returns + +`KmsPaymentSigner` + +## Methods + +### signGTokenAuthorization() + +> **signGTokenAuthorization**(`params`, `auth`): `Promise`\<[`KmsPaymentSignatureResponse`](../interfaces/KmsPaymentSignatureResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L106) + +Sign an EIP-3009 TransferWithAuthorization for a GToken transfer +via `POST /kms/SignGTokenAuthorization`. `from` MUST equal the derived address. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignGTokenAuthorizationRequest`](../interfaces/KmsSignGTokenAuthorizationRequest.md) | +| `auth` | [`KmsPaymentAuth`](../type-aliases/KmsPaymentAuth.md) | + +#### Returns + +`Promise`\<[`KmsPaymentSignatureResponse`](../interfaces/KmsPaymentSignatureResponse.md)\> + +*** + +### signMicropaymentVoucher() + +> **signMicropaymentVoucher**(`params`, `auth`): `Promise`\<[`KmsPaymentSignatureResponse`](../interfaces/KmsPaymentSignatureResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L94) + +Sign a MicroPaymentChannel voucher (cumulative-amount EIP-712 message) +via `POST /kms/SignMicropaymentVoucher`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignMicropaymentVoucherRequest`](../interfaces/KmsSignMicropaymentVoucherRequest.md) | +| `auth` | [`KmsPaymentAuth`](../type-aliases/KmsPaymentAuth.md) | + +#### Returns + +`Promise`\<[`KmsPaymentSignatureResponse`](../interfaces/KmsPaymentSignatureResponse.md)\> + +*** + +### signX402Payment() + +> **signX402Payment**(`params`, `auth`): `Promise`\<[`KmsPaymentSignatureResponse`](../interfaces/KmsPaymentSignatureResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L117) + +Sign an x402 payment authorization via `POST /kms/SignX402Payment`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`KmsSignX402PaymentRequest`](../interfaces/KmsSignX402PaymentRequest.md) | +| `auth` | [`KmsPaymentAuth`](../type-aliases/KmsPaymentAuth.md) | + +#### Returns + +`Promise`\<[`KmsPaymentSignatureResponse`](../interfaces/KmsPaymentSignatureResponse.md)\> diff --git a/api/@aastar/airaccount/server/classes/KmsSessionService.md b/api/@aastar/airaccount/server/classes/KmsSessionService.md new file mode 100644 index 000000000..dcbd10e2b --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsSessionService.md @@ -0,0 +1,158 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L88) + +Manages the lifecycle of a P-256 session key minted under a human key for +ERC-4337 UserOp signing (AAStar TEE KMS v0.20.0). + +A session key is created under a root (human) key, used to sign UserOps via a +TEE-issued bearer JWT (the `agentCredential`), and eventually revoked. The +per-UserOp signature is the 149-byte P256 session-key wire format. + +Relationship to [KmsManager.signP256GrantSession](KmsManager.md#signp256grantsession): that method signs the +GRANT_P256_SESSION_V2 authorization needed to *install* this key on-chain +(granting the session key its on-chain scope/policies). This service instead +manages the session key's own lifecycle (create / sign / revoke) once granted. + +Create and revoke are WebAuthn-gated: the challenge originates from a generic +[KmsManager.beginAuthentication](KmsManager.md#beginauthentication) ceremony and the caller supplies the +resulting assertion. Per-UserOp signing authenticates with the bearer JWT. + +Wraps a shared [KmsHttpClient](KmsHttpClient.md) — pass `KmsManager.httpClient`. + +## Constructors + +### Constructor + +> **new KmsSessionService**(`http`): `KmsSessionService` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L89) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](KmsHttpClient.md) | + +#### Returns + +`KmsSessionService` + +## Methods + +### createP256SessionKey() + +> **createP256SessionKey**(`params`): `Promise`\<[`CreateP256SessionKeyResponse`](../interfaces/CreateP256SessionKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L99) + +Create a P-256 session key under a human key (WebAuthn-gated). + +`POST /kms/create-p256-session-key`. The `webAuthnAssertion` challenge comes +from a generic [KmsManager.beginAuthentication](KmsManager.md#beginauthentication) ceremony supplied by +the caller. Returns the session key's public key plus an `agentCredential` +JWT used to authenticate subsequent [signP256UserOp](#signp256userop) calls. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`CreateP256SessionKeyRequest`](../interfaces/CreateP256SessionKeyRequest.md) | + +#### Returns + +`Promise`\<[`CreateP256SessionKeyResponse`](../interfaces/CreateP256SessionKeyResponse.md)\> + +*** + +### createP256SessionKeyWithCeremony() + +> **createP256SessionKeyWithCeremony**(`params`, `signer`, `options?`): `Promise`\<[`CreateP256SessionKeyResponse`](../interfaces/CreateP256SessionKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L155) + +Create a P-256 session key, running the challenge-binding ceremony internally. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`CreateP256SessionKeyRequest`](../interfaces/CreateP256SessionKeyRequest.md), `"webAuthnAssertion"`\> | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`CreateP256SessionKeyResponse`](../interfaces/CreateP256SessionKeyResponse.md)\> + +*** + +### revokeP256SessionKey() + +> **revokeP256SessionKey**(`params`): `Promise`\<[`RevokeP256SessionKeyResponse`](../interfaces/RevokeP256SessionKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L137) + +Revoke a P-256 session key (WebAuthn-gated, idempotent). + +`POST /kms/revoke-p256-session-key`. The `webAuthnAssertion` challenge comes +from a generic [KmsManager.beginAuthentication](KmsManager.md#beginauthentication) ceremony supplied by +the caller. Idempotent: revoking an already-revoked key still resolves. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`RevokeP256SessionKeyRequest`](../interfaces/RevokeP256SessionKeyRequest.md) | + +#### Returns + +`Promise`\<[`RevokeP256SessionKeyResponse`](../interfaces/RevokeP256SessionKeyResponse.md)\> + +*** + +### revokeP256SessionKeyWithCeremony() + +> **revokeP256SessionKeyWithCeremony**(`params`, `humanKeyId`, `signer`, `options?`): `Promise`\<[`RevokeP256SessionKeyResponse`](../interfaces/RevokeP256SessionKeyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L175) + +Revoke a P-256 session key, running the challenge-binding ceremony internally. +`humanKeyId` is the owning human key challenged by the ceremony (distinct from +the session `keyId` in `params`). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`RevokeP256SessionKeyRequest`](../interfaces/RevokeP256SessionKeyRequest.md), `"webAuthnAssertion"`\> | +| `humanKeyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +#### Returns + +`Promise`\<[`RevokeP256SessionKeyResponse`](../interfaces/RevokeP256SessionKeyResponse.md)\> + +*** + +### signP256UserOp() + +> **signP256UserOp**(`params`, `jwt`): `Promise`\<[`SignP256UserOpResponse`](../interfaces/SignP256UserOpResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L117) + +Sign an ERC-4337 UserOp hash with a P-256 session key (Bearer JWT auth). + +`POST /kms/sign-p256-user-op`, authenticated with the `agentCredential` JWT +returned by [createP256SessionKey](#createp256sessionkey). Returns the 149-byte P256 +session-key wire-format signature. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`SignP256UserOpRequest`](../interfaces/SignP256UserOpRequest.md) | +| `jwt` | `string` | + +#### Returns + +`Promise`\<[`SignP256UserOpResponse`](../interfaces/SignP256UserOpResponse.md)\> diff --git a/api/@aastar/airaccount/server/classes/KmsSigner.md b/api/@aastar/airaccount/server/classes/KmsSigner.md new file mode 100644 index 000000000..6fe898ce4 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/KmsSigner.md @@ -0,0 +1,63 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:775](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L775) + +KMS-backed signer with Passkey assertion. + +Each signing operation calls the `assertionProvider` to obtain a Legacy +Passkey assertion, which is then passed to KMS SignHash. The Legacy format +is reusable (no challenge consumption), enabling BLS dual-signing. + +Narrowed during the ethers -> viem migration: only the EIP-191 personal-sign +and address-read behaviour is actually consumed by the SDK, so the former +ethers.AbstractSigner surface (signTransaction / signTypedData / connect / +provider) has been dropped. + +## Constructors + +### Constructor + +> **new KmsSigner**(`keyId`, `_address`, `kmsManager`, `assertionProvider`): `KmsSigner` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:776](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L776) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `keyId` | `string` | +| `_address` | `string` | +| `kmsManager` | [`KmsManager`](KmsManager.md) | +| `assertionProvider` | () => `Promise`\<[`LegacyPasskeyAssertion`](../interfaces/LegacyPasskeyAssertion.md)\> | + +#### Returns + +`KmsSigner` + +## Methods + +### getAddress() + +> **getAddress**(): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:783](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L783) + +#### Returns + +`Promise`\<`string`\> + +*** + +### signMessage() + +> **signMessage**(`message`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:787](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L787) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` \| `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/airaccount/server/classes/LocalWalletSigner.md b/api/@aastar/airaccount/server/classes/LocalWalletSigner.md new file mode 100644 index 000000000..444c69b71 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/LocalWalletSigner.md @@ -0,0 +1,107 @@ +Defined in: [packages/airaccount/src/server/adapters/local-wallet-signer.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/local-wallet-signer.ts#L11) + +Local wallet signer — backs all users with a single private key. +Suitable for testing, demos, and single-tenant server setups. + +For multi-tenant production use, implement ISignerAdapter with +per-user key management (e.g., KMS, HSM, or encrypted database). + +## Implements + +- [`ISignerAdapter`](../interfaces/ISignerAdapter.md) + +## Constructors + +### Constructor + +> **new LocalWalletSigner**(`privateKey`): `LocalWalletSigner` + +Defined in: [packages/airaccount/src/server/adapters/local-wallet-signer.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/local-wallet-signer.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `privateKey` | `string` | + +#### Returns + +`LocalWalletSigner` + +## Methods + +### ensureSigner() + +> **ensureSigner**(`_userId`): `Promise`\<\{ `address`: `` `0x${string}` ``; \}\> + +Defined in: [packages/airaccount/src/server/adapters/local-wallet-signer.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/local-wallet-signer.ts#L33) + +Ensure a signer exists for the user (create on demand if needed). +Returns the signer's address. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `_userId` | `string` | + +#### Returns + +`Promise`\<\{ `address`: `` `0x${string}` ``; \}\> + +#### Implementation of + +[`ISignerAdapter`](../interfaces/ISignerAdapter.md).[`ensureSigner`](../interfaces/ISignerAdapter.md#ensuresigner) + +*** + +### getAddress() + +> **getAddress**(`_userId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/adapters/local-wallet-signer.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/local-wallet-signer.ts#L18) + +Get the EOA address for a given user. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `_userId` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Implementation of + +[`ISignerAdapter`](../interfaces/ISignerAdapter.md).[`getAddress`](../interfaces/ISignerAdapter.md#getaddress) + +*** + +### signMessage() + +> **signMessage**(`_userId`, `message`, `_ctx?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/adapters/local-wallet-signer.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/local-wallet-signer.ts#L22) + +Sign a message for a given user, applying EIP-191 personal-sign semantics +(equivalent to ethers `signer.signMessage(bytes)` / viem +`account.signMessage({ raw: bytes })`). A `Uint8Array` (or raw `0x` hex) is +signed as raw bytes — callers pass a 32-byte digest, NOT UTF-8 text. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `_userId` | `string` | - | +| `message` | `` `0x${string}` `` \| `Uint8Array` | - | +| `_ctx?` | [`PasskeyAssertionContext`](../interfaces/PasskeyAssertionContext.md) | optional Passkey assertion context for KMS-backed signers. | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Implementation of + +[`ISignerAdapter`](../interfaces/ISignerAdapter.md).[`signMessage`](../interfaces/ISignerAdapter.md#signmessage) diff --git a/api/@aastar/airaccount/server/classes/MemoryStorage.md b/api/@aastar/airaccount/server/classes/MemoryStorage.md new file mode 100644 index 000000000..ae2b76451 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/MemoryStorage.md @@ -0,0 +1,296 @@ +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L13) + +In-memory storage adapter — useful for testing and demos. +All data is lost when the process exits. + +## Implements + +- [`IStorageAdapter`](../interfaces/IStorageAdapter.md) + +## Constructors + +### Constructor + +> **new MemoryStorage**(): `MemoryStorage` + +#### Returns + +`MemoryStorage` + +## Methods + +### findAccountByUserId() + +> **findAccountByUserId**(`userId`): `Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L29) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md) \| `null`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`findAccountByUserId`](../interfaces/IStorageAdapter.md#findaccountbyuserid) + +*** + +### findTransferById() + +> **findTransferById**(`id`): `Promise`\<[`TransferRecord`](../interfaces/TransferRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L50) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`TransferRecord`](../interfaces/TransferRecord.md) \| `null`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`findTransferById`](../interfaces/IStorageAdapter.md#findtransferbyid) + +*** + +### findTransfersByUserId() + +> **findTransfersByUserId**(`userId`): `Promise`\<[`TransferRecord`](../interfaces/TransferRecord.md)[]\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L46) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`TransferRecord`](../interfaces/TransferRecord.md)[]\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`findTransfersByUserId`](../interfaces/IStorageAdapter.md#findtransfersbyuserid) + +*** + +### getAccounts() + +> **getAccounts**(): `Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md)[]\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L21) + +#### Returns + +`Promise`\<[`AccountRecord`](../interfaces/AccountRecord.md)[]\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`getAccounts`](../interfaces/IStorageAdapter.md#getaccounts) + +*** + +### getBlsConfig() + +> **getBlsConfig**(): `Promise`\<[`BlsConfigRecord`](../interfaces/BlsConfigRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L90) + +#### Returns + +`Promise`\<[`BlsConfigRecord`](../interfaces/BlsConfigRecord.md) \| `null`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`getBlsConfig`](../interfaces/IStorageAdapter.md#getblsconfig) + +*** + +### getPaymasters() + +> **getPaymasters**(`userId`): `Promise`\<[`PaymasterRecord`](../interfaces/PaymasterRecord.md)[]\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L63) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`PaymasterRecord`](../interfaces/PaymasterRecord.md)[]\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`getPaymasters`](../interfaces/IStorageAdapter.md#getpaymasters) + +*** + +### removePaymaster() + +> **removePaymaster**(`userId`, `name`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L78) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `name` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`removePaymaster`](../interfaces/IStorageAdapter.md#removepaymaster) + +*** + +### saveAccount() + +> **saveAccount**(`account`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | [`AccountRecord`](../interfaces/AccountRecord.md) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`saveAccount`](../interfaces/IStorageAdapter.md#saveaccount) + +*** + +### savePaymaster() + +> **savePaymaster**(`userId`, `paymaster`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `paymaster` | [`PaymasterRecord`](../interfaces/PaymasterRecord.md) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`savePaymaster`](../interfaces/IStorageAdapter.md#savepaymaster) + +*** + +### saveTransfer() + +> **saveTransfer**(`transfer`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L42) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `transfer` | [`TransferRecord`](../interfaces/TransferRecord.md) | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`saveTransfer`](../interfaces/IStorageAdapter.md#savetransfer) + +*** + +### updateAccount() + +> **updateAccount**(`userId`, `updates`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L33) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `updates` | `Partial`\<[`AccountRecord`](../interfaces/AccountRecord.md)\> | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`updateAccount`](../interfaces/IStorageAdapter.md#updateaccount) + +*** + +### updateSignerNodesCache() + +> **updateSignerNodesCache**(`nodes`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L94) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `nodes` | `unknown`[] | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`updateSignerNodesCache`](../interfaces/IStorageAdapter.md#updatesignernodescache) + +*** + +### updateTransfer() + +> **updateTransfer**(`id`, `updates`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/adapters/memory-storage.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/adapters/memory-storage.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `id` | `string` | +| `updates` | `Partial`\<[`TransferRecord`](../interfaces/TransferRecord.md)\> | + +#### Returns + +`Promise`\<`void`\> + +#### Implementation of + +[`IStorageAdapter`](../interfaces/IStorageAdapter.md).[`updateTransfer`](../interfaces/IStorageAdapter.md#updatetransfer) diff --git a/api/@aastar/airaccount/server/classes/ModuleManager.md b/api/@aastar/airaccount/server/classes/ModuleManager.md new file mode 100644 index 000000000..bdef00268 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/ModuleManager.md @@ -0,0 +1,240 @@ +Defined in: [packages/airaccount/src/server/services/module-manager.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L105) + +ModuleManager — ERC-7579 module install/uninstall helpers. + +Handles the guardian-sig packing required by AAStarAirAccountV7: + installModule(moduleTypeId, module, guardianSigs ‖ moduleInitData) + uninstallModule(moduleTypeId, module, guardianSig1 ‖ guardianSig2 ‖ deInitData) + +## Constructors + +### Constructor + +> **new ModuleManager**(`provider`, `chainId`): `ModuleManager` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L109) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key` | `string` | A key for the client. | +| `provider.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name` | `string` | A name for the client. | +| `provider.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type` | `string` | The type of client. | +| `provider.uid` | `string` | A unique ID for the client. | +| `provider.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `chainId` | `number` | - | + +#### Returns + +`ModuleManager` + +## Methods + +### encodeInstall() + +> **encodeInstall**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L118) + +Encode calldata for installModule(). +Caller is responsible for submitting via UserOp (EntryPoint) or direct tx. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`InstallModuleParams`](../interfaces/InstallModuleParams.md) | + +#### Returns + +`string` + +*** + +### encodeInstallDefaultModules() + +> **encodeInstallDefaultModules**(`account`): `object` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:186](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L186) + +Convenience: build install calldata for the standard M7 module set. +Uses pre-deployed Sepolia addresses (r4 audit-final). No guardian sigs required when +account threshold <= 40 (default for newly created accounts). + +Note: beta.3 unifies these into SessionKeyValidator. This helper retains the r4 +addresses for accounts already deployed on r4; new accounts use SessionKeyValidator. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | + +#### Returns + +`object` + +##### compositeValidator + +> **compositeValidator**: `string` + +##### tierGuardHook + +> **tierGuardHook**: `string` + +*** + +### encodeUninstall() + +> **encodeUninstall**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L139) + +Encode calldata for uninstallModule(). +Always requires 2 guardian signatures. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`UninstallModuleParams`](../interfaces/UninstallModuleParams.md) | + +#### Returns + +`string` + +*** + +### installHash() + +> **installHash**(`account`, `moduleTypeId`, `module`, `moduleInitData`): `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L169) + +Return the install hash for a guardian to sign (r5 format, includes moduleInitData hash). + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `account` | `string` | `undefined` | +| `moduleTypeId` | [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) | `undefined` | +| `module` | `string` | `undefined` | +| `moduleInitData` | `string` | `"0x"` | + +#### Returns + +`string` + +*** + +### isInstalled() + +> **isInstalled**(`account`, `moduleTypeId`, `module`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L155) + +Check if a module is currently installed on the account. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `moduleTypeId` | [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) | +| `module` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### uninstallHash() + +> **uninstallHash**(`account`, `moduleTypeId`, `module`): `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L174) + +Return the uninstall hash for guardians to sign. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `moduleTypeId` | [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) | +| `module` | `string` | + +#### Returns + +`string` diff --git a/api/@aastar/airaccount/server/classes/P256PasskeySigner.md b/api/@aastar/airaccount/server/classes/P256PasskeySigner.md new file mode 100644 index 000000000..13cd38d57 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/P256PasskeySigner.md @@ -0,0 +1,86 @@ +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L109) + +Server/test [PasskeyCeremonySigner](../interfaces/PasskeyCeremonySigner.md) backed by a raw P-256 private key +(the passkey bound to the KMS key). Mirrors `p256_helper.py`'s +`make_ceremony_assertion`: ES256 DER signature over the WebAuthn message. + +## Implements + +- [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) + +## Constructors + +### Constructor + +> **new P256PasskeySigner**(`privateKey`, `credentialId`): `P256PasskeySigner` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L117) + +#### Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `privateKey` | `string` \| `Uint8Array` | `undefined` | raw 32-byte P-256 scalar (Uint8Array or hex, 0x optional). | +| `credentialId` | `string` | `DEFAULT_CREDENTIAL_ID` | base64url credential id (defaults to the reference fixture). | + +#### Returns + +`P256PasskeySigner` + +## Properties + +### credentialId + +> `readonly` **credentialId**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L110) + +base64url credential id registered with the KMS for this passkey. + +#### Implementation of + +[`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md).[`credentialId`](../interfaces/PasskeyCeremonySigner.md#credentialid) + +## Accessors + +### publicKeyHex + +#### Get Signature + +> **get** **publicKeyHex**(): `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L127) + +Uncompressed (0x04…, 65-byte) P-256 public key hex. Register this with the +KMS via CreateKey `PasskeyPublicKey` (or ChangePasskey) so the TA can verify +assertions produced by this signer. + +##### Returns + +`string` + +## Methods + +### sign() + +> **sign**(`message`): `Uint8Array` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L131) + +Sign the WebAuthn message (authenticatorData || SHA-256(clientDataJSON)). +MUST return a DER-encoded ES256 signature (ECDSA P-256 with SHA-256 applied +to the message), matching the WebAuthn wire format. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `Uint8Array` | + +#### Returns + +`Uint8Array` + +#### Implementation of + +[`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md).[`sign`](../interfaces/PasskeyCeremonySigner.md#sign) diff --git a/api/@aastar/airaccount/server/classes/PaymasterManager.md b/api/@aastar/airaccount/server/classes/PaymasterManager.md new file mode 100644 index 000000000..e8b420eba --- /dev/null +++ b/api/@aastar/airaccount/server/classes/PaymasterManager.md @@ -0,0 +1,195 @@ +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L46) + +Paymaster manager — extracted from NestJS PaymasterService. +Storage via IStorageAdapter instead of filesystem JSON files. + +## Constructors + +### Constructor + +> **new PaymasterManager**(`ethereum`, `storage`, `logger?`): `PaymasterManager` + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L49) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ethereum` | [`EthereumProvider`](EthereumProvider.md) | +| `storage` | [`IStorageAdapter`](../interfaces/IStorageAdapter.md) | +| `logger?` | [`ILogger`](../interfaces/ILogger.md) | + +#### Returns + +`PaymasterManager` + +## Methods + +### addCustomPaymaster() + +> **addCustomPaymaster**(`userId`, `name`, `address`, `type`, `apiKey?`, `endpoint?`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L68) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `userId` | `string` | `undefined` | +| `name` | `string` | `undefined` | +| `address` | `string` | `undefined` | +| `type` | `"pimlico"` \| `"stackup"` \| `"alchemy"` \| `"custom"` | `"custom"` | +| `apiKey?` | `string` | `undefined` | +| `endpoint?` | `string` | `undefined` | + +#### Returns + +`Promise`\<`void`\> + +*** + +### checkPriceFreshness() + +> **checkPriceFreshness**(`paymasterAddress`): `Promise`\<\{ `ageSeconds`: `number`; `fresh`: `boolean`; `thresholdSeconds`: `number`; \}\> + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L97) + +Check whether a paymaster's on-chain price cache is still fresh. +Returns `{ fresh, ageSeconds, thresholdSeconds }`. +Throws if the contract does not implement `cachedPriceTimestamp()` / `priceStalenessThreshold()`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymasterAddress` | `string` | + +#### Returns + +`Promise`\<\{ `ageSeconds`: `number`; `fresh`: `boolean`; `thresholdSeconds`: `number`; \}\> + +*** + +### getAvailablePaymasters() + +> **getAvailablePaymasters**(`userId`): `Promise`\<`object`[]\> + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L57) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<`object`[]\> + +*** + +### getPaymasterData() + +> **getPaymasterData**(`userId`, `paymasterName`, `userOp`, `entryPoint`, `customAddress?`, `options?`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L148) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `paymasterName` | `string` | +| `userOp` | `unknown` | +| `entryPoint` | `string` | +| `customAddress?` | `string` | +| `options?` | \{ `tokenAddress?`: `string`; \} | +| `options.tokenAddress?` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### removeCustomPaymaster() + +> **removeCustomPaymaster**(`userId`, `name`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L88) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `name` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### updatePrice() + +> **updatePrice**(`paymasterAddress`, `walletClient`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L129) + +Call `updatePrice()` on a paymaster contract (permissionless). +Useful when `checkPriceFreshness()` reports stale price. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `paymasterAddress` | `string` | - | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | A viem WalletClient (with an account) that will send the transaction (must have gas). Replaces the former ethers Signer param. | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/airaccount/server/classes/PaymasterPriceStalenessError.md b/api/@aastar/airaccount/server/classes/PaymasterPriceStalenessError.md new file mode 100644 index 000000000..4ae794fef --- /dev/null +++ b/api/@aastar/airaccount/server/classes/PaymasterPriceStalenessError.md @@ -0,0 +1,158 @@ +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L15) + +Thrown when a paymaster's on-chain price cache is stale. +Caller should invoke `paymasterManager.updatePrice(paymasterAddress)` before retrying. + +## Extends + +- `Error` + +## Constructors + +### Constructor + +> **new PaymasterPriceStalenessError**(`paymasterAddress`, `ageSeconds`, `thresholdSeconds`): `PaymasterPriceStalenessError` + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymasterAddress` | `string` | +| `ageSeconds` | `number` | +| `thresholdSeconds` | `number` | + +#### Returns + +`PaymasterPriceStalenessError` + +#### Overrides + +`Error.constructor` + +## Properties + +### ageSeconds + +> `readonly` **ageSeconds**: `number` + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L18) + +*** + +### message + +> **message**: `string` + +Defined in: node\_modules/.pnpm/typescript@5.6.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +#### Inherited from + +`Error.message` + +*** + +### name + +> **name**: `string` + +Defined in: node\_modules/.pnpm/typescript@5.6.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +#### Inherited from + +`Error.name` + +*** + +### paymasterAddress + +> `readonly` **paymasterAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L17) + +*** + +### stack? + +> `optional` **stack**: `string` + +Defined in: node\_modules/.pnpm/typescript@5.6.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 + +#### Inherited from + +`Error.stack` + +*** + +### thresholdSeconds + +> `readonly` **thresholdSeconds**: `number` + +Defined in: [packages/airaccount/src/server/services/paymaster-manager.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/paymaster-manager.ts#L19) + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Defined in: node\_modules/.pnpm/@types+node@20.11.5/node\_modules/@types/node/globals.d.ts:28 + +Optional override for formatting stack traces + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +Defined in: node\_modules/.pnpm/@types+node@20.11.5/node\_modules/@types/node/globals.d.ts:30 + +#### Inherited from + +`Error.stackTraceLimit` + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/.pnpm/@types+node@20.11.5/node\_modules/@types/node/globals.d.ts:21 + +Create .stack property on a target object + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` diff --git a/api/@aastar/airaccount/server/classes/RecoveryService.md b/api/@aastar/airaccount/server/classes/RecoveryService.md new file mode 100644 index 000000000..81ffad8de --- /dev/null +++ b/api/@aastar/airaccount/server/classes/RecoveryService.md @@ -0,0 +1,306 @@ +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L126) + +RecoveryService — typed wrappers for AirAccount's on-chain social / guardian +recovery (capability F28). Unlike `ForceExitService` (an ERC-7579 module), +these functions live directly on the account contract, so every encoded +calldata below is meant to be submitted **to the account address itself** +(via a direct tx or a UserOp). + +## Threshold & timelock +2-of-3 guardians ([RECOVERY\_THRESHOLD](../variables/RECOVERY_THRESHOLD.md) of [MAX\_GUARDIANS](../variables/MAX_GUARDIANS.md)), with a +[RECOVERY\_TIMELOCK\_SECONDS](../variables/RECOVERY_TIMELOCK_SECONDS.md) (2-day) delay before execution. + +## Lifecycle & who-can-call + 1. `addGuardian(guardian)` — **owner only**. Registers a guardian (max 3). + 2. `proposeRecovery(newOwner)` — **any guardian**. Starts the timelock and + records the proposer's approval bit (counts as the first of 2 approvals). + 3. `approveRecovery()` — **another guardian**. Sets its approval bit; once + 2-of-3 approvals are reached the threshold is satisfied. + 4. `executeRecovery()` — **anyone**, but only after the timelock has elapsed + AND the approval threshold is met. Rotates `owner` to `newOwner`. + 5. `cancelRecovery()` — **guardians only** (2-of-3 votes). The owner cannot + cancel: a thief who stole the owner key must not be able to block a + legitimate recovery. Each guardian votes independently. + 6. `removeGuardian(index, guardianSigs)` — **owner**, but additionally + requires >= [RECOVERY\_THRESHOLD](../variables/RECOVERY_THRESHOLD.md) guardian signatures over the + removal hash (and cannot drop below 2 guardians). + +Guardian signatures are domain-separated per operation (the contract hashes a +per-op label such as "REMOVE_GUARDIAN") to prevent cross-operation replay. + +## Re-proposing +A new proposal reverts with `RecoveryAlreadyActive` while one is pending. The +docs reference a `clearStaleRecovery()` helper, but that function is NOT +present in the deployed V7 ABI/contract — a stale proposal must instead be +cleared via guardian `cancelRecovery()` votes before re-proposing. + +## Constructors + +### Constructor + +> **new RecoveryService**(`client`): `RecoveryService` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L132) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | viem read client (was `ethers.Provider | ethers.Signer`). Only on-chain reads are performed here; calldata encoders are pure and never touch the client. | +| `client.account` | `undefined` | The Account of the Client. | +| `client.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `client.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `client.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `client.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `client.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `client.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `client.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `client.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `client.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `client.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `client.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `client.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `client.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `client.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `client.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `client.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `client.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `client.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `client.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `client.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `client.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `client.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `client.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `client.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `client.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `client.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `client.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `client.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `client.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `client.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `client.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `client.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `client.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `client.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.key` | `string` | A key for the client. | +| `client.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `client.name` | `string` | A name for the client. | +| `client.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `client.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `client.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `client.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `client.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `client.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `client.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `client.type` | `string` | The type of client. | +| `client.uid` | `string` | A unique ID for the client. | +| `client.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `client.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `client.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `client.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `client.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `client.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `client.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `client.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `client.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `client.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | + +#### Returns + +`RecoveryService` + +## Methods + +### encodeAddGuardian() + +> **encodeAddGuardian**(`guardian`): `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:141](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L141) + +Encode `addGuardian(guardian)` calldata. **Owner only.** +Registers a recovery guardian; reverts once 3 guardians are set, or if the +guardian is `address(0)`, the owner, or already registered. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `guardian` | `string` | + +#### Returns + +`string` + +*** + +### encodeApproveRecovery() + +> **encodeApproveRecovery**(): `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:182](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L182) + +Encode `approveRecovery()` calldata. **Another guardian** approves the +active proposal, setting its bit in `approvalBitmap`. + +#### Returns + +`string` + +*** + +### encodeCancelRecovery() + +> **encodeCancelRecovery**(): `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L195) + +Encode `cancelRecovery()` calldata. **Guardians only** — each call is one +vote; recovery is dropped once [RECOVERY\_THRESHOLD](../variables/RECOVERY_THRESHOLD.md) cancel votes are +reached. The owner cannot cancel. + +#### Returns + +`string` + +*** + +### encodeExecuteRecovery() + +> **encodeExecuteRecovery**(): `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:208](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L208) + +Encode `executeRecovery()` calldata. **Anyone** may call, but it only +succeeds once the timelock has elapsed and the approval threshold is met. +Rotates the account owner to the proposed `newOwner`. + +#### Returns + +`string` + +*** + +### encodeProposeRecovery() + +> **encodeProposeRecovery**(`newOwner`): `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L170) + +Encode `proposeRecovery(newOwner)` calldata. **Any guardian** may call. +Starts the [RECOVERY\_TIMELOCK\_SECONDS](../variables/RECOVERY_TIMELOCK_SECONDS.md) timelock and records the +proposer's approval (1 of [RECOVERY\_THRESHOLD](../variables/RECOVERY_THRESHOLD.md)). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `newOwner` | `string` | + +#### Returns + +`string` + +*** + +### encodeRemoveGuardian() + +> **encodeRemoveGuardian**(`index`, `guardianSigs`): `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L157) + +Encode `removeGuardian(index, guardianSigs)` calldata. **Owner only**, and +requires >= [RECOVERY\_THRESHOLD](../variables/RECOVERY_THRESHOLD.md) guardian signatures over the removal +hash. Cannot remove while a recovery is active, nor drop below 2 guardians. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `index` | `number` | Guardian slot to remove (0-indexed). | +| `guardianSigs` | `string`[] | EIP-191 guardian signatures over the removal hash. | + +#### Returns + +`string` + +*** + +### getActiveRecovery() + +> **getActiveRecovery**(`account`): `Promise`\<[`ActiveRecovery`](../interfaces/ActiveRecovery.md)\> + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L225) + +Read and decode the account's `activeRecovery()` struct. +Returns derived `approvalCount`, `cancellationCount`, `executeAfter`, and +`isActive` alongside the raw fields. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | The AirAccount address to query. | + +#### Returns + +`Promise`\<[`ActiveRecovery`](../interfaces/ActiveRecovery.md)\> + +*** + +### getGuardianCount() + +> **getGuardianCount**(`account`): `Promise`\<`number`\> + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:254](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L254) + +Read the number of registered guardians via `guardianCount()`. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | The AirAccount address to query. | + +#### Returns + +`Promise`\<`number`\> + +*** + +### getGuardians() + +> **getGuardians**(`account`): `Promise`\<`string`[]\> + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:273](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L273) + +Read the full guardian address list. + +The V7 account exposes positional `guardians(uint256 i)` (3 packed slots) plus +`guardianCount()` — there is no single `getGuardians()` getter on the account +(that exists only on `AirAccountDelegate`, the EIP-7702 path). This reads slots +`0..guardianCount-1` and returns the non-zero guardian addresses. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | The AirAccount address to query. | + +#### Returns + +`Promise`\<`string`[]\> diff --git a/api/@aastar/airaccount/server/classes/SessionKeyService.md b/api/@aastar/airaccount/server/classes/SessionKeyService.md new file mode 100644 index 000000000..4febcea88 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/SessionKeyService.md @@ -0,0 +1,484 @@ +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L193) + +SessionKeyService — manage M6 (basic) and M7 (agent) session keys. + +M6 SessionKeyValidator (algId=0x08): + Simple time-limited ECDSA/P256 key with optional contract+selector scope. + Used for standard delegated actions (hot wallet, automated tasks). + +M7 AgentSessionKeyValidator (algId=0x09): + Rich session key for AI agents: velocity limits, spend caps, call allowlists, + hierarchical delegation (parent → sub-agent with scope narrowing). + +## Constructors + +### Constructor + +> **new SessionKeyService**(`provider`, `sessionKeyValidatorAddress`, `agentSessionKeyValidatorAddress`): `SessionKeyService` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L197) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key` | `string` | A key for the client. | +| `provider.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name` | `string` | A name for the client. | +| `provider.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type` | `string` | The type of client. | +| `provider.uid` | `string` | A unique ID for the client. | +| `provider.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `sessionKeyValidatorAddress` | `string` | - | +| `agentSessionKeyValidatorAddress` | `string` | - | + +#### Returns + +`SessionKeyService` + +## Methods + +### buildGrantHash() + +> **buildGrantHash**(`params`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:220](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L220) + +Build the hash that the account owner must sign to grant a session key. +Use grantSession() with this sig, or grantSessionDirect() from the account itself. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`GrantSessionParams`](../interfaces/GrantSessionParams.md), `"ownerSig"`\> | + +#### Returns + +`Promise`\<`string`\> + +*** + +### buildP256GrantHash() + +> **buildP256GrantHash**(`params`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:286](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L286) + +Build the hash that the account owner must sign to grant a P256/passkey session key. +Use grantP256Session() with this sig, or grantP256SessionDirect() from the owner EOA itself. +The owner/KMS signs this hash to authorize a gasless grantP256Session(). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | `Omit`\<[`GrantP256SessionParams`](../interfaces/GrantP256SessionParams.md), `"ownerSig"`\> | + +#### Returns + +`Promise`\<`string`\> + +*** + +### encodeDelegateSession() + +> **encodeDelegateSession**(`account`, `subKey`, `subCfg`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:382](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L382) + +Encode calldata for delegateSession() — sub-agent delegation. +The sub-agent config must be a strict subset of the parent session's scope. +Called by the parent session key (not the account owner). + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | The smart account under which the parent session was granted. | +| `subKey` | `string` | - | +| `subCfg` | [`AgentSessionConfig`](../interfaces/AgentSessionConfig.md) | - | + +#### Returns + +`string` + +*** + +### encodeGrantAgentSession() + +> **encodeGrantAgentSession**(`sessionKey`, `cfg`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:358](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L358) + +Encode calldata for grantAgentSession(). +Must be called from the account (via UserOp or direct execute). +The contract uses msg.sender as the account — no account param needed. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `sessionKey` | `string` | +| `cfg` | [`AgentSessionConfig`](../interfaces/AgentSessionConfig.md) | + +#### Returns + +`string` + +*** + +### encodeGrantP256Session() + +> **encodeGrantP256Session**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:325](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L325) + +Encode calldata for a P256/passkey session grant. + +- **With ownerSig** → `grantP256Session()` — for gasless/UserOp flows. + Owner signs the buildP256GrantHash() digest via KMS `sign-p256-grant-session`, + then the relayer calls `grantP256Session(account, keyX, keyY, cfg, ownerSig)` on-chain. + This is the ONLY path for ERC-4337 sponsored / gasless P256 grant flows. + +- **Without ownerSig** → `grantP256SessionDirect()` — **owner EOA direct-send only**. + Since v0.17.2 round 3, `grantP256SessionDirect` requires `msg.sender == ownerOf(account)`. + It does NOT accept `msg.sender == account` (removed in round 3 — confused-deputy fix). + Do NOT encode this for a UserOp callData; the EntryPoint is not the owner EOA. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`GrantP256SessionParams`](../interfaces/GrantP256SessionParams.md) | + +#### Returns + +`string` + +*** + +### encodeGrantSession() + +> **encodeGrantSession**(`params`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:253](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L253) + +Encode calldata for session grant. + +- **With ownerSig** → `grantSession()` — for gasless/UserOp flows. + Owner signs the GRANT_SESSION_V2 typed hash via KMS `sign-grant-session`, + then the relayer calls `grantSession(account, key, cfg, ownerSig)` on-chain. + This is the ONLY path for ERC-4337 sponsored / gasless grant flows. + +- **Without ownerSig** → `grantSessionDirect()` — **owner EOA direct-send only**. + Since v0.17.2 round 3, `grantSessionDirect` requires `msg.sender == ownerOf(account)`. + It does NOT accept `msg.sender == account` (removed in round 3 — confused-deputy fix). + Do NOT encode this for a UserOp callData; the EntryPoint is not the owner EOA. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`GrantSessionParams`](../interfaces/GrantSessionParams.md) | + +#### Returns + +`string` + +*** + +### encodeRevokeAgentSession() + +> **encodeRevokeAgentSession**(`sessionKey`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:402](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L402) + +Encode calldata for revokeAgentSession(). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `sessionKey` | `string` | + +#### Returns + +`string` + +*** + +### encodeRevokeP256Session() + +> **encodeRevokeP256Session**(`account`, `keyX`, `keyY`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:343](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L343) + +Encode calldata for revokeP256Session(). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `keyX` | `string` | +| `keyY` | `string` | + +#### Returns + +`string` + +*** + +### encodeRevokeSession() + +> **encodeRevokeSession**(`account`, `sessionKey`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:271](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L271) + +Encode calldata for revokeSession(). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `sessionKey` | `string` | + +#### Returns + +`string` + +*** + +### getAgentSession() + +> **getAgentSession**(`account`, `sessionKey`): `Promise`\<[`AgentSessionInfo`](../interfaces/AgentSessionInfo.md)\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:411](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L411) + +Query agent session config + runtime state. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `sessionKey` | `string` | + +#### Returns + +`Promise`\<[`AgentSessionInfo`](../interfaces/AgentSessionInfo.md)\> + +*** + +### getDelegatedBy() + +> **getDelegatedBy**(`account`, `subKey`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:441](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L441) + +Return the parent key that delegated to subKey, or ZeroAddress if not delegated. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `subKey` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getP256Session() + +> **getP256Session**(`account`, `keyHash`): `Promise`\<[`SessionInfo`](../interfaces/SessionInfo.md)\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:302](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L302) + +Query a P256 session key state (decodes the 8-field Session tuple). + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | - | +| `keyHash` | `string` | The keccak256 hash of (keyX, keyY) used as the on-chain session id. | + +#### Returns + +`Promise`\<[`SessionInfo`](../interfaces/SessionInfo.md)\> + +*** + +### getSession() + +> **getSession**(`account`, `sessionKey`): `Promise`\<[`SessionInfo`](../interfaces/SessionInfo.md)\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:230](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L230) + +Query an ECDSA session key state (decodes the 8-field Session tuple). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `sessionKey` | `string` | + +#### Returns + +`Promise`\<[`SessionInfo`](../interfaces/SessionInfo.md)\> + +*** + +### getSessionKeyOwner() + +> **getSessionKeyOwner**(`sessionKey`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:436](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L436) + +Return the parent account of a delegated session key. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `sessionKey` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### isAgentSessionActive() + +> **isAgentSessionActive**(`account`, `sessionKey`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:430](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L430) + +Check if an agent session is active (not expired, not revoked). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `sessionKey` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isP256SessionActive() + +> **isP256SessionActive**(`account`, `keyX`, `keyY`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:308](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L308) + +Check if a P256 session is currently active. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `keyX` | `string` | +| `keyY` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isSessionActive() + +> **isSessionActive**(`account`, `sessionKey`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:236](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L236) + +Check if an ECDSA session is currently active. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `sessionKey` | `string` | + +#### Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/airaccount/server/classes/SilentLogger.md b/api/@aastar/airaccount/server/classes/SilentLogger.md new file mode 100644 index 000000000..8130f7b80 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/SilentLogger.md @@ -0,0 +1,81 @@ +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L38) + +Silent logger that suppresses all output. + +## Implements + +- [`ILogger`](../interfaces/ILogger.md) + +## Constructors + +### Constructor + +> **new SilentLogger**(): `SilentLogger` + +#### Returns + +`SilentLogger` + +## Methods + +### debug() + +> **debug**(): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L39) + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`debug`](../interfaces/ILogger.md#debug) + +*** + +### error() + +> **error**(): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L42) + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`error`](../interfaces/ILogger.md#error) + +*** + +### log() + +> **log**(): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L40) + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`log`](../interfaces/ILogger.md#log) + +*** + +### warn() + +> **warn**(): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L41) + +#### Returns + +`void` + +#### Implementation of + +[`ILogger`](../interfaces/ILogger.md).[`warn`](../interfaces/ILogger.md#warn) diff --git a/api/@aastar/airaccount/server/classes/TokenService.md b/api/@aastar/airaccount/server/classes/TokenService.md new file mode 100644 index 000000000..2b352c875 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/TokenService.md @@ -0,0 +1,116 @@ +Defined in: [packages/airaccount/src/server/services/token-service.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L27) + +Token service — extracted from NestJS TokenService. +Only on-chain queries and calldata generation (no preset token list). + +## Constructors + +### Constructor + +> **new TokenService**(`ethereum`): `TokenService` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L28) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ethereum` | [`EthereumProvider`](EthereumProvider.md) | + +#### Returns + +`TokenService` + +## Methods + +### generateTransferCalldata() + +> **generateTransferCalldata**(`to`, `amount`, `decimals`): `string` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L74) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `to` | `string` | +| `amount` | `string` | +| `decimals` | `number` | + +#### Returns + +`string` + +*** + +### getFormattedTokenBalance() + +> **getFormattedTokenBalance**(`tokenAddress`, `walletAddress`): `Promise`\<[`TokenBalance`](../interfaces/TokenBalance.md)\> + +Defined in: [packages/airaccount/src/server/services/token-service.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L64) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenAddress` | `string` | +| `walletAddress` | `string` | + +#### Returns + +`Promise`\<[`TokenBalance`](../interfaces/TokenBalance.md)\> + +*** + +### getTokenBalance() + +> **getTokenBalance**(`tokenAddress`, `walletAddress`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/services/token-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenAddress` | `string` | +| `walletAddress` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getTokenInfo() + +> **getTokenInfo**(`tokenAddress`): `Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> + +Defined in: [packages/airaccount/src/server/services/token-service.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenAddress` | `string` | + +#### Returns + +`Promise`\<[`TokenInfo`](../interfaces/TokenInfo.md)\> + +*** + +### validateToken() + +> **validateToken**(`tokenAddress`): `Promise`\<\{ `error?`: `string`; `isValid`: `boolean`; `token?`: [`TokenInfo`](../interfaces/TokenInfo.md); \}\> + +Defined in: [packages/airaccount/src/server/services/token-service.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L85) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenAddress` | `string` | + +#### Returns + +`Promise`\<\{ `error?`: `string`; `isValid`: `boolean`; `token?`: [`TokenInfo`](../interfaces/TokenInfo.md); \}\> diff --git a/api/@aastar/airaccount/server/classes/TransferManager.md b/api/@aastar/airaccount/server/classes/TransferManager.md new file mode 100644 index 000000000..7bfd4e622 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/TransferManager.md @@ -0,0 +1,107 @@ +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:144](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L144) + +Transfer manager — extracted from NestJS TransferService. +No passkey verification: callers are responsible for their own auth. + +## Constructors + +### Constructor + +> **new TransferManager**(`ethereum`, `accountManager`, `blsService`, `paymasterManager`, `tokenService`, `storage`, `signer`, `logger?`, `guardChecker?`): `TransferManager` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L149) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ethereum` | [`EthereumProvider`](EthereumProvider.md) | +| `accountManager` | [`AccountManager`](AccountManager.md) | +| `blsService` | [`BLSSignatureService`](BLSSignatureService.md) | +| `paymasterManager` | [`PaymasterManager`](PaymasterManager.md) | +| `tokenService` | [`TokenService`](TokenService.md) | +| `storage` | [`IStorageAdapter`](../interfaces/IStorageAdapter.md) | +| `signer` | [`ISignerAdapter`](../interfaces/ISignerAdapter.md) | +| `logger?` | [`ILogger`](../interfaces/ILogger.md) | +| `guardChecker?` | [`GuardChecker`](GuardChecker.md) | + +#### Returns + +`TransferManager` + +## Methods + +### estimateGas() + +> **estimateGas**(`userId`, `params`): `Promise`\<\{ `callGasLimit`: `string`; `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; `preVerificationGas`: `string`; `totalGasEstimate`: `string`; `validatorGasEstimate`: `string`; `verificationGasLimit`: `string`; \}\> + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:396](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L396) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `params` | [`EstimateGasParams`](../interfaces/EstimateGasParams.md) | + +#### Returns + +`Promise`\<\{ `callGasLimit`: `string`; `maxFeePerGas`: `string`; `maxPriorityFeePerGas`: `string`; `preVerificationGas`: `string`; `totalGasEstimate`: `string`; `validatorGasEstimate`: `string`; `verificationGasLimit`: `string`; \}\> + +*** + +### executeTransfer() + +> **executeTransfer**(`userId`, `params`): `Promise`\<[`TransferResult`](../interfaces/TransferResult.md)\> + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:164](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L164) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `params` | [`ExecuteTransferParams`](../interfaces/ExecuteTransferParams.md) | + +#### Returns + +`Promise`\<[`TransferResult`](../interfaces/TransferResult.md)\> + +*** + +### getTransferHistory() + +> **getTransferHistory**(`userId`, `page`, `limit`): `Promise`\<\{ `limit`: `number`; `page`: `number`; `total`: `number`; `totalPages`: `number`; `transfers`: [`TransferRecord`](../interfaces/TransferRecord.md)[]; \}\> + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:469](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L469) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `userId` | `string` | `undefined` | +| `page` | `number` | `1` | +| `limit` | `number` | `10` | + +#### Returns + +`Promise`\<\{ `limit`: `number`; `page`: `number`; `total`: `number`; `totalPages`: `number`; `transfers`: [`TransferRecord`](../interfaces/TransferRecord.md)[]; \}\> + +*** + +### getTransferStatus() + +> **getTransferStatus**(`userId`, `transferId`): `Promise`\<`Record`\<`string`, `unknown`\>\> + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:441](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L441) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `transferId` | `string` | + +#### Returns + +`Promise`\<`Record`\<`string`, `unknown`\>\> diff --git a/api/@aastar/airaccount/server/classes/WalletManager.md b/api/@aastar/airaccount/server/classes/WalletManager.md new file mode 100644 index 000000000..fa21aecd1 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/WalletManager.md @@ -0,0 +1,77 @@ +Defined in: [packages/airaccount/src/server/services/wallet-manager.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/wallet-manager.ts#L6) + +Thin wrapper around ISignerAdapter for consistent wallet access. + +## Constructors + +### Constructor + +> **new WalletManager**(`signer`): `WalletManager` + +Defined in: [packages/airaccount/src/server/services/wallet-manager.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/wallet-manager.ts#L7) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `signer` | [`ISignerAdapter`](../interfaces/ISignerAdapter.md) | + +#### Returns + +`WalletManager` + +## Methods + +### ensureSigner() + +> **ensureSigner**(`userId`): `Promise`\<\{ `address`: `` `0x${string}` ``; \}\> + +Defined in: [packages/airaccount/src/server/services/wallet-manager.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/wallet-manager.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<\{ `address`: `` `0x${string}` ``; \}\> + +*** + +### getAddress() + +> **getAddress**(`userId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/services/wallet-manager.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/wallet-manager.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### signMessage() + +> **signMessage**(`userId`, `message`, `ctx?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/services/wallet-manager.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/wallet-manager.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `message` | `` `0x${string}` `` \| `Uint8Array` | +| `ctx?` | [`PasskeyAssertionContext`](../interfaces/PasskeyAssertionContext.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/airaccount/server/classes/WeightedSignatureService.md b/api/@aastar/airaccount/server/classes/WeightedSignatureService.md new file mode 100644 index 000000000..0f28aeba5 --- /dev/null +++ b/api/@aastar/airaccount/server/classes/WeightedSignatureService.md @@ -0,0 +1,229 @@ +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L150) + +WeightedSignatureService — typed wrappers for AAStarAirAccount weighted-signature +governance (algId 0x07). + +Governance model: + - setWeightConfig(config): OWNER only. Used for the first-time config and for + *strengthening* changes (no individual weight or tier threshold decreased). + Reverts WeakeningRequiresProposal-equivalent path is enforced by the contract: + a weakening passed here reverts; route weakenings through proposeWeightChange. + Also reverts if a proposal is already pending (WeightChangePending). + - proposeWeightChange(config): OWNER only. Required when the new config *weakens* + security (lowers any weight or threshold). Opens a guardian-approved proposal. + - approveWeightChange(): GUARDIAN only (any of the 3 guardian slots). Each guardian + may approve once; approvals are tracked in approvalBitmap. + - executeWeightChange(): ANYONE, but only succeeds once BOTH conditions hold: + (1) approvals >= WEIGHT_CHANGE_THRESHOLD (2-of-3 guardians), and + (2) WEIGHT_CHANGE_TIMELOCK (2 days) has elapsed since proposedAt. + A proposal also expires after WEIGHT_CHANGE_EXPIRY (30 days). + - cancelWeightChange(): OWNER or any GUARDIAN may cancel a pending proposal. + +Unlike ForceExitService (an ERC-7579 module), these calls target the ACCOUNT itself. +Construct with the account address; encode* methods return calldata for a UserOp or +direct tx, and reads use the contract directly. + +## Constructors + +### Constructor + +> **new WeightedSignatureService**(`accountAddress`, `client`): `WeightedSignatureService` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L153) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `accountAddress` | `string` | - | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `client.account` | `undefined` | The Account of the Client. | +| `client.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `client.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `client.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `client.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `client.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `client.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `client.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `client.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `client.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `client.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `client.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `client.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `client.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `client.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `client.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `client.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `client.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `client.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `client.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `client.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `client.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `client.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `client.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `client.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `client.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `client.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `client.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `client.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `client.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `client.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `client.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `client.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `client.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `client.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.key` | `string` | A key for the client. | +| `client.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `client.name` | `string` | A name for the client. | +| `client.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `client.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `client.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `client.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `client.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `client.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `client.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `client.type` | `string` | The type of client. | +| `client.uid` | `string` | A unique ID for the client. | +| `client.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `client.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `client.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `client.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `client.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `client.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `client.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `client.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `client.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `client.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | + +#### Returns + +`WeightedSignatureService` + +## Methods + +### encodeApproveWeightChange() + +> **encodeApproveWeightChange**(): `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:216](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L216) + +Encode approveWeightChange calldata. GUARDIAN only; each guardian may approve once. + +#### Returns + +`` `0x${string}` `` + +*** + +### encodeCancelWeightChange() + +> **encodeCancelWeightChange**(): `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:224](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L224) + +Encode cancelWeightChange calldata. OWNER or any GUARDIAN may cancel a pending proposal. + +#### Returns + +`` `0x${string}` `` + +*** + +### encodeExecuteWeightChange() + +> **encodeExecuteWeightChange**(): `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:235](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L235) + +Encode executeWeightChange calldata. Callable by anyone, but only succeeds once the +threshold (2-of-3) and timelock (2 days) are both satisfied and the proposal has not expired. + +#### Returns + +`` `0x${string}` `` + +*** + +### encodeProposeWeightChange() + +> **encodeProposeWeightChange**(`config`): `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:207](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L207) + +Encode proposeWeightChange calldata. OWNER only; opens a guardian-governed proposal +(required for any weakening). Subject to 2-of-3 approval + 2-day timelock before execute. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`WeightConfig`](../interfaces/WeightConfig.md) | + +#### Returns + +`` `0x${string}` `` + +*** + +### encodeSetWeightConfig() + +> **encodeSetWeightConfig**(`config`): `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L195) + +Encode setWeightConfig calldata. OWNER only; for first-time setup or strengthening. +Weakening an existing config must go through encodeProposeWeightChange instead. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`WeightConfig`](../interfaces/WeightConfig.md) | + +#### Returns + +`` `0x${string}` `` + +*** + +### getPendingWeightChange() + +> **getPendingWeightChange**(): `Promise`\<[`PendingWeightChange`](../interfaces/PendingWeightChange.md)\> + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L176) + +Read the pending weight-change proposal. When `proposedAt === 0n` there is no +active proposal (the returned `proposed` config will be all zeros). + +#### Returns + +`Promise`\<[`PendingWeightChange`](../interfaces/PendingWeightChange.md)\> + +*** + +### getWeightConfig() + +> **getWeightConfig**(): `Promise`\<[`WeightConfig`](../interfaces/WeightConfig.md)\> + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:163](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L163) + +Read the account's current active WeightConfig. + +#### Returns + +`Promise`\<[`WeightConfig`](../interfaces/WeightConfig.md)\> diff --git a/api/@aastar/airaccount/server/enumerations/EntryPointVersion.md b/api/@aastar/airaccount/server/enumerations/EntryPointVersion.md new file mode 100644 index 000000000..248a5ae97 --- /dev/null +++ b/api/@aastar/airaccount/server/enumerations/EntryPointVersion.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L9) + +## Enumeration Members + +### V0\_6 + +> **V0\_6**: `"0.6"` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L10) + +*** + +### V0\_7 + +> **V0\_7**: `"0.7"` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L11) + +*** + +### V0\_8 + +> **V0\_8**: `"0.8"` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L12) diff --git a/api/@aastar/airaccount/server/functions/base64UrlDecode.md b/api/@aastar/airaccount/server/functions/base64UrlDecode.md new file mode 100644 index 000000000..4ecd84735 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/base64UrlDecode.md @@ -0,0 +1,13 @@ +> **base64UrlDecode**(`value`): `Uint8Array` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L49) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `string` | + +## Returns + +`Uint8Array` diff --git a/api/@aastar/airaccount/server/functions/base64UrlEncode.md b/api/@aastar/airaccount/server/functions/base64UrlEncode.md new file mode 100644 index 000000000..ee496fcee --- /dev/null +++ b/api/@aastar/airaccount/server/functions/base64UrlEncode.md @@ -0,0 +1,13 @@ +> **base64UrlEncode**(`bytes`): `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L45) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `bytes` | `Uint8Array` | + +## Returns + +`string` diff --git a/api/@aastar/airaccount/server/functions/beginAuthenticationChallenge.md b/api/@aastar/airaccount/server/functions/beginAuthenticationChallenge.md new file mode 100644 index 000000000..3a81bf976 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/beginAuthenticationChallenge.md @@ -0,0 +1,16 @@ +> **beginAuthenticationChallenge**(`http`, `keyId`): `Promise`\<[`BeginCeremonyResponse`](../interfaces/BeginCeremonyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:262](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L262) + +Fetch a generic authentication challenge (purpose="authentication"). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](../classes/KmsHttpClient.md) | +| `keyId` | `string` | + +## Returns + +`Promise`\<[`BeginCeremonyResponse`](../interfaces/BeginCeremonyResponse.md)\> diff --git a/api/@aastar/airaccount/server/functions/beginGrantSessionChallenge.md b/api/@aastar/airaccount/server/functions/beginGrantSessionChallenge.md new file mode 100644 index 000000000..4eac1d75f --- /dev/null +++ b/api/@aastar/airaccount/server/functions/beginGrantSessionChallenge.md @@ -0,0 +1,16 @@ +> **beginGrantSessionChallenge**(`http`, `keyId`): `Promise`\<[`BeginCeremonyResponse`](../interfaces/BeginCeremonyResponse.md)\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:270](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L270) + +Fetch a grant-session challenge (purpose="grant-session"). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](../classes/KmsHttpClient.md) | +| `keyId` | `string` | + +## Returns + +`Promise`\<[`BeginCeremonyResponse`](../interfaces/BeginCeremonyResponse.md)\> diff --git a/api/@aastar/airaccount/server/functions/buildAuthenticationCredential.md b/api/@aastar/airaccount/server/functions/buildAuthenticationCredential.md new file mode 100644 index 000000000..074b077e7 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/buildAuthenticationCredential.md @@ -0,0 +1,17 @@ +> **buildAuthenticationCredential**(`opts`): `Promise`\<[`WebAuthnAuthenticationCredential`](../interfaces/WebAuthnAuthenticationCredential.md)\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L181) + +Build a complete WebAuthn AuthenticationResponseJSON for a dynamic TA +challenge: construct clientDataJSON (embedding the challenge) + authenticatorData, +then sign (authenticatorData || SHA-256(clientDataJSON)). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `opts` | [`BuildCredentialOptions`](../interfaces/BuildCredentialOptions.md) | + +## Returns + +`Promise`\<[`WebAuthnAuthenticationCredential`](../interfaces/WebAuthnAuthenticationCredential.md)\> diff --git a/api/@aastar/airaccount/server/functions/buildAuthenticatorData.md b/api/@aastar/airaccount/server/functions/buildAuthenticatorData.md new file mode 100644 index 000000000..578d8420b --- /dev/null +++ b/api/@aastar/airaccount/server/functions/buildAuthenticatorData.md @@ -0,0 +1,19 @@ +> **buildAuthenticatorData**(`rpId`, `signCount`): `Uint8Array` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L158) + +Build authenticatorData = rpIdHash(32) || flags(1) || signCount(4, big-endian). +flags = 0x05 (UP | UV). `signCount` must strictly increase across ceremonies +for the same wallet (anti-clone check); callers performing multiple sequential +signs should pass an incrementing value. + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `rpId` | `string` | `DEFAULT_RP_ID` | +| `signCount` | `number` | `1` | + +## Returns + +`Uint8Array` diff --git a/api/@aastar/airaccount/server/functions/buildClientDataJSON.md b/api/@aastar/airaccount/server/functions/buildClientDataJSON.md new file mode 100644 index 000000000..e4a6ab352 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/buildClientDataJSON.md @@ -0,0 +1,21 @@ +> **buildClientDataJSON**(`challenge`, `origin`): `Uint8Array` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L147) + +Build the clientDataJSON bytes embedding the TA-issued one-time challenge. + +Compact JSON (no whitespace) with field order `type, challenge, origin`, +mirroring the reference ceremony. The KMS parses this and asserts the +`challenge` field equals the stored nonce before verifying the signature over +(authenticatorData || SHA-256(clientDataJSON)). + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `challenge` | `string` | `undefined` | +| `origin` | `string` | `DEFAULT_ORIGIN` | + +## Returns + +`Uint8Array` diff --git a/api/@aastar/airaccount/server/functions/buildInstallModuleHash.md b/api/@aastar/airaccount/server/functions/buildInstallModuleHash.md new file mode 100644 index 000000000..17247fbe0 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/buildInstallModuleHash.md @@ -0,0 +1,28 @@ +> **buildInstallModuleHash**(`chainId`, `account`, `moduleTypeId`, `module`, `moduleInitData`): `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L63) + +Build the EIP-191 install hash that guardians must sign. + +r5 format: includes keccak256(moduleInitData) to prevent config-swap attacks. + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `chainId` | `number` | `undefined` | +| `account` | `string` | `undefined` | +| `moduleTypeId` | [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) | `undefined` | +| `module` | `string` | `undefined` | +| `moduleInitData` | `string` | `"0x"` | + +## Returns + +`string` + +## Example + +```ts +const hash = buildInstallModuleHash(chainId, account, 1, moduleAddress, moduleInitData); +const sig = await guardian.signMessage(hexToBytes(hash)); +``` diff --git a/api/@aastar/airaccount/server/functions/buildUninstallModuleHash.md b/api/@aastar/airaccount/server/functions/buildUninstallModuleHash.md new file mode 100644 index 000000000..a24c32bad --- /dev/null +++ b/api/@aastar/airaccount/server/functions/buildUninstallModuleHash.md @@ -0,0 +1,18 @@ +> **buildUninstallModuleHash**(`chainId`, `account`, `moduleTypeId`, `module`): `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L83) + +Build the EIP-191 uninstall hash that guardians must sign. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `chainId` | `number` | +| `account` | `string` | +| `moduleTypeId` | [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) | +| `module` | `string` | + +## Returns + +`string` diff --git a/api/@aastar/airaccount/server/functions/computeOapdSalt.md b/api/@aastar/airaccount/server/functions/computeOapdSalt.md new file mode 100644 index 000000000..65fbed2c7 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/computeOapdSalt.md @@ -0,0 +1,17 @@ +> **computeOapdSalt**(`owner`, `dappId`): `bigint` + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L52) + +Compute the numeric salt for an OAPD address. +salt = uint256(keccak256(abi.encodePacked(owner, dappId))) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `owner` | `string` | +| `dappId` | `string` | + +## Returns + +`bigint` diff --git a/api/@aastar/airaccount/server/functions/erc8004AddressesForChain.md b/api/@aastar/airaccount/server/functions/erc8004AddressesForChain.md new file mode 100644 index 000000000..0cf59efaa --- /dev/null +++ b/api/@aastar/airaccount/server/functions/erc8004AddressesForChain.md @@ -0,0 +1,13 @@ +> **erc8004AddressesForChain**(`chainId`): \{ `identityRegistry`: `"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"`; `reputationRegistry`: `"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63"`; `validationRegistry`: `"0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58"`; \} \| \{ `identityRegistry`: `"0x8004A818BFB912233c491871b3d84c89A494BD9e"`; `reputationRegistry`: `"0x8004B663056A597Dffe9eCcC1965A193B7388713"`; `validationRegistry`: `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"`; \} + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L39) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `chainId` | `number` | + +## Returns + +\{ `identityRegistry`: `"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"`; `reputationRegistry`: `"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63"`; `validationRegistry`: `"0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58"`; \} \| \{ `identityRegistry`: `"0x8004A818BFB912233c491871b3d84c89A494BD9e"`; `reputationRegistry`: `"0x8004B663056A597Dffe9eCcC1965A193B7388713"`; `validationRegistry`: `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"`; \} diff --git a/api/@aastar/airaccount/server/functions/getOapdAddress.md b/api/@aastar/airaccount/server/functions/getOapdAddress.md new file mode 100644 index 000000000..9403bc7a2 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/getOapdAddress.md @@ -0,0 +1,89 @@ +> **getOapdAddress**(`provider`, `config`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L61) + +Predict the counterfactual OAPD address without deploying. +Uses the factory's getAddress() view function. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key` | `string` | A key for the client. | +| `provider.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name` | `string` | A name for the client. | +| `provider.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type` | `string` | The type of client. | +| `provider.uid` | `string` | A unique ID for the client. | +| `provider.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `config` | [`OapdConfig`](../interfaces/OapdConfig.md) | - | + +## Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/airaccount/server/functions/getOapdAddressWithChainId.md b/api/@aastar/airaccount/server/functions/getOapdAddressWithChainId.md new file mode 100644 index 000000000..38b533bd1 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/getOapdAddressWithChainId.md @@ -0,0 +1,88 @@ +> **getOapdAddressWithChainId**(`provider`, `config`): `Promise`\<\{ `address`: `string`; `chainQualified`: `string`; \}\> + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L79) + +Get the OAPD address and its ERC-7828 chain-qualified identifier. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key` | `string` | A key for the client. | +| `provider.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name` | `string` | A name for the client. | +| `provider.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type` | `string` | The type of client. | +| `provider.uid` | `string` | A unique ID for the client. | +| `provider.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `config` | [`OapdConfig`](../interfaces/OapdConfig.md) | - | + +## Returns + +`Promise`\<\{ `address`: `string`; `chainQualified`: `string`; \}\> diff --git a/api/@aastar/airaccount/server/functions/isExecuteUserOpWrapped.md b/api/@aastar/airaccount/server/functions/isExecuteUserOpWrapped.md new file mode 100644 index 000000000..cea73e8b3 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/isExecuteUserOpWrapped.md @@ -0,0 +1,15 @@ +> **isExecuteUserOpWrapped**(`callData`): `boolean` + +Defined in: [packages/airaccount/src/server/utils/execute-user-op.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/execute-user-op.ts#L55) + +True if callData is already wrapped with the executeUserOp selector. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `callData` | `string` | + +## Returns + +`boolean` diff --git a/api/@aastar/airaccount/server/functions/isOapdDeployed.md b/api/@aastar/airaccount/server/functions/isOapdDeployed.md new file mode 100644 index 000000000..856810e14 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/isOapdDeployed.md @@ -0,0 +1,88 @@ +> **isOapdDeployed**(`provider`, `config`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L98) + +Check if an OAPD account has been deployed yet. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `provider` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `provider.account` | `undefined` | The Account of the Client. | +| `provider.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `provider.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `provider.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `provider.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `provider.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `provider.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `provider.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `provider.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `provider.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `provider.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `provider.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `provider.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `provider.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `provider.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `provider.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `provider.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `provider.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `provider.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `provider.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `provider.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `provider.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `provider.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `provider.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `provider.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `provider.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `provider.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `provider.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `provider.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `provider.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `provider.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `provider.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `provider.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `provider.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `provider.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `provider.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `provider.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `provider.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `provider.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `provider.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.key` | `string` | A key for the client. | +| `provider.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `provider.name` | `string` | A name for the client. | +| `provider.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `provider.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "nonce" \| "chainId" \| "gas" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `provider.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `provider.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `provider.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `provider.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `provider.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `provider.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `provider.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `provider.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `provider.type` | `string` | The type of client. | +| `provider.uid` | `string` | A unique ID for the client. | +| `provider.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `provider.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `provider.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `provider.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `provider.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `provider.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `provider.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `provider.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `provider.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `provider.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `provider.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `config` | [`OapdConfig`](../interfaces/OapdConfig.md) | - | + +## Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/airaccount/server/functions/isPendingConfirmation.md b/api/@aastar/airaccount/server/functions/isPendingConfirmation.md new file mode 100644 index 000000000..efed70286 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/isPendingConfirmation.md @@ -0,0 +1,19 @@ +> **isPendingConfirmation**(`data`): `data is { status: "pending_confirmation"; userOpHash?: string }` + +Defined in: [packages/airaccount/src/server/services/bls-signature-service.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/bls-signature-service.ts#L56) + +Type guard for a DVT v1.3.0 `/signature/sign` response that withheld its +co-signature pending out-of-band confirmation (`{ status: "pending_confirmation", +userOpHash }`). Used at every sign call site so a high-value-op withhold is +surfaced, not mistaken for a signature-less failure. Default-off nodes never +return this shape. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | `unknown` | + +## Returns + +`data is { status: "pending_confirmation"; userOpHash?: string }` diff --git a/api/@aastar/airaccount/server/functions/packP256SessionSignature.md b/api/@aastar/airaccount/server/functions/packP256SessionSignature.md new file mode 100644 index 000000000..7a01f4064 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/packP256SessionSignature.md @@ -0,0 +1,22 @@ +> **packP256SessionSignature**(`account`, `keyX`, `keyY`, `signature`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:486](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L486) + +Pack a P256 session key signature into the 149-byte UserOp.signature format. + +Layout: [0x08][account(20)][keyX(32)][keyY(32)][r(32)][s(32)] + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | The AirAccount address (20 bytes) | +| `keyX` | `string` | P256 public key X coordinate (32 bytes hex, without 0x) | +| `keyY` | `string` | P256 public key Y coordinate (32 bytes hex, without 0x) | +| `signature` | `string` | 64-byte hex signature from KMS sign-p256-grant-session (R||S, no V) | + +## Returns + +`string` + +149-byte hex string (0x-prefixed) suitable as UserOp.signature diff --git a/api/@aastar/airaccount/server/functions/packSecp256k1SessionSignature.md b/api/@aastar/airaccount/server/functions/packSecp256k1SessionSignature.md new file mode 100644 index 000000000..c0b223200 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/packSecp256k1SessionSignature.md @@ -0,0 +1,21 @@ +> **packSecp256k1SessionSignature**(`account`, `sessionKey`, `signature`): `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:458](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L458) + +Pack a secp256k1 session key signature into the 106-byte UserOp.signature format. + +Layout: [0x08][account(20)][sessionKey(20)][r(32)][s(32)][v(1)] + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | The AirAccount address (20 bytes, with or without 0x) | +| `sessionKey` | `string` | The ephemeral EOA session key address (20 bytes) | +| `signature` | `string` | 65-byte hex signature from KMS sign-grant-session (R||S||V) | + +## Returns + +`string` + +106-byte hex string (0x-prefixed) suitable as UserOp.signature diff --git a/api/@aastar/airaccount/server/functions/runAuthenticationCeremony.md b/api/@aastar/airaccount/server/functions/runAuthenticationCeremony.md new file mode 100644 index 000000000..96a0d7f07 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/runAuthenticationCeremony.md @@ -0,0 +1,20 @@ +> **runAuthenticationCeremony**(`http`, `keyId`, `signer`, `options?`): `Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:284](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L284) + +Convenience: run a generic authentication ceremony over an [KmsHttpClient](../classes/KmsHttpClient.md). +Covers DeriveAddress / Sign / SignHash / SignTypedData / agent-key / +p256-session signing paths. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](../classes/KmsHttpClient.md) | +| `keyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +## Returns + +`Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> diff --git a/api/@aastar/airaccount/server/functions/runGrantSessionCeremony.md b/api/@aastar/airaccount/server/functions/runGrantSessionCeremony.md new file mode 100644 index 000000000..fad85c288 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/runGrantSessionCeremony.md @@ -0,0 +1,20 @@ +> **runGrantSessionCeremony**(`http`, `keyId`, `signer`, `options?`): `Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:301](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L301) + +Convenience: run a grant-session ceremony over an [KmsHttpClient](../classes/KmsHttpClient.md). +Required by sign-grant-session / sign-p256-grant-session, which reject the +generic 'authentication' challenge for cross-op replay safety. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `http` | [`KmsHttpClient`](../classes/KmsHttpClient.md) | +| `keyId` | `string` | +| `signer` | [`PasskeyCeremonySigner`](../interfaces/PasskeyCeremonySigner.md) | +| `options?` | `Omit`\<[`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md), `"signer"`\> | + +## Returns + +`Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> diff --git a/api/@aastar/airaccount/server/functions/runWebAuthnCeremony.md b/api/@aastar/airaccount/server/functions/runWebAuthnCeremony.md new file mode 100644 index 000000000..522678a22 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/runWebAuthnCeremony.md @@ -0,0 +1,25 @@ +> **runWebAuthnCeremony**(`begin`, `options`): `Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:238](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L238) + +Run a full WebAuthn challenge-binding ceremony (AirAccount #49): + 1. fetch a one-time TA challenge from the `begin` endpoint, + 2. embed it in clientDataJSON, + 3. build + sign the assertion, + 4. return `{ ChallengeId, Credential }` for the KMS `WebAuthn` / + `webAuthnAssertion` field. + +`begin` is injected so the same helper serves both the generic +(purpose="authentication") and grant-session (purpose="grant-session") +challenge endpoints. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `begin` | () => `Promise`\<[`BeginCeremonyResponse`](../interfaces/BeginCeremonyResponse.md)\> | +| `options` | [`RunCeremonyOptions`](../interfaces/RunCeremonyOptions.md) | + +## Returns + +`Promise`\<[`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md)\> diff --git a/api/@aastar/airaccount/server/functions/sepoliaV07Config.md b/api/@aastar/airaccount/server/functions/sepoliaV07Config.md new file mode 100644 index 000000000..2e9cd0363 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/sepoliaV07Config.md @@ -0,0 +1,29 @@ +> **sepoliaV07Config**(`version`): [`EntryPointVersionConfig`](../interfaces/EntryPointVersionConfig.md) + +Defined in: [packages/airaccount/src/server/config.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L77) + +Build a pre-configured EntryPointVersionConfig for Sepolia using a known AirAccount deployment. +Eliminates the need to look up contract addresses manually. + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `version` | [`AirAccountVersion`](../type-aliases/AirAccountVersion.md) | `"M7"` | + +## Returns + +[`EntryPointVersionConfig`](../interfaces/EntryPointVersionConfig.md) + +## Example + +```ts +// Use M7 r4 audit-final (default) +const config = { entryPoints: { v07: sepoliaV07Config() }, ... }; + +// Recover an existing r6-deployed account (do NOT use for new accounts) +const config = { entryPoints: { v07: sepoliaV07Config("M7r6") }, ... }; + +// Use M5 legacy +const config = { entryPoints: { v07: sepoliaV07Config("M5") }, ... }; +``` diff --git a/api/@aastar/airaccount/server/functions/validateConfig.md b/api/@aastar/airaccount/server/functions/validateConfig.md new file mode 100644 index 000000000..a05a45448 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/validateConfig.md @@ -0,0 +1,15 @@ +> **validateConfig**(`config`): `void` + +Defined in: [packages/airaccount/src/server/config.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L95) + +Validate a ServerConfig and throw descriptive errors for missing fields. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ServerConfig`](../interfaces/ServerConfig.md) | + +## Returns + +`void` diff --git a/api/@aastar/airaccount/server/functions/wrapExecuteUserOp.md b/api/@aastar/airaccount/server/functions/wrapExecuteUserOp.md new file mode 100644 index 000000000..5a7bad527 --- /dev/null +++ b/api/@aastar/airaccount/server/functions/wrapExecuteUserOp.md @@ -0,0 +1,28 @@ +> **wrapExecuteUserOp**(`innerCallData`): `string` + +Defined in: [packages/airaccount/src/server/utils/execute-user-op.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/execute-user-op.ts#L40) + +Wrap inner `execute()` / `executeBatch()` callData with the `executeUserOp` selector so a +guard-enabled (v0.17.2-beta.4) account routes the bundler UserOp through `executeUserOp`. + +Only `execute` / `executeBatch` may be wrapped — the account reverts +`UnsupportedInnerSelector` for anything else (including a nested `executeUserOp`). + +Owner-direct (non-bundler) `execute()` does NOT need this; no-guard accounts can submit +bare callData. Use this only when building a bundler UserOp for a guard-enabled account. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `innerCallData` | `string` | ABI-encoded `execute`/`executeBatch` calldata (0x-prefixed) | + +## Returns + +`string` + +`executeUserOp.selector ++ innerCallData` + +## Throws + +if `innerCallData` is not an `execute`/`executeBatch` call diff --git a/api/@aastar/airaccount/server/index.md b/api/@aastar/airaccount/server/index.md new file mode 100644 index 000000000..ff6d09460 --- /dev/null +++ b/api/@aastar/airaccount/server/index.md @@ -0,0 +1,339 @@ +## Enumerations + +- [EntryPointVersion](enumerations/EntryPointVersion.md) + +## Classes + +- [AccountManager](classes/AccountManager.md) +- [AgentRegistryService](classes/AgentRegistryService.md) +- [AirAccountServerClient](classes/AirAccountServerClient.md) +- [BLSSignatureService](classes/BLSSignatureService.md) +- [ConsoleLogger](classes/ConsoleLogger.md) +- [DvtPendingConfirmationError](classes/DvtPendingConfirmationError.md) +- [EIP7702DelegateService](classes/EIP7702DelegateService.md) +- [ERC8004Service](classes/ERC8004Service.md) +- [EthereumProvider](classes/EthereumProvider.md) +- [ForceExitService](classes/ForceExitService.md) +- [GuardChecker](classes/GuardChecker.md) +- [GuardStateReader](classes/GuardStateReader.md) +- [KmsAgentService](classes/KmsAgentService.md) +- [KmsHttpClient](classes/KmsHttpClient.md) +- [KmsManager](classes/KmsManager.md) +- [KmsMonitorService](classes/KmsMonitorService.md) +- [KmsPaymentSigner](classes/KmsPaymentSigner.md) +- [KmsSessionService](classes/KmsSessionService.md) +- [KmsSigner](classes/KmsSigner.md) +- [LocalWalletSigner](classes/LocalWalletSigner.md) +- [MemoryStorage](classes/MemoryStorage.md) +- [ModuleManager](classes/ModuleManager.md) +- [P256PasskeySigner](classes/P256PasskeySigner.md) +- [PaymasterManager](classes/PaymasterManager.md) +- [PaymasterPriceStalenessError](classes/PaymasterPriceStalenessError.md) +- [RecoveryService](classes/RecoveryService.md) +- [SessionKeyService](classes/SessionKeyService.md) +- [SilentLogger](classes/SilentLogger.md) +- [TokenService](classes/TokenService.md) +- [TransferManager](classes/TransferManager.md) +- [WalletManager](classes/WalletManager.md) +- [WeightedSignatureService](classes/WeightedSignatureService.md) + +## Interfaces + +- [AccountRecord](interfaces/AccountRecord.md) +- [ActiveRecovery](interfaces/ActiveRecovery.md) +- [AgentReputationSummary](interfaces/AgentReputationSummary.md) +- [AgentSessionConfig](interfaces/AgentSessionConfig.md) +- [AgentSessionInfo](interfaces/AgentSessionInfo.md) +- [BeginCeremonyResponse](interfaces/BeginCeremonyResponse.md) +- [BindERC8004AgentWalletParams](interfaces/BindERC8004AgentWalletParams.md) +- [BlsConfigRecord](interfaces/BlsConfigRecord.md) +- [BuildCredentialOptions](interfaces/BuildCredentialOptions.md) +- [CreateAgentAccountParams](interfaces/CreateAgentAccountParams.md) +- [CreateP256SessionKeyRequest](interfaces/CreateP256SessionKeyRequest.md) +- [CreateP256SessionKeyResponse](interfaces/CreateP256SessionKeyResponse.md) +- [DelegateInitParams](interfaces/DelegateInitParams.md) +- [EIP7702Authorization](interfaces/EIP7702Authorization.md) +- [EntryPointConfig](interfaces/EntryPointConfig.md) +- [EntryPointVersionConfig](interfaces/EntryPointVersionConfig.md) +- [EstimateGasParams](interfaces/EstimateGasParams.md) +- [ExecuteTransferParams](interfaces/ExecuteTransferParams.md) +- [GrantP256SessionParams](interfaces/GrantP256SessionParams.md) +- [GrantSessionParams](interfaces/GrantSessionParams.md) +- [GuardState](interfaces/GuardState.md) +- [ILogger](interfaces/ILogger.md) +- [InstallModuleParams](interfaces/InstallModuleParams.md) +- [ISignerAdapter](interfaces/ISignerAdapter.md) +- [IStorageAdapter](interfaces/IStorageAdapter.md) +- [KmsAttestationManifestResponse](interfaces/KmsAttestationManifestResponse.md) +- [KmsAttestationProofResponse](interfaces/KmsAttestationProofResponse.md) +- [KmsAttestationResponse](interfaces/KmsAttestationResponse.md) +- [KmsBeginAuthenticationRequest](interfaces/KmsBeginAuthenticationRequest.md) +- [KmsBeginAuthenticationResponse](interfaces/KmsBeginAuthenticationResponse.md) +- [KmsBeginGrantSessionAuthRequest](interfaces/KmsBeginGrantSessionAuthRequest.md) +- [KmsBeginGrantSessionAuthResponse](interfaces/KmsBeginGrantSessionAuthResponse.md) +- [KmsBeginRegistrationRequest](interfaces/KmsBeginRegistrationRequest.md) +- [KmsBeginRegistrationResponse](interfaces/KmsBeginRegistrationResponse.md) +- [KmsChangePasskeyResponse](interfaces/KmsChangePasskeyResponse.md) +- [KmsCompleteRegistrationRequest](interfaces/KmsCompleteRegistrationRequest.md) +- [KmsCompleteRegistrationResponse](interfaces/KmsCompleteRegistrationResponse.md) +- [KmsCreateAgentKeyRequest](interfaces/KmsCreateAgentKeyRequest.md) +- [KmsCreateAgentKeyResponse](interfaces/KmsCreateAgentKeyResponse.md) +- [KmsCreateKeyRequest](interfaces/KmsCreateKeyRequest.md) +- [KmsCreateKeyResponse](interfaces/KmsCreateKeyResponse.md) +- [KmsDeleteKeyResponse](interfaces/KmsDeleteKeyResponse.md) +- [KmsDeriveAddressResponse](interfaces/KmsDeriveAddressResponse.md) +- [KmsDescribeKeyResponse](interfaces/KmsDescribeKeyResponse.md) +- [KmsEip712Domain](interfaces/KmsEip712Domain.md) +- [KmsEip712FieldValue](interfaces/KmsEip712FieldValue.md) +- [KmsEip712TypeDef](interfaces/KmsEip712TypeDef.md) +- [KmsEthereumTransaction](interfaces/KmsEthereumTransaction.md) +- [KmsGetPublicKeyResponse](interfaces/KmsGetPublicKeyResponse.md) +- [KmsHealthResponse](interfaces/KmsHealthResponse.md) +- [KmsHttpClientOptions](interfaces/KmsHttpClientOptions.md) +- [KmsKeyStatusResponse](interfaces/KmsKeyStatusResponse.md) +- [KmsListKeysResponse](interfaces/KmsListKeysResponse.md) +- [KmsPaymentSignatureResponse](interfaces/KmsPaymentSignatureResponse.md) +- [KmsPurgeKeyResponse](interfaces/KmsPurgeKeyResponse.md) +- [KmsQueueStatusResponse](interfaces/KmsQueueStatusResponse.md) +- [KmsRefreshAgentCredentialRequest](interfaces/KmsRefreshAgentCredentialRequest.md) +- [KmsRefreshAgentCredentialResponse](interfaces/KmsRefreshAgentCredentialResponse.md) +- [KmsRevokeAgentCredentialRequest](interfaces/KmsRevokeAgentCredentialRequest.md) +- [KmsRevokeAgentCredentialResponse](interfaces/KmsRevokeAgentCredentialResponse.md) +- [KmsRollbackCounterResponse](interfaces/KmsRollbackCounterResponse.md) +- [KmsSignAgentRequest](interfaces/KmsSignAgentRequest.md) +- [KmsSignAgentResponse](interfaces/KmsSignAgentResponse.md) +- [KmsSignGrantSessionRequest](interfaces/KmsSignGrantSessionRequest.md) +- [KmsSignGrantSessionResponse](interfaces/KmsSignGrantSessionResponse.md) +- [KmsSignGTokenAuthorizationRequest](interfaces/KmsSignGTokenAuthorizationRequest.md) +- [KmsSignHashResponse](interfaces/KmsSignHashResponse.md) +- [KmsSignMicropaymentVoucherRequest](interfaces/KmsSignMicropaymentVoucherRequest.md) +- [KmsSignP256GrantSessionRequest](interfaces/KmsSignP256GrantSessionRequest.md) +- [KmsSignRequest](interfaces/KmsSignRequest.md) +- [KmsSignResponse](interfaces/KmsSignResponse.md) +- [KmsSignTypedDataRequest](interfaces/KmsSignTypedDataRequest.md) +- [KmsSignTypedDataResponse](interfaces/KmsSignTypedDataResponse.md) +- [KmsSignX402PaymentRequest](interfaces/KmsSignX402PaymentRequest.md) +- [KmsStatsResponse](interfaces/KmsStatsResponse.md) +- [KmsVersionResponse](interfaces/KmsVersionResponse.md) +- [LegacyPasskeyAssertion](interfaces/LegacyPasskeyAssertion.md) +- [MintAgentIdentityParams](interfaces/MintAgentIdentityParams.md) +- [OapdConfig](interfaces/OapdConfig.md) +- [PasskeyAssertionContext](interfaces/PasskeyAssertionContext.md) +- [PasskeyCeremonySigner](interfaces/PasskeyCeremonySigner.md) +- [PaymasterRecord](interfaces/PaymasterRecord.md) +- [PendingExit](interfaces/PendingExit.md) +- [PendingWeightChange](interfaces/PendingWeightChange.md) +- [QueryAgentReputationParams](interfaces/QueryAgentReputationParams.md) +- [RevokeP256SessionKeyRequest](interfaces/RevokeP256SessionKeyRequest.md) +- [RevokeP256SessionKeyResponse](interfaces/RevokeP256SessionKeyResponse.md) +- [RunCeremonyOptions](interfaces/RunCeremonyOptions.md) +- [ServerConfig](interfaces/ServerConfig.md) +- [SessionInfo](interfaces/SessionInfo.md) +- [SetAgentWalletParams](interfaces/SetAgentWalletParams.md) +- [SignP256UserOpRequest](interfaces/SignP256UserOpRequest.md) +- [SignP256UserOpResponse](interfaces/SignP256UserOpResponse.md) +- [SubmitAgentReputationParams](interfaces/SubmitAgentReputationParams.md) +- [TokenBalance](interfaces/TokenBalance.md) +- [TokenGuardState](interfaces/TokenGuardState.md) +- [TokenInfo](interfaces/TokenInfo.md) +- [TransferRecord](interfaces/TransferRecord.md) +- [TransferResult](interfaces/TransferResult.md) +- [UninstallModuleParams](interfaces/UninstallModuleParams.md) +- [WebAuthnAssertion](interfaces/WebAuthnAssertion.md) +- [WebAuthnAuthenticationCredential](interfaces/WebAuthnAuthenticationCredential.md) +- [WeightConfig](interfaces/WeightConfig.md) + +## Type Aliases + +- [AirAccountVersion](type-aliases/AirAccountVersion.md) +- [KmsPaymentAuth](type-aliases/KmsPaymentAuth.md) +- [L2Type](type-aliases/L2Type.md) +- [ModuleTypeId](type-aliases/ModuleTypeId.md) + +## Variables + +- [ACCOUNT\_ABI](variables/ACCOUNT_ABI.md) +- [AGENT\_SESSION\_KEY\_VALIDATOR\_ABI](variables/AGENT_SESSION_KEY_VALIDATOR_ABI.md) +- [AIR\_ACCOUNT\_COMPOSITE\_VALIDATOR\_ABI](variables/AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI.md) +- [AIR\_ACCOUNT\_DELEGATE\_ABI](variables/AIR_ACCOUNT_DELEGATE_ABI.md) +- [AIR\_ACCOUNT\_DELEGATE\_ADDRESS](variables/AIR_ACCOUNT_DELEGATE_ADDRESS.md) +- [AIRACCOUNT\_ABI](variables/AIRACCOUNT_ABI.md) +- [AIRACCOUNT\_ADDRESSES](variables/AIRACCOUNT_ADDRESSES.md) +- [AIRACCOUNT\_FACTORY\_ABI](variables/AIRACCOUNT_FACTORY_ABI.md) +- [ALG\_ID](variables/ALG_ID.md) +- [CALLDATA\_PARSER\_REGISTRY\_ABI](variables/CALLDATA_PARSER_REGISTRY_ABI.md) +- [DEFAULT\_CREDENTIAL\_ID](variables/DEFAULT_CREDENTIAL_ID.md) +- [DEFAULT\_KMS\_ENDPOINT](variables/DEFAULT_KMS_ENDPOINT.md) +- [DEFAULT\_ORIGIN](variables/DEFAULT_ORIGIN.md) +- [DEFAULT\_RP\_ID](variables/DEFAULT_RP_ID.md) +- [ENTRYPOINT\_ABI\_V6](variables/ENTRYPOINT_ABI_V6.md) +- [ENTRYPOINT\_ABI\_V7\_V8](variables/ENTRYPOINT_ABI_V7_V8.md) +- [ENTRYPOINT\_ADDRESSES](variables/ENTRYPOINT_ADDRESSES.md) +- [ERC20\_ABI](variables/ERC20_ABI.md) +- [ERC8004\_ADDRESSES](variables/ERC8004_ADDRESSES.md) +- [EXECUTE\_BATCH\_SELECTOR](variables/EXECUTE_BATCH_SELECTOR.md) +- [EXECUTE\_SELECTOR](variables/EXECUTE_SELECTOR.md) +- [EXECUTE\_USER\_OP\_SELECTOR](variables/EXECUTE_USER_OP_SELECTOR.md) +- [FACTORY\_ABI\_V6](variables/FACTORY_ABI_V6.md) +- [FACTORY\_ABI\_V7\_V8](variables/FACTORY_ABI_V7_V8.md) +- [FORCE\_EXIT\_MODULE\_ABI](variables/FORCE_EXIT_MODULE_ABI.md) +- [GLOBAL\_GUARD\_ABI](variables/GLOBAL_GUARD_ABI.md) +- [L2\_TYPE](variables/L2_TYPE.md) +- [MAX\_GUARDIANS](variables/MAX_GUARDIANS.md) +- [MODULE\_TYPE](variables/MODULE_TYPE.md) +- [RECOVERY\_THRESHOLD](variables/RECOVERY_THRESHOLD.md) +- [RECOVERY\_TIMELOCK\_SECONDS](variables/RECOVERY_TIMELOCK_SECONDS.md) +- [SESSION\_KEY\_VALIDATOR\_ABI](variables/SESSION_KEY_VALIDATOR_ABI.md) +- [TIER\_GUARD\_HOOK\_ABI](variables/TIER_GUARD_HOOK_ABI.md) +- [VALIDATOR\_ABI](variables/VALIDATOR_ABI.md) +- [WEIGHT\_CHANGE\_EXPIRY\_SECONDS](variables/WEIGHT_CHANGE_EXPIRY_SECONDS.md) +- [WEIGHT\_CHANGE\_THRESHOLD](variables/WEIGHT_CHANGE_THRESHOLD.md) +- [WEIGHT\_CHANGE\_TIMELOCK\_SECONDS](variables/WEIGHT_CHANGE_TIMELOCK_SECONDS.md) +- [~~YAAAServerClient~~](variables/YAAAServerClient.md) + +## Functions + +- [base64UrlDecode](functions/base64UrlDecode.md) +- [base64UrlEncode](functions/base64UrlEncode.md) +- [beginAuthenticationChallenge](functions/beginAuthenticationChallenge.md) +- [beginGrantSessionChallenge](functions/beginGrantSessionChallenge.md) +- [buildAuthenticationCredential](functions/buildAuthenticationCredential.md) +- [buildAuthenticatorData](functions/buildAuthenticatorData.md) +- [buildClientDataJSON](functions/buildClientDataJSON.md) +- [buildInstallModuleHash](functions/buildInstallModuleHash.md) +- [buildUninstallModuleHash](functions/buildUninstallModuleHash.md) +- [computeOapdSalt](functions/computeOapdSalt.md) +- [erc8004AddressesForChain](functions/erc8004AddressesForChain.md) +- [getOapdAddress](functions/getOapdAddress.md) +- [getOapdAddressWithChainId](functions/getOapdAddressWithChainId.md) +- [isExecuteUserOpWrapped](functions/isExecuteUserOpWrapped.md) +- [isOapdDeployed](functions/isOapdDeployed.md) +- [isPendingConfirmation](functions/isPendingConfirmation.md) +- [packP256SessionSignature](functions/packP256SessionSignature.md) +- [packSecp256k1SessionSignature](functions/packSecp256k1SessionSignature.md) +- [runAuthenticationCeremony](functions/runAuthenticationCeremony.md) +- [runGrantSessionCeremony](functions/runGrantSessionCeremony.md) +- [runWebAuthnCeremony](functions/runWebAuthnCeremony.md) +- [sepoliaV07Config](functions/sepoliaV07Config.md) +- [validateConfig](functions/validateConfig.md) +- [wrapExecuteUserOp](functions/wrapExecuteUserOp.md) + +## References + +### ALG\_BLS + +Re-exports [ALG_BLS](../variables/ALG_BLS.md) + +*** + +### ALG\_CUMULATIVE\_T2 + +Re-exports [ALG_CUMULATIVE_T2](../variables/ALG_CUMULATIVE_T2.md) + +*** + +### ALG\_CUMULATIVE\_T3 + +Re-exports [ALG_CUMULATIVE_T3](../variables/ALG_CUMULATIVE_T3.md) + +*** + +### ALG\_ECDSA + +Re-exports [ALG_ECDSA](../variables/ALG_ECDSA.md) + +*** + +### ALG\_P256 + +Re-exports [ALG_P256](../variables/ALG_P256.md) + +*** + +### AlgId + +Re-exports [AlgId](../type-aliases/AlgId.md) + +*** + +### algIdForTier + +Re-exports [algIdForTier](../functions/algIdForTier.md) + +*** + +### BLSConfig + +Re-exports [BLSConfig](../interfaces/BLSConfig.md) + +*** + +### BLSNode + +Re-exports [BLSNode](../interfaces/BLSNode.md) + +*** + +### BLSSignatureData + +Re-exports [BLSSignatureData](../interfaces/BLSSignatureData.md) + +*** + +### CumulativeT2SignatureData + +Re-exports [CumulativeT2SignatureData](../interfaces/CumulativeT2SignatureData.md) + +*** + +### CumulativeT3SignatureData + +Re-exports [CumulativeT3SignatureData](../interfaces/CumulativeT3SignatureData.md) + +*** + +### GasEstimate + +Re-exports [GasEstimate](../interfaces/GasEstimate.md) + +*** + +### GuardStatus + +Re-exports [GuardStatus](../interfaces/GuardStatus.md) + +*** + +### PackedUserOperation + +Re-exports [PackedUserOperation](../interfaces/PackedUserOperation.md) + +*** + +### PreCheckResult + +Re-exports [PreCheckResult](../interfaces/PreCheckResult.md) + +*** + +### resolveTier + +Re-exports [resolveTier](../functions/resolveTier.md) + +*** + +### TierConfig + +Re-exports [TierConfig](../interfaces/TierConfig.md) + +*** + +### TierLevel + +Re-exports [TierLevel](../type-aliases/TierLevel.md) + +*** + +### UserOperation + +Re-exports [UserOperation](../interfaces/UserOperation.md) diff --git a/api/@aastar/airaccount/server/interfaces/AccountRecord.md b/api/@aastar/airaccount/server/interfaces/AccountRecord.md new file mode 100644 index 000000000..9dd9ade6c --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/AccountRecord.md @@ -0,0 +1,131 @@ +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L4) + +Account record stored by the SDK. + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L6) + +*** + +### createdAt + +> **createdAt**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L14) + +*** + +### dailyLimit? + +> `optional` **dailyLimit**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L20) + +Daily transfer limit in wei, stored as a decimal string (bigint serialization). +"0" or undefined means no guard / no limit. +Written into the factory config at account creation time. + +*** + +### deployed + +> **deployed**: `boolean` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L9) + +*** + +### deploymentTxHash + +> **deploymentTxHash**: `string` \| `null` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L10) + +*** + +### entryPointVersion + +> **entryPointVersion**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L12) + +*** + +### factoryAddress + +> **factoryAddress**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L13) + +*** + +### guardian1? + +> `optional` **guardian1**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L26) + +Guardian addresses and their acceptance signatures. +Present only for accounts created via createAccountWithGuardians(). +Required by transfer-manager to reconstruct initCode using createAccountWithDefaults. + +*** + +### guardian1Sig? + +> `optional` **guardian1Sig**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L27) + +*** + +### guardian2? + +> `optional` **guardian2**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L28) + +*** + +### guardian2Sig? + +> `optional` **guardian2Sig**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L29) + +*** + +### salt + +> **salt**: `number` \| `bigint` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L8) + +*** + +### signerAddress + +> **signerAddress**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L7) + +*** + +### userId + +> **userId**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L5) + +*** + +### validatorAddress + +> **validatorAddress**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L11) diff --git a/api/@aastar/airaccount/server/interfaces/ActiveRecovery.md b/api/@aastar/airaccount/server/interfaces/ActiveRecovery.md new file mode 100644 index 000000000..54cc46d5b --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/ActiveRecovery.md @@ -0,0 +1,91 @@ +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L61) + +Decoded view of the account's `activeRecovery()` struct (RecoveryProposal). + +On-chain layout (`AAStarAgentStorageLayout.RecoveryProposal`): + - newOwner : proposed new owner (address(0) ⇒ no active recovery) + - proposedAt : block.timestamp when the recovery was proposed + - approvalBitmap : bit i set ⇒ guardian[i] approved (2-of-3 to execute) + - cancellationBitmap : bit i set ⇒ guardian[i] voted to cancel (2-of-3 to cancel) + +The remaining fields are SDK-side conveniences derived from those values. + +## Properties + +### approvalBitmap + +> **approvalBitmap**: `bigint` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L67) + +Bitmap of guardian approvals (bit i ⇒ guardian[i] approved). + +*** + +### approvalCount + +> **approvalCount**: `number` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L71) + +Number of distinct guardian approvals (popcount of `approvalBitmap`). + +*** + +### cancellationBitmap + +> **cancellationBitmap**: `bigint` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L69) + +Bitmap of guardian cancel votes (bit i ⇒ guardian[i] voted to cancel). + +*** + +### cancellationCount + +> **cancellationCount**: `number` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L73) + +Number of distinct guardian cancel votes (popcount of `cancellationBitmap`). + +*** + +### executeAfter + +> **executeAfter**: `bigint` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L75) + +Earliest timestamp at which `executeRecovery` may succeed (`proposedAt + timelock`). + +*** + +### isActive + +> **isActive**: `boolean` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L77) + +True when a recovery is currently active (`newOwner != address(0)`). + +*** + +### newOwner + +> **newOwner**: `string` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L63) + +Proposed new owner. `0x0000…0000` means there is no active recovery. + +*** + +### proposedAt + +> **proposedAt**: `bigint` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L65) + +`block.timestamp` at which the recovery was proposed (seconds). diff --git a/api/@aastar/airaccount/server/interfaces/AgentReputationSummary.md b/api/@aastar/airaccount/server/interfaces/AgentReputationSummary.md new file mode 100644 index 000000000..c3d0caa20 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/AgentReputationSummary.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L96) + +## Properties + +### count + +> **count**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L97) + +*** + +### summaryDecimals + +> **summaryDecimals**: `number` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L99) + +*** + +### summaryValue + +> **summaryValue**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L98) diff --git a/api/@aastar/airaccount/server/interfaces/AgentSessionConfig.md b/api/@aastar/airaccount/server/interfaces/AgentSessionConfig.md new file mode 100644 index 000000000..4ca717d68 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/AgentSessionConfig.md @@ -0,0 +1,45 @@ +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:168](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L168) + +## Extended by + +- [`AgentSessionInfo`](AgentSessionInfo.md) + +## Properties + +### callTargets + +> **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L172) + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L169) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L173) + +*** + +### velocityLimit + +> **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L170) + +*** + +### velocityWindow + +> **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:171](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L171) diff --git a/api/@aastar/airaccount/server/interfaces/AgentSessionInfo.md b/api/@aastar/airaccount/server/interfaces/AgentSessionInfo.md new file mode 100644 index 000000000..adfa46b61 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/AgentSessionInfo.md @@ -0,0 +1,89 @@ +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L176) + +## Extends + +- [`AgentSessionConfig`](AgentSessionConfig.md) + +## Properties + +### callCount + +> **callCount**: `bigint` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:178](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L178) + +*** + +### callTargets + +> **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L172) + +#### Inherited from + +[`AgentSessionConfig`](AgentSessionConfig.md).[`callTargets`](AgentSessionConfig.md#calltargets) + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L169) + +#### Inherited from + +[`AgentSessionConfig`](AgentSessionConfig.md).[`expiry`](AgentSessionConfig.md#expiry) + +*** + +### revoked + +> **revoked**: `boolean` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:177](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L177) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L173) + +#### Inherited from + +[`AgentSessionConfig`](AgentSessionConfig.md).[`selectorAllowlist`](AgentSessionConfig.md#selectorallowlist) + +*** + +### velocityLimit + +> **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L170) + +#### Inherited from + +[`AgentSessionConfig`](AgentSessionConfig.md).[`velocityLimit`](AgentSessionConfig.md#velocitylimit) + +*** + +### velocityWindow + +> **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:171](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L171) + +#### Inherited from + +[`AgentSessionConfig`](AgentSessionConfig.md).[`velocityWindow`](AgentSessionConfig.md#velocitywindow) + +*** + +### windowStart + +> **windowStart**: `bigint` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L179) diff --git a/api/@aastar/airaccount/server/interfaces/BeginCeremonyResponse.md b/api/@aastar/airaccount/server/interfaces/BeginCeremonyResponse.md new file mode 100644 index 000000000..49391d004 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/BeginCeremonyResponse.md @@ -0,0 +1,23 @@ +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L214) + +Minimal shape returned by BeginAuthentication / begin-grant-session-auth. + +## Properties + +### ChallengeId + +> **ChallengeId**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:215](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L215) + +*** + +### Options + +> **Options**: `object` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:216](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L216) + +#### challenge + +> **challenge**: `string` diff --git a/api/@aastar/airaccount/server/interfaces/BindERC8004AgentWalletParams.md b/api/@aastar/airaccount/server/interfaces/BindERC8004AgentWalletParams.md new file mode 100644 index 000000000..d118c0354 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/BindERC8004AgentWalletParams.md @@ -0,0 +1,47 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L63) + +## Properties + +### agentId + +> **agentId**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L66) + +*** + +### agentWallet + +> **agentWallet**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L67) + +*** + +### deadline + +> **deadline**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L69) + +Unix timestamp — signature becomes invalid after this deadline + +*** + +### identityRegistry + +> **identityRegistry**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L65) + +Must be the official ERC-8004 identity registry for this chain + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L71) + +Signature authorising the wallet binding, signed by the identity registry's expected signer diff --git a/api/@aastar/airaccount/server/interfaces/BlsConfigRecord.md b/api/@aastar/airaccount/server/interfaces/BlsConfigRecord.md new file mode 100644 index 000000000..04a1603d9 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/BlsConfigRecord.md @@ -0,0 +1,31 @@ +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L72) + +BLS configuration record. + +## Properties + +### discovery? + +> `optional` **discovery**: `object` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L82) + +#### discoveryTimeout? + +> `optional` **discoveryTimeout**: `number` + +#### seedNodes? + +> `optional` **seedNodes**: `object`[] + +*** + +### signerNodes? + +> `optional` **signerNodes**: `object` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L73) + +#### nodes + +> **nodes**: `object`[] diff --git a/api/@aastar/airaccount/server/interfaces/BuildCredentialOptions.md b/api/@aastar/airaccount/server/interfaces/BuildCredentialOptions.md new file mode 100644 index 000000000..4adefbcef --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/BuildCredentialOptions.md @@ -0,0 +1,43 @@ +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L167) + +## Properties + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L169) + +The base64url challenge returned by the begin endpoint. + +*** + +### origin? + +> `optional` **origin**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L172) + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:171](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L171) + +*** + +### signCount? + +> `optional` **signCount**: `number` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L173) + +*** + +### signer + +> **signer**: [`PasskeyCeremonySigner`](PasskeyCeremonySigner.md) + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L170) diff --git a/api/@aastar/airaccount/server/interfaces/CreateAgentAccountParams.md b/api/@aastar/airaccount/server/interfaces/CreateAgentAccountParams.md new file mode 100644 index 000000000..4bd58ee8c --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/CreateAgentAccountParams.md @@ -0,0 +1,71 @@ +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L46) + +## Properties + +### agentId + +> **agentId**: `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L50) + +ERC-8004-style agent identifier (bytes32) binding this account to an off-chain identity. + +*** + +### agentKey + +> **agentKey**: `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L48) + +The agent's own signing key (EOA controlled by the agent runtime / KMS). + +*** + +### agentKeySig + +> **agentKeySig**: `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L56) + +The agent key's acceptance signature over the creation hash (EIP-191). + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L60) + +Daily transfer limit in wei (on-chain guard enforcement; V7 requires > 0). + +*** + +### deadline + +> **deadline**: `number` \| `bigint` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L58) + +Unix timestamp (uint48) after which the signatures are rejected. + +*** + +### guardian2 + +> **guardian2**: `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L52) + +The human guardian (guardian2) co-owning the agent account for recovery. + +*** + +### guardian2Sig + +> **guardian2Sig**: `string` + +Defined in: [packages/airaccount/src/server/services/agent-registry-service.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/agent-registry-service.ts#L54) + +Guardian2's acceptance signature over the creation hash (EIP-191). diff --git a/api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyRequest.md b/api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyRequest.md new file mode 100644 index 000000000..1c3015214 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyRequest.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L11) + +## Properties + +### humanKeyId + +> **humanKeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L13) + +Human (root) key under which the session key is minted. + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L15) + +Optional human-readable label for the session key. + +*** + +### webAuthnAssertion? + +> `optional` **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L21) + +One-time WebAuthn assertion gating creation. The challenge comes from a +generic [KmsManager.beginAuthentication](../classes/KmsManager.md#beginauthentication) ceremony — the caller runs +the ceremony and supplies the resulting assertion here. diff --git a/api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyResponse.md b/api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyResponse.md new file mode 100644 index 000000000..0be46926a --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/CreateP256SessionKeyResponse.md @@ -0,0 +1,49 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L24) + +## Properties + +### agentCredential + +> **agentCredential**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L29) + +*** + +### algorithm + +> **algorithm**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L28) + +*** + +### expiresAt + +> **expiresAt**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L30) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L25) + +*** + +### pubKeyX + +> **pubKeyX**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L26) + +*** + +### pubKeyY + +> **pubKeyY**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L27) diff --git a/api/@aastar/airaccount/server/interfaces/DelegateInitParams.md b/api/@aastar/airaccount/server/interfaces/DelegateInitParams.md new file mode 100644 index 000000000..56f5f7075 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/DelegateInitParams.md @@ -0,0 +1,51 @@ +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L38) + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L48) + +Daily ETH spend limit in wei + +*** + +### guardian1 + +> **guardian1**: `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L40) + +Guardian 1 address + +*** + +### guardian1Sig + +> **guardian1Sig**: `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L42) + +EIP-712 acceptance signature from guardian 1 + +*** + +### guardian2 + +> **guardian2**: `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L44) + +Guardian 2 address + +*** + +### guardian2Sig + +> **guardian2Sig**: `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L46) + +EIP-712 acceptance signature from guardian 2 diff --git a/api/@aastar/airaccount/server/interfaces/EIP7702Authorization.md b/api/@aastar/airaccount/server/interfaces/EIP7702Authorization.md new file mode 100644 index 000000000..e83e763a0 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/EIP7702Authorization.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L51) + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L55) + +The delegation target — AirAccountDelegate singleton address + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L53) + +Chain ID (e.g. 11155111 for Sepolia) + +*** + +### nonce + +> **nonce**: `bigint` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L57) + +EOA nonce at time of signing + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L59) + +Signature over the EIP-7702 authorization hash (65 bytes, R||S||V) diff --git a/api/@aastar/airaccount/server/interfaces/EntryPointConfig.md b/api/@aastar/airaccount/server/interfaces/EntryPointConfig.md new file mode 100644 index 000000000..54ab2e4d3 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/EntryPointConfig.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L15) + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L17) + +*** + +### factoryAddress + +> **factoryAddress**: `string` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L18) + +*** + +### validatorAddress + +> **validatorAddress**: `string` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L19) + +*** + +### version + +> **version**: [`EntryPointVersion`](../enumerations/EntryPointVersion.md) + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L16) diff --git a/api/@aastar/airaccount/server/interfaces/EntryPointVersionConfig.md b/api/@aastar/airaccount/server/interfaces/EntryPointVersionConfig.md new file mode 100644 index 000000000..1c0b08d61 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/EntryPointVersionConfig.md @@ -0,0 +1,27 @@ +Defined in: [packages/airaccount/src/server/config.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L9) + +Per-version EntryPoint configuration. + +## Properties + +### entryPointAddress + +> **entryPointAddress**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L10) + +*** + +### factoryAddress + +> **factoryAddress**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L11) + +*** + +### validatorAddress + +> **validatorAddress**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L12) diff --git a/api/@aastar/airaccount/server/interfaces/EstimateGasParams.md b/api/@aastar/airaccount/server/interfaces/EstimateGasParams.md new file mode 100644 index 000000000..817aaf0c3 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/EstimateGasParams.md @@ -0,0 +1,43 @@ +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L113) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L115) + +*** + +### data? + +> `optional` **data**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L116) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L114) + +*** + +### tokenAddress? + +> `optional` **tokenAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L117) + +*** + +### wrapExecuteUserOp? + +> `optional` **wrapExecuteUserOp**: `boolean` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L119) + +Match the executeUserOp wrapping used at submission so gas estimation is accurate (v0.17.2-beta.4). diff --git a/api/@aastar/airaccount/server/interfaces/ExecuteTransferParams.md b/api/@aastar/airaccount/server/interfaces/ExecuteTransferParams.md new file mode 100644 index 000000000..ce6991489 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/ExecuteTransferParams.md @@ -0,0 +1,120 @@ +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L85) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L87) + +*** + +### data? + +> `optional` **data**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L88) + +*** + +### guardianSigner? + +> `optional` **guardianSigner**: `GuardianSigner` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L101) + +Guardian signer instance. Required for AirAccount Tier 3. + +*** + +### p256Signature? + +> `optional` **p256Signature**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L99) + +P256 passkey signature (64 bytes hex). Required for AirAccount Tier 2/3. + +*** + +### passkeyAssertion? + +> `optional` **passkeyAssertion**: [`LegacyPasskeyAssertion`](LegacyPasskeyAssertion.md) + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L97) + +*** + +### paymasterAddress? + +> `optional` **paymasterAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L91) + +*** + +### paymasterData? + +> `optional` **paymasterData**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L92) + +*** + +### paymasterTokenAddress? + +> `optional` **paymasterTokenAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L96) + +ERC-20 token address for deposit-pull paymasters (e.g. PMv4) that require + the gas token address appended to paymasterData. Used when the paymaster + contract does not expose a public token() getter for auto-detection. + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L86) + +*** + +### tokenAddress? + +> `optional` **tokenAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L89) + +*** + +### useAirAccountTiering? + +> `optional` **useAirAccountTiering**: `boolean` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L103) + +Enable AirAccount tiered signature routing. Default: false (legacy BLS-only). + +*** + +### usePaymaster? + +> `optional` **usePaymaster**: `boolean` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L90) + +*** + +### wrapExecuteUserOp? + +> `optional` **wrapExecuteUserOp**: `boolean` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L110) + +Wrap the execute()/executeBatch() callData with the `executeUserOp` selector +(v0.17.2-beta.4 bundler-compat). REQUIRED for guard-enabled accounts submitted +through a standard ERC-4337 bundler; the account re-derives the signature algId +in-frame. Default: false. No-guard accounts and owner-direct calls leave it off. diff --git a/api/@aastar/airaccount/server/interfaces/GrantP256SessionParams.md b/api/@aastar/airaccount/server/interfaces/GrantP256SessionParams.md new file mode 100644 index 000000000..b85448efb --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/GrantP256SessionParams.md @@ -0,0 +1,111 @@ +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L63) + +## Properties + +### account + +> **account**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L65) + +Account that owns the session + +*** + +### callTargets? + +> `optional` **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L81) + +Allowed destination addresses ([] = any). Session struct field. + +*** + +### contractScope? + +> `optional` **contractScope**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L73) + +address(0) = any destination allowed + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L71) + +Expiry unix timestamp (max 7 days from now) + +*** + +### keyX + +> **keyX**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L67) + +P256 public key X coordinate (0x-prefixed 32-byte hex) + +*** + +### keyY + +> **keyY**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L69) + +P256 public key Y coordinate (0x-prefixed 32-byte hex) + +*** + +### ownerSig? + +> `optional` **ownerSig**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L85) + +Owner signature over buildP256GrantHash() — omit if calling directly from the owner EOA + +*** + +### selectorAllowlist? + +> `optional` **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L83) + +Allowed selectors ([] = any). Session struct field. + +*** + +### selectorScope? + +> `optional` **selectorScope**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L75) + +bytes4(0) = any selector allowed + +*** + +### velocityLimit? + +> `optional` **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L77) + +Max calls per velocityWindow (0 = unlimited). Session struct field. + +*** + +### velocityWindow? + +> `optional` **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L79) + +Velocity window in seconds (0 = no window). Session struct field. diff --git a/api/@aastar/airaccount/server/interfaces/GrantSessionParams.md b/api/@aastar/airaccount/server/interfaces/GrantSessionParams.md new file mode 100644 index 000000000..f7acc92c4 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/GrantSessionParams.md @@ -0,0 +1,101 @@ +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L28) + +## Properties + +### account + +> **account**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L30) + +Account that owns the session + +*** + +### callTargets? + +> `optional` **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L44) + +Allowed destination addresses ([] = any). Session struct field. + +*** + +### contractScope? + +> `optional` **contractScope**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L36) + +address(0) = any destination allowed + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L34) + +Expiry unix timestamp (max 7 days from now) + +*** + +### ownerSig? + +> `optional` **ownerSig**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L48) + +Owner signature over buildGrantHash() — omit if calling directly from account + +*** + +### selectorAllowlist? + +> `optional` **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L46) + +Allowed selectors ([] = any). Session struct field. + +*** + +### selectorScope? + +> `optional` **selectorScope**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L38) + +bytes4(0) = any selector allowed + +*** + +### sessionKey + +> **sessionKey**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L32) + +The session key address (ephemeral EOA) + +*** + +### velocityLimit? + +> `optional` **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L40) + +Max calls per velocityWindow (0 = unlimited). Session struct field. + +*** + +### velocityWindow? + +> `optional` **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L42) + +Velocity window in seconds (0 = no window). Session struct field. diff --git a/api/@aastar/airaccount/server/interfaces/GuardState.md b/api/@aastar/airaccount/server/interfaces/GuardState.md new file mode 100644 index 000000000..2824154ae --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/GuardState.md @@ -0,0 +1,81 @@ +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L20) + +## Properties + +### currentTier + +> **currentTier**: `TierLevel` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L28) + +Current tier based on spent amount + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L22) + +ETH daily limit in wei + +*** + +### guardAddress + +> **guardAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L36) + +Guard contract address + +*** + +### minDailyLimit + +> **minDailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L34) + +Minimum daily limit floor (cannot decrease below this) + +*** + +### remaining + +> **remaining**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L26) + +ETH remaining for today in wei + +*** + +### tier1Limit + +> **tier1Limit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L30) + +Tier 1 max spend threshold in wei (single sig) + +*** + +### tier2Limit + +> **tier2Limit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L32) + +Tier 2 max spend threshold in wei (dual sig) + +*** + +### todaySpent + +> **todaySpent**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L24) + +ETH already spent today in wei diff --git a/api/@aastar/airaccount/server/interfaces/ILogger.md b/api/@aastar/airaccount/server/interfaces/ILogger.md new file mode 100644 index 000000000..2edfd3f35 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/ILogger.md @@ -0,0 +1,80 @@ +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L5) + +Optional logger interface for server SDK. +Implement this to integrate with your application's logging framework. + +## Methods + +### debug() + +> **debug**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L6) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +*** + +### error() + +> **error**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +*** + +### log() + +> **log**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L7) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` + +*** + +### warn() + +> **warn**(`message`, ...`args`): `void` + +Defined in: [packages/airaccount/src/server/interfaces/logger.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/logger.ts#L8) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| ...`args` | `unknown`[] | + +#### Returns + +`void` diff --git a/api/@aastar/airaccount/server/interfaces/ISignerAdapter.md b/api/@aastar/airaccount/server/interfaces/ISignerAdapter.md new file mode 100644 index 000000000..b816ddf65 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/ISignerAdapter.md @@ -0,0 +1,74 @@ +Defined in: [packages/airaccount/src/server/interfaces/signer-adapter.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/signer-adapter.ts#L19) + +Pluggable signer adapter — replaces NestJS AuthService wallet management. +Implement this to provide signing capabilities from your key management system. + +Narrow by design: the only operations the SDK performs are EOA address +lookup and EIP-191 personal-sign over a digest. There is no transaction +signing / provider connection — that lives in the bundler/UserOp path. + +## Methods + +### ensureSigner() + +> **ensureSigner**(`userId`): `Promise`\<\{ `address`: `` `0x${string}` ``; \}\> + +Defined in: [packages/airaccount/src/server/interfaces/signer-adapter.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/signer-adapter.ts#L41) + +Ensure a signer exists for the user (create on demand if needed). +Returns the signer's address. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<\{ `address`: `` `0x${string}` ``; \}\> + +*** + +### getAddress() + +> **getAddress**(`userId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/interfaces/signer-adapter.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/signer-adapter.ts#L21) + +Get the EOA address for a given user. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### signMessage() + +> **signMessage**(`userId`, `message`, `ctx?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/airaccount/src/server/interfaces/signer-adapter.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/signer-adapter.ts#L31) + +Sign a message for a given user, applying EIP-191 personal-sign semantics +(equivalent to ethers `signer.signMessage(bytes)` / viem +`account.signMessage({ raw: bytes })`). A `Uint8Array` (or raw `0x` hex) is +signed as raw bytes — callers pass a 32-byte digest, NOT UTF-8 text. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `userId` | `string` | - | +| `message` | `` `0x${string}` `` \| `Uint8Array` | - | +| `ctx?` | [`PasskeyAssertionContext`](PasskeyAssertionContext.md) | optional Passkey assertion context for KMS-backed signers. | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/airaccount/server/interfaces/IStorageAdapter.md b/api/@aastar/airaccount/server/interfaces/IStorageAdapter.md new file mode 100644 index 000000000..73c5e2741 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/IStorageAdapter.md @@ -0,0 +1,231 @@ +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L93) + +Pluggable storage adapter — replaces NestJS DatabaseService. +SDK only manages accounts, transfers, paymasters, and BLS config. +User authentication is NOT handled by the SDK. + +## Methods + +### findAccountByUserId() + +> **findAccountByUserId**(`userId`): `Promise`\<[`AccountRecord`](AccountRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L97) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`AccountRecord`](AccountRecord.md) \| `null`\> + +*** + +### findTransferById() + +> **findTransferById**(`id`): `Promise`\<[`TransferRecord`](TransferRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L103) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `id` | `string` | + +#### Returns + +`Promise`\<[`TransferRecord`](TransferRecord.md) \| `null`\> + +*** + +### findTransfersByUserId() + +> **findTransfersByUserId**(`userId`): `Promise`\<[`TransferRecord`](TransferRecord.md)[]\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L102) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`TransferRecord`](TransferRecord.md)[]\> + +*** + +### getAccounts() + +> **getAccounts**(): `Promise`\<[`AccountRecord`](AccountRecord.md)[]\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L95) + +#### Returns + +`Promise`\<[`AccountRecord`](AccountRecord.md)[]\> + +*** + +### getBlsConfig() + +> **getBlsConfig**(): `Promise`\<[`BlsConfigRecord`](BlsConfigRecord.md) \| `null`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L112) + +#### Returns + +`Promise`\<[`BlsConfigRecord`](BlsConfigRecord.md) \| `null`\> + +*** + +### getPaymasters() + +> **getPaymasters**(`userId`): `Promise`\<[`PaymasterRecord`](PaymasterRecord.md)[]\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L107) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | + +#### Returns + +`Promise`\<[`PaymasterRecord`](PaymasterRecord.md)[]\> + +*** + +### removePaymaster() + +> **removePaymaster**(`userId`, `name`): `Promise`\<`boolean`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L109) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `name` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### saveAccount() + +> **saveAccount**(`account`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L96) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | [`AccountRecord`](AccountRecord.md) | + +#### Returns + +`Promise`\<`void`\> + +*** + +### savePaymaster() + +> **savePaymaster**(`userId`, `paymaster`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L108) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `paymaster` | [`PaymasterRecord`](PaymasterRecord.md) | + +#### Returns + +`Promise`\<`void`\> + +*** + +### saveTransfer() + +> **saveTransfer**(`transfer`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L101) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `transfer` | [`TransferRecord`](TransferRecord.md) | + +#### Returns + +`Promise`\<`void`\> + +*** + +### updateAccount() + +> **updateAccount**(`userId`, `updates`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L98) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userId` | `string` | +| `updates` | `Partial`\<[`AccountRecord`](AccountRecord.md)\> | + +#### Returns + +`Promise`\<`void`\> + +*** + +### updateSignerNodesCache() + +> **updateSignerNodesCache**(`nodes`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L113) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `nodes` | `unknown`[] | + +#### Returns + +`Promise`\<`void`\> + +*** + +### updateTransfer() + +> **updateTransfer**(`id`, `updates`): `Promise`\<`void`\> + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L104) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `id` | `string` | +| `updates` | `Partial`\<[`TransferRecord`](TransferRecord.md)\> | + +#### Returns + +`Promise`\<`void`\> diff --git a/api/@aastar/airaccount/server/interfaces/InstallModuleParams.md b/api/@aastar/airaccount/server/interfaces/InstallModuleParams.md new file mode 100644 index 000000000..ee4bf661b --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/InstallModuleParams.md @@ -0,0 +1,58 @@ +Defined in: [packages/airaccount/src/server/services/module-manager.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L21) + +## Properties + +### account + +> **account**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L23) + +The deployed AirAccount address + +*** + +### guardianSigs? + +> `optional` **guardianSigs**: `string`[] + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L38) + +Guardian signatures + module init data, packed as: + bytes[0..65*sigsRequired] = guardian ECDSA sigs + bytes[65*sigsRequired..] = module onInstall() init data + +Sig hash (per guardian, r5 format): + keccak256("INSTALL_MODULE" ‖ chainId ‖ account ‖ moduleTypeId ‖ module ‖ keccak256(moduleInitData)).toEthSignedMessageHash() + +sigsRequired: 0 if threshold<=40, 1 if <=70, 2 if =100 + +*** + +### module + +> **module**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L27) + +Module contract address to install + +*** + +### moduleInitData? + +> `optional` **moduleInitData**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L40) + +Raw bytes passed to module.onInstall() after guardian sigs + +*** + +### moduleTypeId + +> **moduleTypeId**: [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L25) + +ERC-7579 module type: 1=Validator, 2=Executor, 3=Fallback, 4=Hook diff --git a/api/@aastar/airaccount/server/interfaces/KmsAttestationManifestResponse.md b/api/@aastar/airaccount/server/interfaces/KmsAttestationManifestResponse.md new file mode 100644 index 000000000..c83a238ba --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsAttestationManifestResponse.md @@ -0,0 +1,31 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L86) + +`GET /.well-known/attestation-measurements.json` — Ed25519-signed manifest (#12). + +## Indexable + +\[`k`: `string`\]: `unknown` + +## Properties + +### body? + +> `optional` **body**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L87) + +*** + +### publisher\_key? + +> `optional` **publisher\_key**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L88) + +*** + +### signature? + +> `optional` **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L89) diff --git a/api/@aastar/airaccount/server/interfaces/KmsAttestationProofResponse.md b/api/@aastar/airaccount/server/interfaces/KmsAttestationProofResponse.md new file mode 100644 index 000000000..b9ffe2aaa --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsAttestationProofResponse.md @@ -0,0 +1,15 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L94) + +`GET /.well-known/attestation-measurements-proof.json` — Sigsum proof sidecar (#87). + +## Indexable + +\[`k`: `string`\]: `unknown` + +## Properties + +### proof? + +> `optional` **proof**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L95) diff --git a/api/@aastar/airaccount/server/interfaces/KmsAttestationResponse.md b/api/@aastar/airaccount/server/interfaces/KmsAttestationResponse.md new file mode 100644 index 000000000..3ccbc93a7 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsAttestationResponse.md @@ -0,0 +1,87 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L71) + +`GET /attestation` evidence bound to a caller nonce (#37). + +## Indexable + +\[`k`: `string`\]: `unknown` + +## Properties + +### attest\_pubkey\_exp? + +> `optional` **attest\_pubkey\_exp**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L77) + +*** + +### attest\_pubkey\_mod? + +> `optional` **attest\_pubkey\_mod**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L78) + +*** + +### nonce? + +> `optional` **nonce**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L73) + +*** + +### ree\_time\_secs? + +> `optional` **ree\_time\_secs**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L80) + +*** + +### schema? + +> `optional` **schema**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L72) + +*** + +### sig\_alg? + +> `optional` **sig\_alg**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L79) + +*** + +### signature? + +> `optional` **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L76) + +*** + +### ta\_measurement? + +> `optional` **ta\_measurement**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L75) + +*** + +### ta\_uuid? + +> `optional` **ta\_uuid**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L74) + +*** + +### trust\_root? + +> `optional` **trust\_root**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L81) diff --git a/api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationRequest.md b/api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationRequest.md new file mode 100644 index 000000000..b328d9844 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationRequest.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L88) + +## Properties + +### Address? + +> `optional` **Address**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L89) + +*** + +### KeyId? + +> `optional` **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L90) diff --git a/api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationResponse.md b/api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationResponse.md new file mode 100644 index 000000000..2f06c9dcc --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsBeginAuthenticationResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L93) + +## Properties + +### ChallengeId + +> **ChallengeId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L94) + +*** + +### Options + +> **Options**: `PublicKeyCredentialRequestOptions` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L95) diff --git a/api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthRequest.md b/api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthRequest.md new file mode 100644 index 000000000..ede99ac33 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthRequest.md @@ -0,0 +1,9 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L139) + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:140](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L140) diff --git a/api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthResponse.md b/api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthResponse.md new file mode 100644 index 000000000..1919584f2 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsBeginGrantSessionAuthResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L143) + +## Properties + +### ChallengeId + +> **ChallengeId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:146](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L146) + +*** + +### Options + +> **Options**: `PublicKeyCredentialRequestOptions` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L147) diff --git a/api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationRequest.md b/api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationRequest.md new file mode 100644 index 000000000..38503dc39 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationRequest.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L63) + +## Properties + +### Description? + +> `optional` **Description**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L64) + +*** + +### UserDisplayName? + +> `optional` **UserDisplayName**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L66) + +*** + +### UserName? + +> `optional` **UserName**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L65) diff --git a/api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationResponse.md b/api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationResponse.md new file mode 100644 index 000000000..6e41dacf9 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsBeginRegistrationResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L69) + +## Properties + +### ChallengeId + +> **ChallengeId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L70) + +*** + +### Options + +> **Options**: `PublicKeyCredentialCreationOptions` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L71) diff --git a/api/@aastar/airaccount/server/interfaces/KmsChangePasskeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsChangePasskeyResponse.md new file mode 100644 index 000000000..8bec1e1d0 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsChangePasskeyResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:287](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L287) + +## Properties + +### Changed + +> **Changed**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:289](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L289) + +*** + +### KeyId + +> **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:288](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L288) diff --git a/api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationRequest.md b/api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationRequest.md new file mode 100644 index 000000000..cb4c11ba9 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationRequest.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L74) + +## Properties + +### ChallengeId + +> **ChallengeId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L75) + +*** + +### Credential + +> **Credential**: `unknown` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L76) + +*** + +### Description? + +> `optional` **Description**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L77) diff --git a/api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationResponse.md b/api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationResponse.md new file mode 100644 index 000000000..15f1e01dc --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsCompleteRegistrationResponse.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L80) + +## Properties + +### CredentialId + +> **CredentialId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L82) + +*** + +### KeyId + +> **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L81) + +*** + +### Status + +> **Status**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L83) diff --git a/api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyRequest.md b/api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyRequest.md new file mode 100644 index 000000000..d4583a148 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyRequest.md @@ -0,0 +1,40 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L19) + +Request to mint a new agent key under an existing human key. + +WebAuthn-gated: the human approves the mint with a one-time WebAuthn ceremony +(preferred) or a Legacy passkey assertion. The challenge is obtained via +[KmsManager.beginAuthentication](../classes/KmsManager.md#beginauthentication) (generic, purpose="authentication") — +the caller supplies the resulting assertion here. + +## Properties + +### humanKeyId + +> **humanKeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L20) + +*** + +### label? + +> `optional` **label**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L21) + +*** + +### passkeyAssertion? + +> `optional` **passkeyAssertion**: [`LegacyPasskeyAssertion`](LegacyPasskeyAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L23) + +*** + +### webAuthnAssertion? + +> `optional` **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L22) diff --git a/api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyResponse.md new file mode 100644 index 000000000..a3b74f51d --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsCreateAgentKeyResponse.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L26) + +## Properties + +### agentAddress + +> **agentAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L28) + +*** + +### agentCredential + +> **agentCredential**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L30) + +*** + +### derivationPath + +> **derivationPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L29) + +*** + +### expiresAt + +> **expiresAt**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L31) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L27) diff --git a/api/@aastar/airaccount/server/interfaces/KmsCreateKeyRequest.md b/api/@aastar/airaccount/server/interfaces/KmsCreateKeyRequest.md new file mode 100644 index 000000000..06a60f60f --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsCreateKeyRequest.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L30) + +## Properties + +### Description + +> **Description**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L31) + +*** + +### KeySpec? + +> `optional` **KeySpec**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L33) + +*** + +### KeyUsage? + +> `optional` **KeyUsage**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L32) + +*** + +### Origin? + +> `optional` **Origin**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L34) + +*** + +### PasskeyPublicKey + +> **PasskeyPublicKey**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L35) diff --git a/api/@aastar/airaccount/server/interfaces/KmsCreateKeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsCreateKeyResponse.md new file mode 100644 index 000000000..2906d3aac --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsCreateKeyResponse.md @@ -0,0 +1,69 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L38) + +## Properties + +### Address? + +> `optional` **Address**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L51) + +*** + +### KeyMetadata + +> **KeyMetadata**: `object` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L39) + +#### Address? + +> `optional` **Address**: `string` + +#### Arn + +> **Arn**: `string` + +#### CreationDate + +> **CreationDate**: `string` + +#### Description + +> **Description**: `string` + +#### Enabled + +> **Enabled**: `boolean` + +#### KeyId + +> **KeyId**: `string` + +#### KeySpec + +> **KeySpec**: `string` + +#### KeyUsage + +> **KeyUsage**: `string` + +#### Origin + +> **Origin**: `string` + +*** + +### Mnemonic + +> **Mnemonic**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L50) + +*** + +### Status? + +> `optional` **Status**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L52) diff --git a/api/@aastar/airaccount/server/interfaces/KmsDeleteKeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsDeleteKeyResponse.md new file mode 100644 index 000000000..394c2010e --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsDeleteKeyResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:280](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L280) + +## Properties + +### DeletionDate? + +> `optional` **DeletionDate**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:282](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L282) + +*** + +### KeyId + +> **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:281](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L281) diff --git a/api/@aastar/airaccount/server/interfaces/KmsDeriveAddressResponse.md b/api/@aastar/airaccount/server/interfaces/KmsDeriveAddressResponse.md new file mode 100644 index 000000000..4c49f0c06 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsDeriveAddressResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L265) + +## Properties + +### Address + +> **Address**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:266](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L266) + +*** + +### PublicKey? + +> `optional` **PublicKey**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:267](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L267) diff --git a/api/@aastar/airaccount/server/interfaces/KmsDescribeKeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsDescribeKeyResponse.md new file mode 100644 index 000000000..a317f03ef --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsDescribeKeyResponse.md @@ -0,0 +1,57 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:205](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L205) + +## Properties + +### KeyMetadata + +> **KeyMetadata**: `object` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L206) + +#### Address? + +> `optional` **Address**: `string` + +#### Arn? + +> `optional` **Arn**: `string` + +#### CreationDate? + +> `optional` **CreationDate**: `string` + +#### DerivationPath? + +> `optional` **DerivationPath**: `string` + +#### Description? + +> `optional` **Description**: `string` + +#### Enabled? + +> `optional` **Enabled**: `boolean` + +#### KeyId + +> **KeyId**: `string` + +#### KeySpec? + +> `optional` **KeySpec**: `string` + +#### KeyUsage? + +> `optional` **KeyUsage**: `string` + +#### Origin? + +> `optional` **Origin**: `string` + +#### PasskeyPublicKey? + +> `optional` **PasskeyPublicKey**: `string` + +#### PublicKey? + +> `optional` **PublicKey**: `string` diff --git a/api/@aastar/airaccount/server/interfaces/KmsEip712Domain.md b/api/@aastar/airaccount/server/interfaces/KmsEip712Domain.md new file mode 100644 index 000000000..e7bccfa29 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsEip712Domain.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L102) + +## Properties + +### chainId? + +> `optional` **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L105) + +*** + +### name? + +> `optional` **name**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L103) + +*** + +### verifyingContract? + +> `optional` **verifyingContract**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L106) + +*** + +### version? + +> `optional` **version**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L104) diff --git a/api/@aastar/airaccount/server/interfaces/KmsEip712FieldValue.md b/api/@aastar/airaccount/server/interfaces/KmsEip712FieldValue.md new file mode 100644 index 000000000..57eb4571a --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsEip712FieldValue.md @@ -0,0 +1,19 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L116) + +One field value for the primary type's message. + +## Properties + +### name + +> **name**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L117) + +*** + +### value + +> **value**: `unknown` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L118) diff --git a/api/@aastar/airaccount/server/interfaces/KmsEip712TypeDef.md b/api/@aastar/airaccount/server/interfaces/KmsEip712TypeDef.md new file mode 100644 index 000000000..b08313c91 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsEip712TypeDef.md @@ -0,0 +1,27 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L110) + +One entry in a `types` definition: a struct name and its ordered fields. + +## Properties + +### fields + +> **fields**: `object`[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L112) + +#### name + +> **name**: `string` + +#### type + +> **type**: `string` + +*** + +### name + +> **name**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L111) diff --git a/api/@aastar/airaccount/server/interfaces/KmsEthereumTransaction.md b/api/@aastar/airaccount/server/interfaces/KmsEthereumTransaction.md new file mode 100644 index 000000000..a0d1a547e --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsEthereumTransaction.md @@ -0,0 +1,57 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:224](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L224) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L225) + +*** + +### data + +> **data**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:231](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L231) + +*** + +### gas + +> **gas**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:230](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L230) + +*** + +### gasPrice + +> **gasPrice**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L229) + +*** + +### nonce + +> **nonce**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:226](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L226) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:227](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L227) + +*** + +### value + +> **value**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:228](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L228) diff --git a/api/@aastar/airaccount/server/interfaces/KmsGetPublicKeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsGetPublicKeyResponse.md new file mode 100644 index 000000000..b8655d991 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsGetPublicKeyResponse.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:255](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L255) + +## Properties + +### Address? + +> `optional` **Address**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:258](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L258) + +*** + +### KeyId + +> **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:256](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L256) + +*** + +### KeySpec? + +> `optional` **KeySpec**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:260](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L260) + +*** + +### KeyUsage? + +> `optional` **KeyUsage**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:259](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L259) + +*** + +### PublicKey + +> **PublicKey**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:257](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L257) diff --git a/api/@aastar/airaccount/server/interfaces/KmsHealthResponse.md b/api/@aastar/airaccount/server/interfaces/KmsHealthResponse.md new file mode 100644 index 000000000..a6f73c04f --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsHealthResponse.md @@ -0,0 +1,36 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L9) + +Liveness probe response. Returned by `GET /health` without auth — works even +when the SDK's KMS feature flag is off. + +## Properties + +### service? + +> `optional` **service**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L11) + +*** + +### status + +> **status**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L10) + +*** + +### ta\_mode? + +> `optional` **ta\_mode**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L12) + +*** + +### version? + +> `optional` **version**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L13) diff --git a/api/@aastar/airaccount/server/interfaces/KmsHttpClientOptions.md b/api/@aastar/airaccount/server/interfaces/KmsHttpClientOptions.md new file mode 100644 index 000000000..3764c1066 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsHttpClientOptions.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L10) + +## Properties + +### kmsApiKey? + +> `optional` **kmsApiKey**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L13) + +*** + +### kmsEnabled? + +> `optional` **kmsEnabled**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L12) + +*** + +### kmsEndpoint? + +> `optional` **kmsEndpoint**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L11) + +*** + +### logger? + +> `optional` **logger**: [`ILogger`](ILogger.md) + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L14) diff --git a/api/@aastar/airaccount/server/interfaces/KmsKeyStatusResponse.md b/api/@aastar/airaccount/server/interfaces/KmsKeyStatusResponse.md new file mode 100644 index 000000000..31ae4903b --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsKeyStatusResponse.md @@ -0,0 +1,49 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:194](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L194) + +## Properties + +### Address? + +> `optional` **Address**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L197) + +*** + +### DerivationPath? + +> `optional` **DerivationPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:199](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L199) + +*** + +### Error? + +> `optional` **Error**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:200](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L200) + +*** + +### KeyId + +> **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L195) + +*** + +### PublicKey? + +> `optional` **PublicKey**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L198) + +*** + +### Status + +> **Status**: `"creating"` \| `"deriving"` \| `"ready"` \| `"error"` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L196) diff --git a/api/@aastar/airaccount/server/interfaces/KmsListKeysResponse.md b/api/@aastar/airaccount/server/interfaces/KmsListKeysResponse.md new file mode 100644 index 000000000..16db8ebc9 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsListKeysResponse.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:272](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L272) + +## Properties + +### Keys + +> **Keys**: `object`[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:273](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L273) + +#### KeyArn? + +> `optional` **KeyArn**: `string` + +#### KeyId + +> **KeyId**: `string` + +*** + +### NextMarker? + +> `optional` **NextMarker**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:275](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L275) + +*** + +### Truncated? + +> `optional` **Truncated**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:274](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L274) diff --git a/api/@aastar/airaccount/server/interfaces/KmsPaymentSignatureResponse.md b/api/@aastar/airaccount/server/interfaces/KmsPaymentSignatureResponse.md new file mode 100644 index 000000000..456da4a1d --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsPaymentSignatureResponse.md @@ -0,0 +1,19 @@ +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L14) + +Shared signature response for all payment signing endpoints. + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L15) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L16) diff --git a/api/@aastar/airaccount/server/interfaces/KmsPurgeKeyResponse.md b/api/@aastar/airaccount/server/interfaces/KmsPurgeKeyResponse.md new file mode 100644 index 000000000..6994c0356 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsPurgeKeyResponse.md @@ -0,0 +1,8 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L105) + +Response of the destructive operator-only purge action (v0.20.0). +Pass-through; the response shape is not strongly typed. + +## Indexable + +\[`k`: `string`\]: `unknown` diff --git a/api/@aastar/airaccount/server/interfaces/KmsQueueStatusResponse.md b/api/@aastar/airaccount/server/interfaces/KmsQueueStatusResponse.md new file mode 100644 index 000000000..0f615eff2 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsQueueStatusResponse.md @@ -0,0 +1,36 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L35) + +KMS request-queue health, including circuit-breaker state. Useful for +back-pressure decisions before submitting signing operations. + +## Properties + +### circuit\_breaker\_open + +> **circuit\_breaker\_open**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L38) + +*** + +### consecutive\_failures + +> **consecutive\_failures**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L39) + +*** + +### estimated\_wait\_seconds + +> **estimated\_wait\_seconds**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L37) + +*** + +### queue\_depth + +> **queue\_depth**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L36) diff --git a/api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialRequest.md b/api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialRequest.md new file mode 100644 index 000000000..4d7a2ac00 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialRequest.md @@ -0,0 +1,30 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L62) + +Request to refresh (re-mint) an agent's TEE-JWT credential before it expires. + +Authenticated with the existing (still-valid) credential via Bearer JWT, plus +a WebAuthn / Legacy passkey assertion from the human key owner. + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L63) + +*** + +### passkeyAssertion? + +> `optional` **passkeyAssertion**: [`LegacyPasskeyAssertion`](LegacyPasskeyAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L65) + +*** + +### webAuthnAssertion? + +> `optional` **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L64) diff --git a/api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialResponse.md b/api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialResponse.md new file mode 100644 index 000000000..f3ccbbe81 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsRefreshAgentCredentialResponse.md @@ -0,0 +1,28 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L72) + +The server response shape is not strictly documented; this models the fields +the SDK relies on. `keyId` is echoed back optionally. + +## Properties + +### agentCredential + +> **agentCredential**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L74) + +*** + +### expiresAt + +> **expiresAt**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L75) + +*** + +### keyId? + +> `optional` **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L73) diff --git a/api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialRequest.md b/api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialRequest.md new file mode 100644 index 000000000..4510e7a84 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialRequest.md @@ -0,0 +1,30 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L86) + +Request to revoke an agent's credential (WebAuthn-gated). + +The challenge is obtained via [KmsManager.beginAuthentication](../classes/KmsManager.md#beginauthentication) (generic, +purpose="authentication"); the caller supplies the resulting assertion here. + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L87) + +*** + +### passkeyAssertion? + +> `optional` **passkeyAssertion**: [`LegacyPasskeyAssertion`](LegacyPasskeyAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L89) + +*** + +### webAuthnAssertion? + +> `optional` **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L88) diff --git a/api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialResponse.md b/api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialResponse.md new file mode 100644 index 000000000..f4d54dec7 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsRevokeAgentCredentialResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L92) + +## Properties + +### revokedAt + +> **revokedAt**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L94) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L93) diff --git a/api/@aastar/airaccount/server/interfaces/KmsRollbackCounterResponse.md b/api/@aastar/airaccount/server/interfaces/KmsRollbackCounterResponse.md new file mode 100644 index 000000000..ddecffd64 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsRollbackCounterResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L49) + +RPMB anti-rollback monotonic counter (diagnostic, v0.20.0). The exact shape +is undocumented; the known `counter` field is surfaced and all other fields +are passed through. + +## Indexable + +\[`k`: `string`\]: `unknown` + +## Properties + +### counter? + +> `optional` **counter**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L50) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignAgentRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignAgentRequest.md new file mode 100644 index 000000000..5629de161 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignAgentRequest.md @@ -0,0 +1,36 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L40) + +Request to sign a userOpHash with an agent key, authenticated by the agent's +TEE-JWT credential (Bearer). Used for gasless ERC-4337 sponsorship. + +## Properties + +### accountAddress + +> **accountAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L44) + +*** + +### algorithm? + +> `optional` **algorithm**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L43) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L41) + +*** + +### payload + +> **payload**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L42) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignAgentResponse.md b/api/@aastar/airaccount/server/interfaces/KmsSignAgentResponse.md new file mode 100644 index 000000000..a0467fa70 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignAgentResponse.md @@ -0,0 +1,27 @@ +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L47) + +## Properties + +### agentAddress + +> **agentAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L49) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L48) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-agent-service.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-agent-service.ts#L51) + +Hex 106-byte signature: [0x08][account(20)][key(20)][r(32)][s(32)][v(1)]. diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignGTokenAuthorizationRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignGTokenAuthorizationRequest.md new file mode 100644 index 000000000..f40001d7c --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignGTokenAuthorizationRequest.md @@ -0,0 +1,81 @@ +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L32) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L35) + +*** + +### from + +> **from**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L37) + +*** + +### gTokenAddress + +> **gTokenAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L36) + +*** + +### hdPath? + +> `optional` **hdPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L34) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L33) + +*** + +### nonce + +> **nonce**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L42) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L38) + +*** + +### validAfter + +> **validAfter**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L40) + +*** + +### validBefore + +> **validBefore**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L41) + +*** + +### value + +> **value**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L39) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionRequest.md new file mode 100644 index 000000000..7972d90d4 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionRequest.md @@ -0,0 +1,121 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L150) + +## Properties + +### account + +> **account**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L155) + +*** + +### callTargets + +> **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L162) + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L153) + +*** + +### contractScope + +> **contractScope**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L158) + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L157) + +*** + +### hdPath? + +> `optional` **hdPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:152](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L152) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L151) + +*** + +### nonce + +> **nonce**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:164](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L164) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:163](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L163) + +*** + +### selectorScope + +> **selectorScope**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L159) + +*** + +### sessionKey + +> **sessionKey**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:156](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L156) + +*** + +### velocityLimit + +> **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:160](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L160) + +*** + +### velocityWindow + +> **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L161) + +*** + +### verifyingContract + +> **verifyingContract**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L154) + +*** + +### webAuthnAssertion + +> **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:165](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L165) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionResponse.md b/api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionResponse.md new file mode 100644 index 000000000..c7c029401 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignGrantSessionResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:168](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L168) + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L169) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L170) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignHashResponse.md b/api/@aastar/airaccount/server/interfaces/KmsSignHashResponse.md new file mode 100644 index 000000000..611de9d56 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignHashResponse.md @@ -0,0 +1,9 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L57) + +## Properties + +### Signature + +> **Signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L58) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignMicropaymentVoucherRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignMicropaymentVoucherRequest.md new file mode 100644 index 000000000..82e70ea0a --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignMicropaymentVoucherRequest.md @@ -0,0 +1,49 @@ +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L21) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L24) + +*** + +### channelId + +> **channelId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L26) + +*** + +### cumulativeAmount + +> **cumulativeAmount**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L27) + +*** + +### hdPath? + +> `optional` **hdPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L23) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L22) + +*** + +### verifyingContract + +> **verifyingContract**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L25) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignP256GrantSessionRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignP256GrantSessionRequest.md new file mode 100644 index 000000000..1d7d508e5 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignP256GrantSessionRequest.md @@ -0,0 +1,129 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L173) + +## Properties + +### account + +> **account**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:178](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L178) + +*** + +### callTargets + +> **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:186](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L186) + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L176) + +*** + +### contractScope + +> **contractScope**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:182](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L182) + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L181) + +*** + +### hdPath? + +> `optional` **hdPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L175) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L174) + +*** + +### keyX + +> **keyX**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L179) + +*** + +### keyY + +> **keyY**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:180](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L180) + +*** + +### nonce + +> **nonce**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:188](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L188) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L187) + +*** + +### selectorScope + +> **selectorScope**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L183) + +*** + +### velocityLimit + +> **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L184) + +*** + +### velocityWindow + +> **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L185) + +*** + +### verifyingContract + +> **verifyingContract**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:177](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L177) + +*** + +### webAuthnAssertion + +> **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:189](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L189) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignRequest.md new file mode 100644 index 000000000..9b257b73f --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignRequest.md @@ -0,0 +1,67 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:236](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L236) + +## Properties + +### Address? + +> `optional` **Address**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:238](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L238) + +*** + +### DerivationPath? + +> `optional` **DerivationPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:239](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L239) + +*** + +### KeyId? + +> `optional` **KeyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:237](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L237) + +*** + +### Message? + +> `optional` **Message**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:241](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L241) + +Provide exactly one of Message or Transaction. + +*** + +### Passkey? + +> `optional` **Passkey**: [`LegacyPasskeyAssertion`](LegacyPasskeyAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:245](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L245) + +*** + +### SigningAlgorithm? + +> `optional` **SigningAlgorithm**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:243](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L243) + +*** + +### Transaction? + +> `optional` **Transaction**: [`KmsEthereumTransaction`](KmsEthereumTransaction.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:242](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L242) + +*** + +### WebAuthn? + +> `optional` **WebAuthn**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:244](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L244) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignResponse.md b/api/@aastar/airaccount/server/interfaces/KmsSignResponse.md new file mode 100644 index 000000000..47bb4f03d --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L248) + +## Properties + +### Signature + +> **Signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:249](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L249) + +*** + +### TransactionHash? + +> `optional` **TransactionHash**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:250](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L250) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignTypedDataRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignTypedDataRequest.md new file mode 100644 index 000000000..bc1254256 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignTypedDataRequest.md @@ -0,0 +1,59 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L121) + +## Properties + +### domain + +> **domain**: [`KmsEip712Domain`](KmsEip712Domain.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L124) + +*** + +### hdPath? + +> `optional` **hdPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L123) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L122) + +*** + +### message + +> **message**: [`KmsEip712FieldValue`](KmsEip712FieldValue.md)[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L127) + +*** + +### primaryType + +> **primaryType**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L125) + +*** + +### types + +> **types**: [`KmsEip712TypeDef`](KmsEip712TypeDef.md)[] + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L126) + +*** + +### webAuthnAssertion? + +> `optional` **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L129) + +Required unless a Bearer agent JWT is supplied. Legacy passkeyAssertion is rejected. diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignTypedDataResponse.md b/api/@aastar/airaccount/server/interfaces/KmsSignTypedDataResponse.md new file mode 100644 index 000000000..8140ec03e --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignTypedDataResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L132) + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L133) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L134) diff --git a/api/@aastar/airaccount/server/interfaces/KmsSignX402PaymentRequest.md b/api/@aastar/airaccount/server/interfaces/KmsSignX402PaymentRequest.md new file mode 100644 index 000000000..5e89fb8c4 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsSignX402PaymentRequest.md @@ -0,0 +1,65 @@ +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L47) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L53) + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L50) + +*** + +### deadline + +> **deadline**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L55) + +*** + +### hdPath? + +> `optional` **hdPath**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L49) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L48) + +*** + +### paymentId + +> **paymentId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L52) + +*** + +### recipient + +> **recipient**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L54) + +*** + +### verifyingContract + +> **verifyingContract**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L51) diff --git a/api/@aastar/airaccount/server/interfaces/KmsStatsResponse.md b/api/@aastar/airaccount/server/interfaces/KmsStatsResponse.md new file mode 100644 index 000000000..5a1e29b18 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsStatsResponse.md @@ -0,0 +1,12 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L64) + +Machine-readable runtime statistics (v0.20.0). Pass-through; the response is +not strongly typed. Known top-level fields: + - `wallets` — wallet / key counts + - `tx` — transaction / signing counts + - `queue` — queue depth and timing metrics + - `warnings` — active operational warnings + +## Indexable + +\[`k`: `string`\]: `unknown` diff --git a/api/@aastar/airaccount/server/interfaces/KmsVersionResponse.md b/api/@aastar/airaccount/server/interfaces/KmsVersionResponse.md new file mode 100644 index 000000000..567305e89 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/KmsVersionResponse.md @@ -0,0 +1,32 @@ +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L22) + +Version / capability descriptor. Returned by `GET /version` without auth. +Extra fields are passed through. + +## Indexable + +\[`k`: `string`\]: `unknown` + +## Properties + +### endpoints? + +> `optional` **endpoints**: `string`[] + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L25) + +*** + +### ta\_mode? + +> `optional` **ta\_mode**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L24) + +*** + +### version? + +> `optional` **version**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-monitor-service.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-monitor-service.ts#L23) diff --git a/api/@aastar/airaccount/server/interfaces/LegacyPasskeyAssertion.md b/api/@aastar/airaccount/server/interfaces/LegacyPasskeyAssertion.md new file mode 100644 index 000000000..b8f5c0f7a --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/LegacyPasskeyAssertion.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L13) + +## Properties + +### AuthenticatorData + +> **AuthenticatorData**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L14) + +*** + +### ClientDataHash + +> **ClientDataHash**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L15) + +*** + +### Signature + +> **Signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L16) diff --git a/api/@aastar/airaccount/server/interfaces/MintAgentIdentityParams.md b/api/@aastar/airaccount/server/interfaces/MintAgentIdentityParams.md new file mode 100644 index 000000000..4d79b2fe8 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/MintAgentIdentityParams.md @@ -0,0 +1,21 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L56) + +## Properties + +### agentURI + +> **agentURI**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L60) + +Agent metadata URI (ERC-721 tokenURI) + +*** + +### identityRegistry + +> **identityRegistry**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L58) + +Must be the official ERC-8004 identity registry for this chain diff --git a/api/@aastar/airaccount/server/interfaces/OapdConfig.md b/api/@aastar/airaccount/server/interfaces/OapdConfig.md new file mode 100644 index 000000000..66a746c76 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/OapdConfig.md @@ -0,0 +1,66 @@ +Defined in: [packages/airaccount/src/server/utils/oapd.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L23) + +## Properties + +### dappId + +> **dappId**: `string` + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L27) + +DApp identifier — use the DApp's domain or contract address + +*** + +### factoryAddress? + +> `optional` **factoryAddress**: `string` + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L29) + +Factory address (defaults to M7 Sepolia) + +*** + +### initConfig + +> **initConfig**: `object` + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L34) + +InitConfig for the OAPD account. +Typically lower daily limits than the main account. + +#### approvedAlgIds + +> **approvedAlgIds**: `number`[] + +#### dailyLimit + +> **dailyLimit**: `bigint` + +#### guardians + +> **guardians**: \[`string`, `string`, `string`\] + +#### initialTokenConfigs + +> **initialTokenConfigs**: `object`[] + +#### initialTokens + +> **initialTokens**: `string`[] + +#### minDailyLimit + +> **minDailyLimit**: `bigint` + +*** + +### owner + +> **owner**: `string` + +Defined in: [packages/airaccount/src/server/utils/oapd.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/oapd.ts#L25) + +Account owner address diff --git a/api/@aastar/airaccount/server/interfaces/PasskeyAssertionContext.md b/api/@aastar/airaccount/server/interfaces/PasskeyAssertionContext.md new file mode 100644 index 000000000..12f2b3b08 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/PasskeyAssertionContext.md @@ -0,0 +1,12 @@ +Defined in: [packages/airaccount/src/server/interfaces/signer-adapter.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/signer-adapter.ts#L7) + +Context for passing Passkey assertion data through the signing chain. +Used by KMS-backed signers to authenticate signing operations. + +## Properties + +### assertion + +> **assertion**: [`LegacyPasskeyAssertion`](LegacyPasskeyAssertion.md) + +Defined in: [packages/airaccount/src/server/interfaces/signer-adapter.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/signer-adapter.ts#L8) diff --git a/api/@aastar/airaccount/server/interfaces/PasskeyCeremonySigner.md b/api/@aastar/airaccount/server/interfaces/PasskeyCeremonySigner.md new file mode 100644 index 000000000..bbea74d2b --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/PasskeyCeremonySigner.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L93) + +Pluggable passkey signer. The ceremony helper builds clientDataJSON + +authenticatorData and computes the WebAuthn message +(authenticatorData || SHA-256(clientDataJSON)); this signer turns that message +into an ES256 (ECDSA P-256 over SHA-256) DER signature. + +Browser callers back this with the platform authenticator; server/test callers +use [P256PasskeySigner](../classes/P256PasskeySigner.md). + +## Properties + +### credentialId + +> `readonly` **credentialId**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L95) + +base64url credential id registered with the KMS for this passkey. + +## Methods + +### sign() + +> **sign**(`message`): `Uint8Array` \| `Promise`\<`Uint8Array`\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L101) + +Sign the WebAuthn message (authenticatorData || SHA-256(clientDataJSON)). +MUST return a DER-encoded ES256 signature (ECDSA P-256 with SHA-256 applied +to the message), matching the WebAuthn wire format. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `Uint8Array` | + +#### Returns + +`Uint8Array` \| `Promise`\<`Uint8Array`\> diff --git a/api/@aastar/airaccount/server/interfaces/PaymasterRecord.md b/api/@aastar/airaccount/server/interfaces/PaymasterRecord.md new file mode 100644 index 000000000..fe092c9ea --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/PaymasterRecord.md @@ -0,0 +1,59 @@ +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L59) + +Paymaster configuration record. + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L62) + +*** + +### apiKey? + +> `optional` **apiKey**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L63) + +*** + +### createdAt? + +> `optional` **createdAt**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L66) + +*** + +### endpoint? + +> `optional` **endpoint**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L65) + +*** + +### id? + +> `optional` **id**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L60) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L61) + +*** + +### type + +> **type**: `"pimlico"` \| `"stackup"` \| `"alchemy"` \| `"custom"` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L64) diff --git a/api/@aastar/airaccount/server/interfaces/PendingExit.md b/api/@aastar/airaccount/server/interfaces/PendingExit.md new file mode 100644 index 000000000..1d7e52c14 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/PendingExit.md @@ -0,0 +1,49 @@ +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L58) + +## Properties + +### approvalBitmap + +> **approvalBitmap**: `bigint` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L63) + +*** + +### data + +> **data**: `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L61) + +*** + +### guardians + +> **guardians**: \[`string`, `string`, `string`\] + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L64) + +*** + +### proposedAt + +> **proposedAt**: `bigint` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L62) + +*** + +### target + +> **target**: `string` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L59) + +*** + +### value + +> **value**: `bigint` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L60) diff --git a/api/@aastar/airaccount/server/interfaces/PendingWeightChange.md b/api/@aastar/airaccount/server/interfaces/PendingWeightChange.md new file mode 100644 index 000000000..39f11707c --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/PendingWeightChange.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L79) + +A pending weight-change proposal awaiting guardian approval + timelock. + +## Properties + +### approvalBitmap + +> **approvalBitmap**: `bigint` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L85) + +Bitmap of guardian indices that have approved (bit i set => guardian i approved). + +*** + +### proposed + +> **proposed**: [`WeightConfig`](WeightConfig.md) + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L81) + +The proposed new WeightConfig. + +*** + +### proposedAt + +> **proposedAt**: `bigint` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L83) + +Unix timestamp when the proposal was created; 0 means no active proposal. diff --git a/api/@aastar/airaccount/server/interfaces/QueryAgentReputationParams.md b/api/@aastar/airaccount/server/interfaces/QueryAgentReputationParams.md new file mode 100644 index 000000000..dfa920931 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/QueryAgentReputationParams.md @@ -0,0 +1,43 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L87) + +## Properties + +### agentId + +> **agentId**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L90) + +*** + +### clientAddresses + +> **clientAddresses**: `string`[] + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L91) + +*** + +### reputationRegistry + +> **reputationRegistry**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L89) + +Must be the official ERC-8004 reputation registry for this chain + +*** + +### tag1 + +> **tag1**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L92) + +*** + +### tag2 + +> **tag2**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L93) diff --git a/api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyRequest.md b/api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyRequest.md new file mode 100644 index 000000000..5c176a4ce --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyRequest.md @@ -0,0 +1,21 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L54) + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L55) + +*** + +### webAuthnAssertion? + +> `optional` **webAuthnAssertion**: [`WebAuthnAssertion`](WebAuthnAssertion.md) + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L61) + +One-time WebAuthn assertion gating revocation. The challenge comes from a +generic [KmsManager.beginAuthentication](../classes/KmsManager.md#beginauthentication) ceremony — the caller runs +the ceremony and supplies the resulting assertion here. diff --git a/api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyResponse.md b/api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyResponse.md new file mode 100644 index 000000000..2ded43ba7 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/RevokeP256SessionKeyResponse.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L64) + +## Properties + +### revokedAt + +> **revokedAt**: `number` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L66) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L65) diff --git a/api/@aastar/airaccount/server/interfaces/RunCeremonyOptions.md b/api/@aastar/airaccount/server/interfaces/RunCeremonyOptions.md new file mode 100644 index 000000000..6a4de91db --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/RunCeremonyOptions.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:219](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L219) + +## Properties + +### origin? + +> `optional` **origin**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:222](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L222) + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:221](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L221) + +*** + +### signCount? + +> `optional` **signCount**: `number` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:223](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L223) + +*** + +### signer + +> **signer**: [`PasskeyCeremonySigner`](PasskeyCeremonySigner.md) + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:220](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L220) diff --git a/api/@aastar/airaccount/server/interfaces/ServerConfig.md b/api/@aastar/airaccount/server/interfaces/ServerConfig.md new file mode 100644 index 000000000..0f5f4d2c5 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/ServerConfig.md @@ -0,0 +1,145 @@ +Defined in: [packages/airaccount/src/server/config.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L18) + +Server SDK configuration — replaces NestJS ConfigService. + +## Properties + +### blsDiscoveryTimeout? + +> `optional` **blsDiscoveryTimeout**: `number` + +Defined in: [packages/airaccount/src/server/config.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L39) + +Timeout for BLS node discovery in ms. + +*** + +### blsSeedNodes? + +> `optional` **blsSeedNodes**: `string`[] + +Defined in: [packages/airaccount/src/server/config.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L37) + +BLS signer seed nodes for gossip discovery. + +*** + +### bundlerRpcUrl + +> **bundlerRpcUrl**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L22) + +Bundler RPC URL (e.g. Pimlico, StackUp). + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/airaccount/src/server/config.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L24) + +Chain ID of the target network. + +*** + +### defaultVersion? + +> `optional` **defaultVersion**: `"0.6"` \| `"0.7"` \| `"0.8"` + +Defined in: [packages/airaccount/src/server/config.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L34) + +Default EntryPoint version to use when not specified. + +*** + +### entryPoints + +> **entryPoints**: `object` + +Defined in: [packages/airaccount/src/server/config.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L27) + +EntryPoint configurations — at least one version must be provided. + +#### v06? + +> `optional` **v06**: [`EntryPointVersionConfig`](EntryPointVersionConfig.md) + +#### v07? + +> `optional` **v07**: [`EntryPointVersionConfig`](EntryPointVersionConfig.md) + +#### v08? + +> `optional` **v08**: [`EntryPointVersionConfig`](EntryPointVersionConfig.md) + +*** + +### kmsApiKey? + +> `optional` **kmsApiKey**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L46) + +KMS API key for authenticated requests. + +*** + +### kmsEnabled? + +> `optional` **kmsEnabled**: `boolean` + +Defined in: [packages/airaccount/src/server/config.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L44) + +Whether KMS signing is enabled. + +*** + +### kmsEndpoint? + +> `optional` **kmsEndpoint**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L42) + +KMS endpoint URL (optional, for KMS-based signing). + +*** + +### logger? + +> `optional` **logger**: [`ILogger`](ILogger.md) + +Defined in: [packages/airaccount/src/server/config.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L53) + +Logger (optional, defaults to ConsoleLogger). + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/airaccount/src/server/config.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L20) + +Main network RPC URL. + +*** + +### signer + +> **signer**: [`ISignerAdapter`](ISignerAdapter.md) + +Defined in: [packages/airaccount/src/server/config.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L51) + +Signer adapter (required). + +*** + +### storage + +> **storage**: [`IStorageAdapter`](IStorageAdapter.md) + +Defined in: [packages/airaccount/src/server/config.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L49) + +Storage adapter (required). diff --git a/api/@aastar/airaccount/server/interfaces/SessionInfo.md b/api/@aastar/airaccount/server/interfaces/SessionInfo.md new file mode 100644 index 000000000..02f8bceba --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/SessionInfo.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L51) + +## Properties + +### active + +> **active**: `boolean` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L60) + +*** + +### callTargets + +> **callTargets**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L58) + +*** + +### contractScope + +> **contractScope**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L53) + +*** + +### expiry + +> **expiry**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L52) + +*** + +### revoked + +> **revoked**: `boolean` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L55) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: `string`[] + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L59) + +*** + +### selectorScope + +> **selectorScope**: `string` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L54) + +*** + +### velocityLimit + +> **velocityLimit**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L56) + +*** + +### velocityWindow + +> **velocityWindow**: `number` + +Defined in: [packages/airaccount/src/server/services/session-key-service.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/session-key-service.ts#L57) diff --git a/api/@aastar/airaccount/server/interfaces/SetAgentWalletParams.md b/api/@aastar/airaccount/server/interfaces/SetAgentWalletParams.md new file mode 100644 index 000000000..a14b2e2ac --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/SetAgentWalletParams.md @@ -0,0 +1,37 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L47) + +## Properties + +### agentId + +> **agentId**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L48) + +*** + +### agentRegistry + +> **agentRegistry**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L51) + +AAStar AgentRegistry contract address (SuperPaymaster-facing, NOT the official ERC-8004 registry) + +*** + +### agentWallet + +> **agentWallet**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L49) + +*** + +### agentWalletSig + +> **agentWalletSig**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L53) + +Signature from the agent wallet proving ownership diff --git a/api/@aastar/airaccount/server/interfaces/SignP256UserOpRequest.md b/api/@aastar/airaccount/server/interfaces/SignP256UserOpRequest.md new file mode 100644 index 000000000..0158bb739 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/SignP256UserOpRequest.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L35) + +## Properties + +### accountAddress + +> **accountAddress**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L38) + +*** + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L36) + +*** + +### payload + +> **payload**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L37) diff --git a/api/@aastar/airaccount/server/interfaces/SignP256UserOpResponse.md b/api/@aastar/airaccount/server/interfaces/SignP256UserOpResponse.md new file mode 100644 index 000000000..c58c7cc16 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/SignP256UserOpResponse.md @@ -0,0 +1,36 @@ +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L41) + +## Properties + +### keyId + +> **keyId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L42) + +*** + +### pubKeyX + +> **pubKeyX**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L43) + +*** + +### pubKeyY + +> **pubKeyY**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L44) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-session-service.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-session-service.ts#L49) + +149-byte P256 session-key wire format (hex): +[0x08][account(20)][keyX(32)][keyY(32)][r(32)][s(32)]. diff --git a/api/@aastar/airaccount/server/interfaces/SubmitAgentReputationParams.md b/api/@aastar/airaccount/server/interfaces/SubmitAgentReputationParams.md new file mode 100644 index 000000000..056da24fe --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/SubmitAgentReputationParams.md @@ -0,0 +1,75 @@ +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L74) + +## Properties + +### agentId + +> **agentId**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L77) + +*** + +### endpoint + +> **endpoint**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L82) + +*** + +### feedbackHash + +> **feedbackHash**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L84) + +*** + +### feedbackURI + +> **feedbackURI**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L83) + +*** + +### reputationRegistry + +> **reputationRegistry**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L76) + +Must be the official ERC-8004 reputation registry for this chain + +*** + +### tag1 + +> **tag1**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L80) + +*** + +### tag2 + +> **tag2**: `string` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L81) + +*** + +### value + +> **value**: `bigint` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L78) + +*** + +### valueDecimals + +> **valueDecimals**: `number` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L79) diff --git a/api/@aastar/airaccount/server/interfaces/TokenBalance.md b/api/@aastar/airaccount/server/interfaces/TokenBalance.md new file mode 100644 index 000000000..2a298683b --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/TokenBalance.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/server/services/token-service.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L17) + +## Properties + +### balance + +> **balance**: `string` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L19) + +*** + +### formattedBalance + +> **formattedBalance**: `string` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L20) + +*** + +### token + +> **token**: [`TokenInfo`](TokenInfo.md) + +Defined in: [packages/airaccount/src/server/services/token-service.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L18) diff --git a/api/@aastar/airaccount/server/interfaces/TokenGuardState.md b/api/@aastar/airaccount/server/interfaces/TokenGuardState.md new file mode 100644 index 000000000..8445aca10 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/TokenGuardState.md @@ -0,0 +1,57 @@ +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L39) + +## Properties + +### currentTier + +> **currentTier**: `TierLevel` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L44) + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L42) + +*** + +### remaining + +> **remaining**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L43) + +*** + +### tier1Limit + +> **tier1Limit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L45) + +*** + +### tier2Limit + +> **tier2Limit**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L46) + +*** + +### todaySpent + +> **todaySpent**: `bigint` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L41) + +*** + +### token + +> **token**: `string` + +Defined in: [packages/airaccount/src/server/services/guard-state-reader.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/guard-state-reader.ts#L40) diff --git a/api/@aastar/airaccount/server/interfaces/TokenInfo.md b/api/@aastar/airaccount/server/interfaces/TokenInfo.md new file mode 100644 index 000000000..cc58b186f --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/TokenInfo.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/server/services/token-service.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L10) + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L11) + +*** + +### decimals + +> **decimals**: `number` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L14) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L13) + +*** + +### symbol + +> **symbol**: `string` + +Defined in: [packages/airaccount/src/server/services/token-service.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/token-service.ts#L12) diff --git a/api/@aastar/airaccount/server/interfaces/TransferRecord.md b/api/@aastar/airaccount/server/interfaces/TransferRecord.md new file mode 100644 index 000000000..c0ed16c37 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/TransferRecord.md @@ -0,0 +1,147 @@ +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L35) + +Transfer record stored by the SDK. + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L40) + +*** + +### bundlerUserOpHash? + +> `optional` **bundlerUserOpHash**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L43) + +*** + +### completedAt? + +> `optional` **completedAt**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L52) + +*** + +### createdAt + +> **createdAt**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L50) + +*** + +### data? + +> `optional` **data**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L41) + +*** + +### error? + +> `optional` **error**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L46) + +*** + +### failedAt? + +> `optional` **failedAt**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L53) + +*** + +### from + +> **from**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L38) + +*** + +### id + +> **id**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L36) + +*** + +### nodeIndices + +> **nodeIndices**: `number`[] + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L47) + +*** + +### status + +> **status**: `"pending"` \| `"submitted"` \| `"completed"` \| `"failed"` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L45) + +*** + +### submittedAt? + +> `optional` **submittedAt**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L51) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L39) + +*** + +### tokenAddress? + +> `optional` **tokenAddress**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L48) + +*** + +### tokenSymbol? + +> `optional` **tokenSymbol**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L49) + +*** + +### transactionHash? + +> `optional` **transactionHash**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L44) + +*** + +### userId + +> **userId**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L37) + +*** + +### userOpHash + +> **userOpHash**: `string` + +Defined in: [packages/airaccount/src/server/interfaces/storage-adapter.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/interfaces/storage-adapter.ts#L42) diff --git a/api/@aastar/airaccount/server/interfaces/TransferResult.md b/api/@aastar/airaccount/server/interfaces/TransferResult.md new file mode 100644 index 000000000..b320f21c1 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/TransferResult.md @@ -0,0 +1,65 @@ +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L122) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L130) + +*** + +### from + +> **from**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L128) + +*** + +### message + +> **message**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L127) + +*** + +### status + +> **status**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L126) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L123) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L129) + +*** + +### transferId + +> **transferId**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L124) + +*** + +### userOpHash + +> **userOpHash**: `string` + +Defined in: [packages/airaccount/src/server/services/transfer-manager.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/transfer-manager.ts#L125) diff --git a/api/@aastar/airaccount/server/interfaces/UninstallModuleParams.md b/api/@aastar/airaccount/server/interfaces/UninstallModuleParams.md new file mode 100644 index 000000000..df7594028 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/UninstallModuleParams.md @@ -0,0 +1,53 @@ +Defined in: [packages/airaccount/src/server/services/module-manager.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L43) + +## Properties + +### account + +> **account**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L44) + +*** + +### guardianSig1 + +> **guardianSig1**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L48) + +Always requires 2 guardian sigs for uninstall + +*** + +### guardianSig2 + +> **guardianSig2**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L49) + +*** + +### module + +> **module**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L46) + +*** + +### moduleDeInitData? + +> `optional` **moduleDeInitData**: `string` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L51) + +Passed to module.onUninstall() + +*** + +### moduleTypeId + +> **moduleTypeId**: [`ModuleTypeId`](../type-aliases/ModuleTypeId.md) + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L45) diff --git a/api/@aastar/airaccount/server/interfaces/WebAuthnAssertion.md b/api/@aastar/airaccount/server/interfaces/WebAuthnAssertion.md new file mode 100644 index 000000000..a57fbe582 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/WebAuthnAssertion.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L21) + +## Properties + +### ChallengeId + +> **ChallengeId**: `string` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L24) + +*** + +### Credential + +> **Credential**: `unknown` + +Defined in: [packages/airaccount/src/server/services/kms-signer.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-signer.ts#L25) diff --git a/api/@aastar/airaccount/server/interfaces/WebAuthnAuthenticationCredential.md b/api/@aastar/airaccount/server/interfaces/WebAuthnAuthenticationCredential.md new file mode 100644 index 000000000..436293a09 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/WebAuthnAuthenticationCredential.md @@ -0,0 +1,60 @@ +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L71) + +WebAuthn AuthenticationResponseJSON (the subset the KMS verifies). This is the +value placed in `WebAuthnAssertion.Credential`. + +## Properties + +### clientExtensionResults? + +> `optional` **clientExtensionResults**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L81) + +*** + +### id + +> **id**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L72) + +*** + +### rawId + +> **rawId**: `string` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L73) + +*** + +### response + +> **response**: `object` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L75) + +#### authenticatorData + +> **authenticatorData**: `string` + +#### clientDataJSON + +> **clientDataJSON**: `string` + +#### signature + +> **signature**: `string` + +#### userHandle? + +> `optional` **userHandle**: `string` + +*** + +### type + +> **type**: `"public-key"` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L74) diff --git a/api/@aastar/airaccount/server/interfaces/WeightConfig.md b/api/@aastar/airaccount/server/interfaces/WeightConfig.md new file mode 100644 index 000000000..381d12e27 --- /dev/null +++ b/api/@aastar/airaccount/server/interfaces/WeightConfig.md @@ -0,0 +1,112 @@ +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L55) + +WeightConfig — the weighted multi-signature policy for an AAStarAirAccount (algId 0x07). + +Each signer type / guardian contributes its weight; a transaction is authorized when the +summed weight of present signatures meets the relevant tier threshold. tier1 is the base +(required, non-zero) threshold; tier2/tier3 gate higher-value operations and, when set, +must be monotonically non-decreasing (tier1 <= tier2 <= tier3). + +Field order MUST match the on-chain struct exactly (see AAStarAirAccountV7.json): +passkeyWeight, ecdsaWeight, blsWeight, guardian0Weight, guardian1Weight, guardian2Weight, +_padding, tier1Threshold, tier2Threshold, tier3Threshold. + +## Properties + +### \_padding + +> **\_padding**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L69) + +Reserved padding byte (storage packing); keep 0. + +*** + +### blsWeight + +> **blsWeight**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L61) + +Weight granted by a valid BLS signature. + +*** + +### ecdsaWeight + +> **ecdsaWeight**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L59) + +Weight granted by a valid ECDSA (secp256k1 owner) signature. + +*** + +### guardian0Weight + +> **guardian0Weight**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L63) + +Weight granted by guardian slot 0. + +*** + +### guardian1Weight + +> **guardian1Weight**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L65) + +Weight granted by guardian slot 1. + +*** + +### guardian2Weight + +> **guardian2Weight**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L67) + +Weight granted by guardian slot 2. + +*** + +### passkeyWeight + +> **passkeyWeight**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L57) + +Weight granted by a valid passkey (P256/WebAuthn) signature. + +*** + +### tier1Threshold + +> **tier1Threshold**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L71) + +Base threshold; must be non-zero and strictly greater than every individual weight. + +*** + +### tier2Threshold + +> **tier2Threshold**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L73) + +Tier-2 threshold (0 = disabled); when set must be >= tier1Threshold. + +*** + +### tier3Threshold + +> **tier3Threshold**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L75) + +Tier-3 threshold (0 = disabled); when set requires tier2 set and must be >= tier2Threshold. diff --git a/api/@aastar/airaccount/server/type-aliases/AirAccountVersion.md b/api/@aastar/airaccount/server/type-aliases/AirAccountVersion.md new file mode 100644 index 000000000..ca907bbe2 --- /dev/null +++ b/api/@aastar/airaccount/server/type-aliases/AirAccountVersion.md @@ -0,0 +1,8 @@ +> **AirAccountVersion** = `"M5"` \| `"M7"` \| `"M7r6"` + +Defined in: [packages/airaccount/src/server/config.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/config.ts#L61) + +AirAccount contract version selection. +- "M7" — r4 audit-final (default). Use for all new account creation. +- "M7r6" — r6 deployment (2026-03-29, superseded). Use ONLY to recover existing r6-deployed accounts. +- "M5" — legacy 6-field InitConfig deployment. diff --git a/api/@aastar/airaccount/server/type-aliases/KmsPaymentAuth.md b/api/@aastar/airaccount/server/type-aliases/KmsPaymentAuth.md new file mode 100644 index 000000000..a489b2b42 --- /dev/null +++ b/api/@aastar/airaccount/server/type-aliases/KmsPaymentAuth.md @@ -0,0 +1,3 @@ +> **KmsPaymentAuth** = \{ `jwt`: `string`; \} \| \{ `webAuthnAssertion`: [`WebAuthnAssertion`](../interfaces/WebAuthnAssertion.md); \} + +Defined in: [packages/airaccount/src/server/services/kms-payment-signer.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-payment-signer.ts#L11) diff --git a/api/@aastar/airaccount/server/type-aliases/L2Type.md b/api/@aastar/airaccount/server/type-aliases/L2Type.md new file mode 100644 index 000000000..053b69ffe --- /dev/null +++ b/api/@aastar/airaccount/server/type-aliases/L2Type.md @@ -0,0 +1,3 @@ +> **L2Type** = *typeof* [`L2_TYPE`](../variables/L2_TYPE.md)\[keyof *typeof* [`L2_TYPE`](../variables/L2_TYPE.md)\] + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L56) diff --git a/api/@aastar/airaccount/server/type-aliases/ModuleTypeId.md b/api/@aastar/airaccount/server/type-aliases/ModuleTypeId.md new file mode 100644 index 000000000..3d0d02692 --- /dev/null +++ b/api/@aastar/airaccount/server/type-aliases/ModuleTypeId.md @@ -0,0 +1,3 @@ +> **ModuleTypeId** = `1` \| `2` \| `3` \| `4` + +Defined in: [packages/airaccount/src/server/services/module-manager.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/module-manager.ts#L19) diff --git a/api/@aastar/airaccount/server/variables/ACCOUNT_ABI.md b/api/@aastar/airaccount/server/variables/ACCOUNT_ABI.md new file mode 100644 index 000000000..9dd6a304a --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ACCOUNT_ABI.md @@ -0,0 +1,3 @@ +> `const` **ACCOUNT\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L65) diff --git a/api/@aastar/airaccount/server/variables/AGENT_SESSION_KEY_VALIDATOR_ABI.md b/api/@aastar/airaccount/server/variables/AGENT_SESSION_KEY_VALIDATOR_ABI.md new file mode 100644 index 000000000..09d0e0cc1 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AGENT_SESSION_KEY_VALIDATOR_ABI.md @@ -0,0 +1,3 @@ +> `const` **AGENT\_SESSION\_KEY\_VALIDATOR\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:264](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L264) diff --git a/api/@aastar/airaccount/server/variables/AIRACCOUNT_ABI.md b/api/@aastar/airaccount/server/variables/AIRACCOUNT_ABI.md new file mode 100644 index 000000000..e68e3c1e3 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AIRACCOUNT_ABI.md @@ -0,0 +1,3 @@ +> `const` **AIRACCOUNT\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L138) diff --git a/api/@aastar/airaccount/server/variables/AIRACCOUNT_ADDRESSES.md b/api/@aastar/airaccount/server/variables/AIRACCOUNT_ADDRESSES.md new file mode 100644 index 000000000..7a5e018de --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AIRACCOUNT_ADDRESSES.md @@ -0,0 +1,161 @@ +> `const` **AIRACCOUNT\_ADDRESSES**: `object` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L75) + +## Type Declaration + +### sepolia + +> **sepolia**: `object` + +#### sepolia.accountImpl + +> **accountImpl**: `"0x7fe62d512f0b8238DE6Ff17175DcE40eA312bBF2"` = `CORE_SEPOLIA.airAccountV7Impl` + +#### sepolia.accountImplM7r4 + +> **accountImplM7r4**: `string` = `"0xA674D308ce22230B70412b20Ee5a66fC6B24F49c"` + +##### Deprecated + +#### sepolia.accountImplM7r6 + +> **accountImplM7r6**: `string` = `"0x2F1B4EB63143D338bE78d0AF878B806f075080c1"` + +##### Deprecated + +Use [accountImpl](#sepolia) (r4 audit-final). + +#### sepolia.agentRegistry + +> **agentRegistry**: `"0x3895b3E6fEf4e121E6289dC7881A0eEd5283C652"` = `CORE_SEPOLIA.agentRegistry` + +#### sepolia.agentSessionKeyValidatorM7r4 + +> **agentSessionKeyValidatorM7r4**: `string` = `"0x1F06961e133217801F92e1CF552187F594a32873"` + +##### Deprecated + +#### sepolia.agentSessionKeyValidatorM7r6 + +> **agentSessionKeyValidatorM7r6**: `string` = `"0xa3e52db4b6e0a9d7cd5dd1414a90eedcf950e029"` + +##### Deprecated + +Use agentSessionKeyValidator (r4 audit-final). + +#### sepolia.airAccountDelegate + +> **airAccountDelegate**: `"0xA8D7f70c9D36bC4a4eb14F0dCEE19053FCB3309f"` = `CORE_SEPOLIA.airAccountDelegate` + +#### sepolia.airAccountExtension + +> **airAccountExtension**: `"0xD61C0F3DE6D98070E9986743d35A56d56855A249"` = `CORE_SEPOLIA.airAccountExtension` + +#### sepolia.blsAggregator + +> **blsAggregator**: `"0x77f7bf95B8602b7851f392F412257539242947e0"` = `CORE_SEPOLIA.aaStarBLSAggregator` + +#### sepolia.blsAlgorithm + +> **blsAlgorithm**: `"0x68c381Ad3A2e3380F22840008027E9Ec2783F43A"` = `CORE_SEPOLIA.aaStarBLSAlgorithm` + +#### sepolia.calldataParserRegistry + +> **calldataParserRegistry**: `"0xb8Af1C039dF88F6bD9fE36Ca683492a3c09e7D17"` = `CORE_SEPOLIA.calldataParserRegistry` + +#### sepolia.compositeValidatorM7r4 + +> **compositeValidatorM7r4**: `string` = `"0xB65569950C48AA56dbe876915ca3605fD6FF2980"` + +##### Deprecated + +#### sepolia.compositeValidatorM7r6 + +> **compositeValidatorM7r6**: `string` = `"0x4135c539fec5e200fe9762b721f6829b2315cbe1"` + +##### Deprecated + +Use compositeValidator (r4 audit-final). + +#### sepolia.factory + +> **factory**: `"0x52c5190E7308Ea9B149157FF016cC99B6C6bf984"` = `CORE_SEPOLIA.airAccountFactoryV7` + +#### sepolia.factoryM4 + +> **factoryM4**: `string` = `"0x914db0a849f55e68a726c72fd02b7114b1176d88"` + +#### sepolia.factoryM5 + +> **factoryM5**: `string` = `"0xd72a236d84be6c388a8bc7deb64afd54704ae385"` + +#### sepolia.factoryM7 + +> **factoryM7**: `"0x52c5190E7308Ea9B149157FF016cC99B6C6bf984"` = `CORE_SEPOLIA.airAccountFactoryV7` + +#### sepolia.factoryM7r4 + +> **factoryM7r4**: `string` = `"0x61bBAf9E1b8Fd78fF874776cFa50497dB9d43C3F"` + +##### Deprecated + +Use factory (beta.4) for new accounts. + +#### sepolia.factoryM7r5Prev + +> **factoryM7r5Prev**: `string` = `"0xa0007c5dB27548D8c1582773856dB1D123107383"` + +##### Deprecated + +defaultCommunityGuardian was address(0); superseded by r6 and r4. Do not use for new accounts. + +#### sepolia.factoryM7r6 + +> **factoryM7r6**: `string` = `"0x42f82d77f9cf940686b6a64a369245cb563e0e85"` + +##### Deprecated + +Use [factory](#sepolia) (r4 audit-final) for new accounts. + +#### sepolia.forceExitModule + +> **forceExitModule**: `"0xd882a16Ea37Be463D1885EF4a397Dbbf157dC211"` = `CORE_SEPOLIA.forceExitModule` + +#### sepolia.sessionKeyValidator + +> **sessionKeyValidator**: `"0x70de2e36004d6Ddc24DEB80e1Ef76c03EdC0c2AE"` = `CORE_SEPOLIA.sessionKeyValidator` + +#### sepolia.superPaymaster + +> **superPaymaster**: `"0x030025f40d509b1a99547bAEb3795bD27F7182b7"` = `CORE_SEPOLIA.superPaymaster` + +#### sepolia.tierGuardHookM7r4 + +> **tierGuardHookM7r4**: `string` = `"0x67f878295cFF7451CBD2A775C4490607AF1b07d7"` + +##### Deprecated + +#### sepolia.tierGuardHookM7r6 + +> **tierGuardHookM7r6**: `string` = `"0x73572e9e6138fd53465ee243e2fb4842cf86a787"` + +##### Deprecated + +Use tierGuardHook (r4 audit-final). + +#### sepolia.uniswapV3Parser + +> **uniswapV3Parser**: `string` = `"0x5671810ac8aa1857397870e60232579cfc519515"` + +#### sepolia.validatorRouter + +> **validatorRouter**: `"0xC20A986Bcd5bF5Cc2fE5fFde6b155B8419E0389e"` = `CORE_SEPOLIA.aaStarValidator` + +#### sepolia.validatorRouterM7r4 + +> **validatorRouterM7r4**: `string` = `"0x730a162Ce3202b94cC5B74181B75b11eBB3045B1"` + +##### Deprecated + +Use validatorRouter. diff --git a/api/@aastar/airaccount/server/variables/AIRACCOUNT_FACTORY_ABI.md b/api/@aastar/airaccount/server/variables/AIRACCOUNT_FACTORY_ABI.md new file mode 100644 index 000000000..c13935d31 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AIRACCOUNT_FACTORY_ABI.md @@ -0,0 +1,3 @@ +> `const` **AIRACCOUNT\_FACTORY\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:211](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L211) diff --git a/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI.md b/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI.md new file mode 100644 index 000000000..76b829ecf --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI.md @@ -0,0 +1,3 @@ +> `const` **AIR\_ACCOUNT\_COMPOSITE\_VALIDATOR\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:307](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L307) diff --git a/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ABI.md b/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ABI.md new file mode 100644 index 000000000..79a179991 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ABI.md @@ -0,0 +1,3 @@ +> `const` **AIR\_ACCOUNT\_DELEGATE\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:404](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L404) diff --git a/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ADDRESS.md b/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ADDRESS.md new file mode 100644 index 000000000..d5bc33f8b --- /dev/null +++ b/api/@aastar/airaccount/server/variables/AIR_ACCOUNT_DELEGATE_ADDRESS.md @@ -0,0 +1,3 @@ +> `const` **AIR\_ACCOUNT\_DELEGATE\_ADDRESS**: `"0x8603AAF6C3f07fdae810B323c95a198D796EC52E"` = `"0x8603AAF6C3f07fdae810B323c95a198D796EC52E"` + +Defined in: [packages/airaccount/src/server/services/eip7702-delegate-service.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/eip7702-delegate-service.ts#L36) diff --git a/api/@aastar/airaccount/server/variables/ALG_ID.md b/api/@aastar/airaccount/server/variables/ALG_ID.md new file mode 100644 index 000000000..db854cb00 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ALG_ID.md @@ -0,0 +1,41 @@ +> `const` **ALG\_ID**: `object` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:348](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L348) + +## Type Declaration + +### AGENT\_SESSION\_KEY + +> `readonly` **AGENT\_SESSION\_KEY**: `9` = `0x09` + +### BLS + +> `readonly` **BLS**: `1` = `0x01` + +### COMBINED\_T1 + +> `readonly` **COMBINED\_T1**: `6` = `0x06` + +### CUMULATIVE\_T2 + +> `readonly` **CUMULATIVE\_T2**: `4` = `0x04` + +### CUMULATIVE\_T3 + +> `readonly` **CUMULATIVE\_T3**: `5` = `0x05` + +### ECDSA + +> `readonly` **ECDSA**: `2` = `0x02` + +### P256 + +> `readonly` **P256**: `3` = `0x03` + +### SESSION\_KEY + +> `readonly` **SESSION\_KEY**: `8` = `0x08` + +### WEIGHTED + +> `readonly` **WEIGHTED**: `7` = `0x07` diff --git a/api/@aastar/airaccount/server/variables/CALLDATA_PARSER_REGISTRY_ABI.md b/api/@aastar/airaccount/server/variables/CALLDATA_PARSER_REGISTRY_ABI.md new file mode 100644 index 000000000..9eec037ae --- /dev/null +++ b/api/@aastar/airaccount/server/variables/CALLDATA_PARSER_REGISTRY_ABI.md @@ -0,0 +1,3 @@ +> `const` **CALLDATA\_PARSER\_REGISTRY\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:393](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L393) diff --git a/api/@aastar/airaccount/server/variables/DEFAULT_CREDENTIAL_ID.md b/api/@aastar/airaccount/server/variables/DEFAULT_CREDENTIAL_ID.md new file mode 100644 index 000000000..5d3c7cbdd --- /dev/null +++ b/api/@aastar/airaccount/server/variables/DEFAULT_CREDENTIAL_ID.md @@ -0,0 +1,7 @@ +> `const` **DEFAULT\_CREDENTIAL\_ID**: `"dGVzdC1jcmVkZW50aWFs"` = `"dGVzdC1jcmVkZW50aWFs"` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L41) + +Placeholder credential id (base64url of "test-credential") matching the +reference ceremony fixtures. Production callers SHOULD pass the credential id +returned by CompleteRegistration for the registered passkey. diff --git a/api/@aastar/airaccount/server/variables/DEFAULT_KMS_ENDPOINT.md b/api/@aastar/airaccount/server/variables/DEFAULT_KMS_ENDPOINT.md new file mode 100644 index 000000000..27a33c6d2 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/DEFAULT_KMS_ENDPOINT.md @@ -0,0 +1,6 @@ +> `const` **DEFAULT\_KMS\_ENDPOINT**: `"https://kms.aastar.io"` = `"https://kms.aastar.io"` + +Defined in: [packages/airaccount/src/server/services/kms-http-client.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/kms-http-client.ts#L8) + +Canonical production KMS endpoint (IMX93 TEE behind Cloudflare Tunnel). +v0.20.0 (Beta2) — see AirAccount/kms/CHANGELOG.md. diff --git a/api/@aastar/airaccount/server/variables/DEFAULT_ORIGIN.md b/api/@aastar/airaccount/server/variables/DEFAULT_ORIGIN.md new file mode 100644 index 000000000..da4462a74 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/DEFAULT_ORIGIN.md @@ -0,0 +1,5 @@ +> `const` **DEFAULT\_ORIGIN**: `"https://aastar.io"` = `"https://aastar.io"` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L34) + +Origin embedded in clientDataJSON — must be the RP origin the TA expects. diff --git a/api/@aastar/airaccount/server/variables/DEFAULT_RP_ID.md b/api/@aastar/airaccount/server/variables/DEFAULT_RP_ID.md new file mode 100644 index 000000000..8918e8774 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/DEFAULT_RP_ID.md @@ -0,0 +1,7 @@ +> `const` **DEFAULT\_RP\_ID**: `"aastar.io"` = `"aastar.io"` + +Defined in: [packages/airaccount/src/server/services/webauthn-ceremony.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/webauthn-ceremony.ts#L31) + +RP id the TA verifies against. The TA hardcodes +`EXPECTED_RP_ID_HASH = SHA-256("aastar.io")` (AirAccount PR#44 / Issue #39); +any other rpId makes the TA reject the assertion with "rpId hash mismatch". diff --git a/api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V6.md b/api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V6.md new file mode 100644 index 000000000..04c4e364c --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V6.md @@ -0,0 +1,3 @@ +> `const` **ENTRYPOINT\_ABI\_V6**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L41) diff --git a/api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V7_V8.md b/api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V7_V8.md new file mode 100644 index 000000000..5bb9f8ca0 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ENTRYPOINT_ABI_V7_V8.md @@ -0,0 +1,3 @@ +> `const` **ENTRYPOINT\_ABI\_V7\_V8**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L48) diff --git a/api/@aastar/airaccount/server/variables/ENTRYPOINT_ADDRESSES.md b/api/@aastar/airaccount/server/variables/ENTRYPOINT_ADDRESSES.md new file mode 100644 index 000000000..4764e37ee --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ENTRYPOINT_ADDRESSES.md @@ -0,0 +1,55 @@ +> `const` **ENTRYPOINT\_ADDRESSES**: `object` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L23) + +Default EntryPoint addresses (same on Sepolia, Mainnet, and OP Mainnet). + +## Type Declaration + +#### 0.6 + +> **0.6**: `object` + +#### 0.6.mainnet + +> **mainnet**: `string` = `"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"` + +#### 0.6.optimism + +> **optimism**: `string` = `"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"` + +#### 0.6.sepolia + +> **sepolia**: `string` = `"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"` + +#### 0.7 + +> **0.7**: `object` + +#### 0.7.mainnet + +> **mainnet**: `string` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 0.7.optimism + +> **optimism**: `string` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 0.7.sepolia + +> **sepolia**: `string` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 0.8 + +> **0.8**: `object` + +#### 0.8.mainnet + +> **mainnet**: `string` = `"0x0576a174D229E3cFA37253523E645A78A0C91B57"` + +#### 0.8.optimism + +> **optimism**: `string` = `"0x0576a174D229E3cFA37253523E645A78A0C91B57"` + +#### 0.8.sepolia + +> **sepolia**: `string` = `"0x0576a174D229E3cFA37253523E645A78A0C91B57"` diff --git a/api/@aastar/airaccount/server/variables/ERC20_ABI.md b/api/@aastar/airaccount/server/variables/ERC20_ABI.md new file mode 100644 index 000000000..8ee40adfa --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ERC20_ABI.md @@ -0,0 +1,3 @@ +> `const` **ERC20\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:249](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L249) diff --git a/api/@aastar/airaccount/server/variables/ERC8004_ADDRESSES.md b/api/@aastar/airaccount/server/variables/ERC8004_ADDRESSES.md new file mode 100644 index 000000000..f1758b0f2 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/ERC8004_ADDRESSES.md @@ -0,0 +1,37 @@ +> `const` **ERC8004\_ADDRESSES**: `object` + +Defined in: [packages/airaccount/src/server/services/erc8004-service.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/erc8004-service.ts#L22) + +## Type Declaration + +### mainnet + +> `readonly` **mainnet**: `object` + +#### mainnet.identityRegistry + +> `readonly` **identityRegistry**: `"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"` = `"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"` + +#### mainnet.reputationRegistry + +> `readonly` **reputationRegistry**: `"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63"` = `"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63"` + +#### mainnet.validationRegistry + +> `readonly` **validationRegistry**: `"0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58"` = `"0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58"` + +### testnet + +> `readonly` **testnet**: `object` + +#### testnet.identityRegistry + +> `readonly` **identityRegistry**: `"0x8004A818BFB912233c491871b3d84c89A494BD9e"` = `"0x8004A818BFB912233c491871b3d84c89A494BD9e"` + +#### testnet.reputationRegistry + +> `readonly` **reputationRegistry**: `"0x8004B663056A597Dffe9eCcC1965A193B7388713"` = `"0x8004B663056A597Dffe9eCcC1965A193B7388713"` + +#### testnet.validationRegistry + +> `readonly` **validationRegistry**: `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"` = `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"` diff --git a/api/@aastar/airaccount/server/variables/EXECUTE_BATCH_SELECTOR.md b/api/@aastar/airaccount/server/variables/EXECUTE_BATCH_SELECTOR.md new file mode 100644 index 000000000..41cedf681 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/EXECUTE_BATCH_SELECTOR.md @@ -0,0 +1,5 @@ +> `const` **EXECUTE\_BATCH\_SELECTOR**: `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/utils/execute-user-op.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/execute-user-op.ts#L22) + +4-byte selector of `executeBatch(address[],uint256[],bytes[])`. diff --git a/api/@aastar/airaccount/server/variables/EXECUTE_SELECTOR.md b/api/@aastar/airaccount/server/variables/EXECUTE_SELECTOR.md new file mode 100644 index 000000000..ecfd77585 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/EXECUTE_SELECTOR.md @@ -0,0 +1,5 @@ +> `const` **EXECUTE\_SELECTOR**: `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/utils/execute-user-op.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/execute-user-op.ts#L19) + +4-byte selector of `execute(address,uint256,bytes)`. diff --git a/api/@aastar/airaccount/server/variables/EXECUTE_USER_OP_SELECTOR.md b/api/@aastar/airaccount/server/variables/EXECUTE_USER_OP_SELECTOR.md new file mode 100644 index 000000000..559cd4051 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/EXECUTE_USER_OP_SELECTOR.md @@ -0,0 +1,5 @@ +> `const` **EXECUTE\_USER\_OP\_SELECTOR**: `` `0x${string}` `` + +Defined in: [packages/airaccount/src/server/utils/execute-user-op.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/utils/execute-user-op.ts#L14) + +4-byte selector of `executeUserOp((PackedUserOperation),bytes32)`. diff --git a/api/@aastar/airaccount/server/variables/FACTORY_ABI_V6.md b/api/@aastar/airaccount/server/variables/FACTORY_ABI_V6.md new file mode 100644 index 000000000..dc6867363 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/FACTORY_ABI_V6.md @@ -0,0 +1,3 @@ +> `const` **FACTORY\_ABI\_V6**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L55) diff --git a/api/@aastar/airaccount/server/variables/FACTORY_ABI_V7_V8.md b/api/@aastar/airaccount/server/variables/FACTORY_ABI_V7_V8.md new file mode 100644 index 000000000..f8f31ee14 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/FACTORY_ABI_V7_V8.md @@ -0,0 +1,3 @@ +> `const` **FACTORY\_ABI\_V7\_V8**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L60) diff --git a/api/@aastar/airaccount/server/variables/FORCE_EXIT_MODULE_ABI.md b/api/@aastar/airaccount/server/variables/FORCE_EXIT_MODULE_ABI.md new file mode 100644 index 000000000..4af1b3982 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/FORCE_EXIT_MODULE_ABI.md @@ -0,0 +1,3 @@ +> `const` **FORCE\_EXIT\_MODULE\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:319](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L319) diff --git a/api/@aastar/airaccount/server/variables/GLOBAL_GUARD_ABI.md b/api/@aastar/airaccount/server/variables/GLOBAL_GUARD_ABI.md new file mode 100644 index 000000000..41f389038 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/GLOBAL_GUARD_ABI.md @@ -0,0 +1,3 @@ +> `const` **GLOBAL\_GUARD\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:240](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L240) diff --git a/api/@aastar/airaccount/server/variables/L2_TYPE.md b/api/@aastar/airaccount/server/variables/L2_TYPE.md new file mode 100644 index 000000000..6c054ecfe --- /dev/null +++ b/api/@aastar/airaccount/server/variables/L2_TYPE.md @@ -0,0 +1,13 @@ +> `const` **L2\_TYPE**: `object` + +Defined in: [packages/airaccount/src/server/services/force-exit-service.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/force-exit-service.ts#L51) + +## Type Declaration + +### ARBITRUM + +> `readonly` **ARBITRUM**: `2` = `2` + +### OPTIMISM + +> `readonly` **OPTIMISM**: `1` = `1` diff --git a/api/@aastar/airaccount/server/variables/MAX_GUARDIANS.md b/api/@aastar/airaccount/server/variables/MAX_GUARDIANS.md new file mode 100644 index 000000000..a2187b9b8 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/MAX_GUARDIANS.md @@ -0,0 +1,6 @@ +> `const` **MAX\_GUARDIANS**: `3` = `3` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L36) + +MAX_GUARDIANS — the account stores at most 3 guardians (packed slots 12-14). +Source: `AAStarAirAccountBase.addGuardian` (`_guardianCount >= 3` reverts). diff --git a/api/@aastar/airaccount/server/variables/MODULE_TYPE.md b/api/@aastar/airaccount/server/variables/MODULE_TYPE.md new file mode 100644 index 000000000..87d728eae --- /dev/null +++ b/api/@aastar/airaccount/server/variables/MODULE_TYPE.md @@ -0,0 +1,21 @@ +> `const` **MODULE\_TYPE**: `object` + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:340](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L340) + +## Type Declaration + +### EXECUTOR + +> `readonly` **EXECUTOR**: `2` = `2` + +### FALLBACK + +> `readonly` **FALLBACK**: `3` = `3` + +### HOOK + +> `readonly` **HOOK**: `4` = `4` + +### VALIDATOR + +> `readonly` **VALIDATOR**: `1` = `1` diff --git a/api/@aastar/airaccount/server/variables/RECOVERY_THRESHOLD.md b/api/@aastar/airaccount/server/variables/RECOVERY_THRESHOLD.md new file mode 100644 index 000000000..7c906bce9 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/RECOVERY_THRESHOLD.md @@ -0,0 +1,9 @@ +> `const` **RECOVERY\_THRESHOLD**: `2` = `2` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L30) + +RECOVERY_THRESHOLD — number of distinct guardian approvals required to recover +(or to cancel a recovery). The contract hard-codes `RECOVERY_THRESHOLD = 2` +against a maximum of 3 guardians, i.e. a 2-of-3 social-recovery scheme. + +Source of truth: `AAStarAirAccountBase.RECOVERY_THRESHOLD` (internal constant). diff --git a/api/@aastar/airaccount/server/variables/RECOVERY_TIMELOCK_SECONDS.md b/api/@aastar/airaccount/server/variables/RECOVERY_TIMELOCK_SECONDS.md new file mode 100644 index 000000000..7772c7a34 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/RECOVERY_TIMELOCK_SECONDS.md @@ -0,0 +1,12 @@ +> `const` **RECOVERY\_TIMELOCK\_SECONDS**: `bigint` + +Defined in: [packages/airaccount/src/server/services/recovery-service.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/recovery-service.ts#L48) + +RECOVERY_TIMELOCK_SECONDS — delay between `proposeRecovery` and the earliest +`executeRecovery`. The contract hard-codes `RECOVERY_TIMELOCK = 2 days` +(172800 seconds). + +NOTE: the prose in `docs/abi/capabilities.md` says "72h"; the deployed +contract uses 2 days (48h). The on-chain constant is authoritative. + +Source of truth: `AAStarAirAccountBase.RECOVERY_TIMELOCK` (internal constant). diff --git a/api/@aastar/airaccount/server/variables/SESSION_KEY_VALIDATOR_ABI.md b/api/@aastar/airaccount/server/variables/SESSION_KEY_VALIDATOR_ABI.md new file mode 100644 index 000000000..eb7692f4f --- /dev/null +++ b/api/@aastar/airaccount/server/variables/SESSION_KEY_VALIDATOR_ABI.md @@ -0,0 +1,3 @@ +> `const` **SESSION\_KEY\_VALIDATOR\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:364](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L364) diff --git a/api/@aastar/airaccount/server/variables/TIER_GUARD_HOOK_ABI.md b/api/@aastar/airaccount/server/variables/TIER_GUARD_HOOK_ABI.md new file mode 100644 index 000000000..c1f0a4922 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/TIER_GUARD_HOOK_ABI.md @@ -0,0 +1,3 @@ +> `const` **TIER\_GUARD\_HOOK\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:291](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L291) diff --git a/api/@aastar/airaccount/server/variables/VALIDATOR_ABI.md b/api/@aastar/airaccount/server/variables/VALIDATOR_ABI.md new file mode 100644 index 000000000..be1fb45e3 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/VALIDATOR_ABI.md @@ -0,0 +1,3 @@ +> `const` **VALIDATOR\_ABI**: `string`[] + +Defined in: [packages/airaccount/src/server/constants/entrypoint.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/constants/entrypoint.ts#L69) diff --git a/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_EXPIRY_SECONDS.md b/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_EXPIRY_SECONDS.md new file mode 100644 index 000000000..9aef7f49d --- /dev/null +++ b/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_EXPIRY_SECONDS.md @@ -0,0 +1,5 @@ +> `const` **WEIGHT\_CHANGE\_EXPIRY\_SECONDS**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L41) + +A proposal expires this long after it is proposed; approvals/execution after expiry revert (WEIGHT_CHANGE_EXPIRY = 30 days). diff --git a/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_THRESHOLD.md b/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_THRESHOLD.md new file mode 100644 index 000000000..4f0d62c15 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_THRESHOLD.md @@ -0,0 +1,5 @@ +> `const` **WEIGHT\_CHANGE\_THRESHOLD**: `2` = `2` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L39) + +Guardian approvals required to execute a pending weight change (WEIGHT_CHANGE_THRESHOLD = 2-of-3). diff --git a/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_TIMELOCK_SECONDS.md b/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_TIMELOCK_SECONDS.md new file mode 100644 index 000000000..42677b7d4 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/WEIGHT_CHANGE_TIMELOCK_SECONDS.md @@ -0,0 +1,5 @@ +> `const` **WEIGHT\_CHANGE\_TIMELOCK\_SECONDS**: `number` + +Defined in: [packages/airaccount/src/server/services/weighted-signature-service.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/services/weighted-signature-service.ts#L37) + +Timelock that must elapse after a proposal before executeWeightChange() succeeds (WEIGHT_CHANGE_TIMELOCK = 2 days). diff --git a/api/@aastar/airaccount/server/variables/YAAAServerClient.md b/api/@aastar/airaccount/server/variables/YAAAServerClient.md new file mode 100644 index 000000000..6294c3b14 --- /dev/null +++ b/api/@aastar/airaccount/server/variables/YAAAServerClient.md @@ -0,0 +1,8 @@ +> `const` **YAAAServerClient**: *typeof* [`AirAccountServerClient`](../classes/AirAccountServerClient.md) = `AirAccountServerClient` + +Defined in: [packages/airaccount/src/server/server-client.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/server/server-client.ts#L83) + +## Deprecated + +Renamed to [AirAccountServerClient](../classes/AirAccountServerClient.md). This alias is kept for +backward compatibility and will be removed in a future major version. diff --git a/api/@aastar/airaccount/type-aliases/AlgId.md b/api/@aastar/airaccount/type-aliases/AlgId.md new file mode 100644 index 000000000..b4fd66c4c --- /dev/null +++ b/api/@aastar/airaccount/type-aliases/AlgId.md @@ -0,0 +1,3 @@ +> **AlgId** = *typeof* [`ALG_BLS`](../variables/ALG_BLS.md) \| *typeof* [`ALG_ECDSA`](../variables/ALG_ECDSA.md) \| *typeof* [`ALG_P256`](../variables/ALG_P256.md) \| *typeof* [`ALG_CUMULATIVE_T2`](../variables/ALG_CUMULATIVE_T2.md) \| *typeof* [`ALG_CUMULATIVE_T3`](../variables/ALG_CUMULATIVE_T3.md) + +Defined in: [packages/airaccount/src/core/tier/types.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L9) diff --git a/api/@aastar/airaccount/type-aliases/TierLevel.md b/api/@aastar/airaccount/type-aliases/TierLevel.md new file mode 100644 index 000000000..caae47623 --- /dev/null +++ b/api/@aastar/airaccount/type-aliases/TierLevel.md @@ -0,0 +1,3 @@ +> **TierLevel** = `1` \| `2` \| `3` + +Defined in: [packages/airaccount/src/core/tier/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L18) diff --git a/api/@aastar/airaccount/type-aliases/YAAAConfig.md b/api/@aastar/airaccount/type-aliases/YAAAConfig.md new file mode 100644 index 000000000..35e9da496 --- /dev/null +++ b/api/@aastar/airaccount/type-aliases/YAAAConfig.md @@ -0,0 +1,8 @@ +> **YAAAConfig** = [`AirAccountConfig`](../interfaces/AirAccountConfig.md) + +Defined in: [packages/airaccount/src/client.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L48) + +## Deprecated + +Renamed to [AirAccountConfig](../interfaces/AirAccountConfig.md). This alias is kept for +backward compatibility and will be removed in a future major version. diff --git a/api/@aastar/airaccount/variables/ALG_BLS.md b/api/@aastar/airaccount/variables/ALG_BLS.md new file mode 100644 index 000000000..8bfb445c8 --- /dev/null +++ b/api/@aastar/airaccount/variables/ALG_BLS.md @@ -0,0 +1,3 @@ +> `const` **ALG\_BLS**: `1` = `0x01` + +Defined in: [packages/airaccount/src/core/tier/types.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L3) diff --git a/api/@aastar/airaccount/variables/ALG_CUMULATIVE_T2.md b/api/@aastar/airaccount/variables/ALG_CUMULATIVE_T2.md new file mode 100644 index 000000000..c3d012bc5 --- /dev/null +++ b/api/@aastar/airaccount/variables/ALG_CUMULATIVE_T2.md @@ -0,0 +1,3 @@ +> `const` **ALG\_CUMULATIVE\_T2**: `4` = `0x04` + +Defined in: [packages/airaccount/src/core/tier/types.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L6) diff --git a/api/@aastar/airaccount/variables/ALG_CUMULATIVE_T3.md b/api/@aastar/airaccount/variables/ALG_CUMULATIVE_T3.md new file mode 100644 index 000000000..1d748d91f --- /dev/null +++ b/api/@aastar/airaccount/variables/ALG_CUMULATIVE_T3.md @@ -0,0 +1,3 @@ +> `const` **ALG\_CUMULATIVE\_T3**: `5` = `0x05` + +Defined in: [packages/airaccount/src/core/tier/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L7) diff --git a/api/@aastar/airaccount/variables/ALG_ECDSA.md b/api/@aastar/airaccount/variables/ALG_ECDSA.md new file mode 100644 index 000000000..15cc94d6a --- /dev/null +++ b/api/@aastar/airaccount/variables/ALG_ECDSA.md @@ -0,0 +1,3 @@ +> `const` **ALG\_ECDSA**: `2` = `0x02` + +Defined in: [packages/airaccount/src/core/tier/types.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L4) diff --git a/api/@aastar/airaccount/variables/ALG_P256.md b/api/@aastar/airaccount/variables/ALG_P256.md new file mode 100644 index 000000000..791b4a910 --- /dev/null +++ b/api/@aastar/airaccount/variables/ALG_P256.md @@ -0,0 +1,3 @@ +> `const` **ALG\_P256**: `3` = `0x03` + +Defined in: [packages/airaccount/src/core/tier/types.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L5) diff --git a/api/@aastar/airaccount/variables/DEFAULT_PASSKEY_ROUTES.md b/api/@aastar/airaccount/variables/DEFAULT_PASSKEY_ROUTES.md new file mode 100644 index 000000000..392388865 --- /dev/null +++ b/api/@aastar/airaccount/variables/DEFAULT_PASSKEY_ROUTES.md @@ -0,0 +1,5 @@ +> `const` **DEFAULT\_PASSKEY\_ROUTES**: [`PasskeyRoutes`](../interfaces/PasskeyRoutes.md) + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L41) + +Default passkey routes — the standardized `@aastar/passkey-server` contract. diff --git a/api/@aastar/airaccount/variables/YAAAClient.md b/api/@aastar/airaccount/variables/YAAAClient.md new file mode 100644 index 000000000..8ad2efcb1 --- /dev/null +++ b/api/@aastar/airaccount/variables/YAAAClient.md @@ -0,0 +1,8 @@ +> `const` **YAAAClient**: *typeof* [`AirAccountClient`](../classes/AirAccountClient.md) = `AirAccountClient` + +Defined in: [packages/airaccount/src/client.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L54) + +## Deprecated + +Renamed to [AirAccountClient](../classes/AirAccountClient.md). This alias is kept for +backward compatibility and will be removed in a future major version. diff --git a/api/@aastar/analytics.md b/api/@aastar/analytics.md deleted file mode 100644 index 8ba9794ef..000000000 --- a/api/@aastar/analytics.md +++ /dev/null @@ -1,440 +0,0 @@ -# Analytics Package (AAStar Gas Analytics & Experimentation) - -> **Status**: Active | **Version**: 3.0 (PhD Research Edition) - -This module is the core data intelligence engine for the AAStar ecosystem. It supports **Scientific Data Collection** for the "Asset-Oriented Abstraction" thesis with rigorous, on-chain ground truth verification. - -```bash -# 快速入口(从 aastar-sdk 根目录运行) - -# 收集 OP Mainnet paymaster 基线 -pnpm tsx packages/analytics/scripts/collect_paymaster_baselines.ts --network op-mainnet --n 50 - -# 收集 Paper7 专属数据 -bash packages/analytics/scripts/run_paper7_exclusive_data.sh --network anvil --cycles 5 - -# 全流程协调器 -pnpm tsx packages/analytics/scripts/run_analytics_coordinator.ts --network sepolia - -# Gas 分析报告文档 -packages/analytics/docs/OP_Mainnet_Gas_Analysis_Report.md -``` - ---- - -## System Architecture - -The Analytics module operates on a **Pipeline Architecture** composed of three distinct stages: **Generation**, **Collection**, and **Analysis**. - -```mermaid -graph TD - subgraph "Phase 1: Traffic Generation" - TG[Traffic Coordinator] -->|Trigger| G1[EOA Generator] - TG -->|Trigger| G2[Standard AA Generator] - TG -->|Trigger| G3[SuperPaymaster Generator] - TG -->|Trigger| G4[Paymaster V4 Generator] - G1 & G2 & G3 & G4 -->|Execute Tx| BLOCKCHAIN((Blockchain)) - end - - subgraph "Phase 2: Data Collection" - BLOCKCHAIN -->|Receipts| HF[Historical Fetcher] - HF -->|Raw Data| CACHE[(Data Store / JSON)] - style HF fill:#f9f,stroke:#333 - end - - subgraph "Phase 3: Analysis Engine" - CACHE -->|Load| DC[DataCollector] - DC -->|Enrich| CC[CostCalculator] - CC --> AA[Attribution Analyzer] - CC --> CA[Comparison Analyzer] - CC --> TA[Trend Analyzer] - AA & CA & TA --> REPORT[Final Academic Report] - end -``` - ---- - -## Directory Structure - -```text -packages/analytics/ -├── src/ -│ ├── generators/ # Traffic Generation Logic -│ ├── collectors/ # Etherscan/RPC Fetchers -│ │ └── EventFetcher.ts # On-chain UserOperationEvent collector -│ ├── core/ # Core Analysis Engines -│ ├── analyzers/ # Specific Analysis Strategies -│ └── gas-analyzer.ts # Main Entry Point -├── scripts/ # ← All data collection scripts (consolidated) -│ ├── collect_paymaster_baselines.ts # OP mainnet V4/SuperPM baselines -│ ├── collect_eoa_erc20_baseline.ts # EOA ERC20 transfer baseline -│ ├── collect_industry_baseline.ts # Alchemy/Pimlico baselines -│ ├── compute_cost_summary.ts # Aggregated cost breakdown table -│ ├── gasless-collect.ts # Gasless data collector (OP mainnet) -│ ├── paper7-exclusive-data.ts # Paper7 closed-loop data (anvil) -│ ├── paper7_credit_loop.ts # Credit→Debt→Repay cycle runner -│ ├── paper7_reputation_credit.ts # Reputation→Credit mapping runner -│ ├── run_analytics_coordinator.ts # Full pipeline coordinator -│ ├── run_paper7_exclusive_data.sh # Paper7 shell wrapper (CI-friendly) -│ ├── fetch-tx-hashes.ts # TX hash fetcher utility -│ └── scrape-tx.ts # Puppeteer Etherscan scraper -├── docs/ # ← Research reports and analysis documents -│ └── OP_Mainnet_Gas_Analysis_Report.md # Paper3/Paper7 gas cost evidence -├── data/ # Raw data store -│ ├── gasless_data_collection.csv # T1/T2/T2.1/T5 baseline (v1) -│ ├── gasless_data_collection_v2.csv # Controlled single-UserOp (v2) -│ ├── gasless_metrics_detailed.csv # Full L1/L2 fee decomposition -│ ├── industry_paymaster_baselines.csv # Alchemy, Pimlico on-chain baselines -│ ├── eoa_erc20_baseline.csv # Raw EOA transfer baseline -│ ├── paper7_exclusive/ # Paper7 credit/reputation/liquidity -│ └── paper_gas_op_mainnet/ # Paper3 per-date controlled datasets -│ ├── 2026-02-17/ # V4 n=36, SuperPM n=43 -│ └── 2026-02-18/ # V4/SuperPM with sender (n=50) -└── reports/ # HTML/Markdown summaries -``` - ---- - -## Workflows - -### A. Collect OP Mainnet Paymaster Baselines (Paper3) -```bash -# V4 baseline: strict single UserOp + ERC20 transfer filter -pnpm tsx packages/analytics/scripts/collect_paymaster_baselines.ts \ - --network op-mainnet --type v4 --n 50 --strict-transfer --single-userop - -# SuperPaymaster baseline -pnpm tsx packages/analytics/scripts/collect_paymaster_baselines.ts \ - --network op-mainnet --type super --n 50 -``` - -### B. Run Full Experiment (Coordinator) -```bash -# 1. Fetch History -> 2. Generate Missing Traffic -> 3. Analyze -pnpm tsx packages/analytics/scripts/run_analytics_coordinator.ts --network sepolia -``` - -### C. Fetch Historical Data Only -```bash -pnpm tsx packages/analytics/scripts/run_analytics_coordinator.ts --fetch-only --network op-sepolia -``` - -### D. Transaction Scraper (Etherscan) -Reads from `data/gasless_data_collection.csv`, outputs to `data/gasless_metrics_detailed.csv`. -```bash -pnpm tsx packages/analytics/scripts/scrape-tx.ts -``` - ---- - -## Data Directory - -| File | Description | -|------|-------------| -| `data/gasless_data_collection.csv` | T1/T2/T2.1/T5 records with TxHash + Label | -| `data/gasless_data_collection_v2.csv` | High-fidelity controlled dataset (single-UserOp, ERC20) | -| `data/gasless_metrics_detailed.csv` | L1 Fee, L2 Fee, Gas Used (Puppeteer scraped) | -| `data/industry_paymaster_baselines.csv` | Alchemy (mean=257k) + Pimlico (mean=387k) on-chain baselines | -| `data/eoa_erc20_baseline.csv` | Raw EOA ERC20 transfer baseline | -| `data/paper7_exclusive/` | Credit cycle + reputation + liquidity simulation (Anvil) | -| `data/paper_gas_op_mainnet/2026-02-17/` | V4 n=36, SuperPM n=43 (strict filter) | -| `data/paper_gas_op_mainnet/2026-02-18/` | V4/SuperPM with sender field (n=50) | - ---- - -## Paper7 Exclusive Data (Credit / Reputation / Liquidity) - -Paper7 requires a distinct set of evidence to prove **CommunityFi closed-loop semantics**: - -- **Reputation → Credit**: contribution/reputation synced into Registry, credit limit observed to change -- **Credit → Debt → Repay**: debt recorded in Paymaster/Registry, cleared via xPNTs -- **Liquidity (Baseline)**: simulation curve showing gas-redeemable vs non-redeemable points over time - -### Running - -```bash -# Unified entry (Anvil auto-start, deploy, sync, run all subtasks) -pnpm exec tsx packages/analytics/scripts/paper7-exclusive-data.ts --network anvil --cycles 5 - -# Shell wrapper (CI-friendly) -bash packages/analytics/scripts/run_paper7_exclusive_data.sh --network anvil --cycles 5 -``` - -### Output Structure - -```text -data/paper7_exclusive// - credit_cycle_1.json # credit→debt→repay per account - ... - reputation_credit.json # reputation sync → credit limit mapping - liquidity_velocity_simulation.csv - synced_config.anvil.json -``` - -#### `credit_cycle_*.json` fields -- `creditLimitWei / creditLimitEth`: credit limit in Registry -- `debtBeforeWei / debtAfterRecordWei / debtAfterRepayWei`: debt lifecycle -- `gasUsed.*`: per-step gas units (approve, setCreditTier, recordDebt, mint) - -#### `reputation_credit.json` fields -- `score` / `globalReputation` / `creditLimitWei`: reputation → credit mapping -- `gasUsed.*`: setRule, syncToRegistry, etc. - -#### `liquidity_velocity_simulation.csv` columns -- `day`: simulation step -- `points_gas_redeemable`: points stock when gas-redeemable -- `points_baseline`: points stock without gas redemption - ---- - -## Key Modules - -### 1. Traffic Generators (`src/generators/`) -- **EOAGenerator**: Baseline ETH transfers for network cost measurement. -- **SuperPaymasterGenerator**: Treatment group — credit/asset-oriented gasless model. -- **PaymasterV4Generator**: Treatment group B — deposit model for comparison. - -### 2. Data Collectors (`src/collectors/`) -- **HistoricalFetcher**: Etherscan/OptimismScan API for full transaction histories. -- **EventFetcher**: On-chain `UserOperationEvent` log collector with strict filtering. - -### 3. Analysis Engine (`src/core/` & `src/analyzers/`) -- **Attribution**: L1 Security | L2 Execution | Protocol Overhead breakdown. -- **Comparison**: T1 vs T2 vs T2.1 vs T5 vs industry baselines. - - -> **Status**: Active | **Version**: 3.0 (PhD Research Edition) - -This module is the core data intelligence engine for the AAStar ecosystem. It has been upgraded to support **Scientific Data Collection** for the "Asset-Oriented Abstraction" thesis, moving beyond simple log analysis to rigorous, on-chain ground truth verification. -工作流: - -收集数据(日常运行): -pnpm tsx scripts/run_analytics_coordinator.ts --network sepolia -产生新实验数据(需要时运行): -pnpm tsx scripts/run_analytics_coordinator.ts --network sepolia --gen-traffic - -收集events -pnpm tsx scripts/run_analytics_coordinator.ts --network sepolia --fetch-events - -分析报告(查看结果): -pnpm tsx packages/analytics/src/gas-analyzer-v4.ts --network sepolia - -步骤是解耦的,按需执行即可 ---- - -## 🏗 System Architecture - -The Analytics module operates on a **Pipeline Architecture** composed of three distinct stages: **Generation**, **Collection**, and **Analysis**. - -```mermaid -graph TD - subgraph "Phase 1: Traffic Generation" - TG[Traffic Coordinator] -->|Trigger| G1[EOA Generator] - TG -->|Trigger| G2[Standard AA Generator] - TG -->|Trigger| G3[SuperPaymaster Generator] - TG -->|Trigger| G4[Paymaster V4 Generator] - G1 & G2 & G3 & G4 -->|Execute Tx| BLOCKCHAIN((Blockchain)) - end - - subgraph "Phase 2: Data Collection" - BLOCKCHAIN -->|Receipts| HF[Historical Fetcher] - HF -->|Raw Data| CACHE[(Data Store / JSON)] - style HF fill:#f9f,stroke:#333 - end - - subgraph "Phase 3: Analysis Engine" - CACHE -->|Load| DC[DataCollector] - DC -->|Enrich| CC[CostCalculator] - - CC --> AA[Attribution Analyzer] - CC --> CA[Comparison Analyzer] - CC --> TA[Trend Analyzer] - - AA & CA & TA --> REPORT[Final Academic Report] - end -``` - ---- - -## 🧩 Key Modules - -### 1. Traffic Generators (`src/generators/`) -Responsible for creating controlled, verifiable traffic patterns on testnets (Sepolia, OP Sepolia) and mainnets. -- **EOAGenerator**: Baseline ETH transfers to measure intrinsic network costs. -- **StandardAAGenerator**: ERC-4337 flows using industry-standard Paymasters (Pimlico/Alchemy). -- **SuperPaymasterGenerator**: **Treatment Group**. Uses the `EndUserClient` to execute gasless transactions via the "Credit/Asset-Oriented" model (Dual-Token). -- **PaymasterV4Generator**: **Treatment Group B**. Uses the "Deposit" model (Single-Token) for comparative analysis. - -### 2. Data Collectors (`src/collectors/`) -Responsible for gathering "Ground Truth" data. -- **HistoricalFetcher**: Connects to Etherscan/OptimismScan APIs to retrieve full transaction histories for test accounts defined in `l4-state.json`. **Crucial for auditability.** -- **LogParser**: Legacy parser for development logs (kept for backward compatibility). - -### 3. Analysis Engine (`src/core/` & `src/analyzers/`) -The brain of the operation. -- **Double-Layer Analysis**: - - **Intrinsic Layer**: Gas used, Blob gas, Calldata efficiency. - - **Economic Layer**: USD costs, Protocol Revenue, Net Profit. -- **Attribution**: Breaks down cost into L1 Security, L2 Execution, and Protocol Overhead. - ---- - -## 🚀 Workflows - -### A. Run Full Experiment (Coordinator) -The `run_analytics_coordinator.ts` script orchestrates the entire lifecycle. - -```bash -# 1. Fetch History -> 2. Generate Missing Traffic -> 3. Analyze -npx tsx scripts/run_analytics_coordinator.ts --network sepolia -``` - -### B. Fetch Historical Data Only -Useful for auditing existing accounts without spending gas. -```bash -npx tsx scripts/run_analytics_coordinator.ts --fetch-only --network op-sepolia -``` - -### C. Traffic Generation Only -Generate a specific number of transactions for a specific group. -```bash -npx tsx packages/analytics/src/generators/cli.ts --group superpaymaster --runs 10 -``` - ---- - -## 📊 Data & Metrics - -We prioritize **Intrinsic Metrics** to ensure scientific validity independent of market volatility. - -| Metric | Definition | Source | -| :--- | :--- | :--- | -| **Gas Used** | Total gas consumed by the transaction | `receipt.gasUsed` | -| **L1 Fee** | Cost of posting data to L1 (for L2s) | Oracle Contract / Header | -| **Latency** | Time from `UserOp` submission to inclusion | Client-side Timestamp | -| **Steps** | Number of signatures/interactions required | Protocol Definition | - ---- - -## 📂 Directory Structure - -```text -packages/analytics/ -├── src/ -│ ├── generators/ # [NEW] Traffic Generation Logic -│ ├── collectors/ # [NEW] Etherscan/RPC Fetchers -│ ├── core/ # Core Analysis Engines -│ ├── analyzers/ # Specific Analysis Strategies -│ └── gas-analyzer.ts # Main Entry Point -├── data/ # Raw JSON Data Store -└── reports/ # HTML/Markdown Reports -``` - ---- - -## 🕷️ Transaction Scraper - -A Puppeteer-based scraper to extract detailed gas and fee metrics from Optimism Etherscan. - -### Prerequisites - -- Node.js & pnpm -- Chrome browser (Puppeteer will attempt to install this automatically, but you can run `npx puppeteer browsers install chrome` if needed) - -### Running the Scraper - -The scraper reads transaction hashes from `data/gasless_data_collection.csv` and outputs enriched metrics to `data/gasless_metrics_detailed.csv`. - -```bash -pnpm tsx scripts/scrape-tx.ts -``` - -## 📂 Data Directory (Paper7 Ground Truth) - -- `data/gasless_data_collection.csv`: 输入文件,包含 `Timestamp,Label,TxHash`,用于抓取交易详情。 -- `data/gasless_data_collection_v2.csv`: 主网/测试网的高保真样本集合(包含 `GasUsed(L2)`, `L2ExecutionFee(Wei)`, `L1DataFee(Wei)` 等列),用于论文/报告里的“真实网络成本与可用性”对照。 -- `data/gasless_metrics_detailed.csv`: 抓取后的明细输出(L1 Fee, L2 Fee, Gas Used 等),主要由 `scripts/scrape-tx.ts` 生成。 - ---- - -## 🧪 Paper7 专属数据:Credit / Reputation / Liquidity Loop - -Paper7 需要一组**与通用 gasless 基线不同**的专属证据,用来证明 CommunityFi 的闭环语义成立(而不仅是“能跑通 gasless”): - -- **Reputation → Credit**:将贡献/声誉同步进 Registry,并观察信用额度随之变化 -- **Credit → Debt → Repay**:在 Paymaster/Registry 侧记录债务,再用 xPNTs 完成清算归零 -- **Liquidity(Baseline Liquidity)**:用可复现实验/仿真曲线展示“积分可用于偿债/赞助”对流动性速度的影响(作为机制层证据,不依赖市场价格) - -### 1) 如何运行(推荐) - -统一入口脚本(负责启动 Anvil、必要时自动部署并同步配置,然后跑各子任务): - -```bash -pnpm exec tsx scripts/paper7-exclusive-data.ts --network anvil --cycles 5 -``` - -等价的 shell 包装(更适合 CI/重复跑批): - -```bash -./packages/analytics/run_paper7_exclusive_data.sh --network anvil --cycles 5 -``` - -### 2) 脚本目标与流程定位 - -- `scripts/paper7-exclusive-data.ts` - - **目标**:生成 Paper7 专属闭环数据(credit cycles + reputation→credit + liquidity simulation)。 - - **作用位置**:属于“可重复的受控实验层”,用 gas units 固定地刻画合约路径开销与状态变化,避免 ETH/USD 等市场变量污染结论。 -- `scripts/paper7_credit_loop.ts` - - **目标**:跑一次完整 **credit→debt→repay** 闭环(Anvil-only,依赖 `anvil_*` RPC)。 - - **产出**:每次运行写一个 `credit_cycle_*.json`。 -- `scripts/paper7_reputation_credit.ts` - - **目标**:跑一次 **reputation sync → registry credit update**,并记录关键读数与每笔交易 gasUsed。 - - **产出**:写 `reputation_credit.json`。 -- `liquidity_velocity_simulation.csv` - - **目标**:给论文提供“Baseline Liquidity 机制”的直观趋势证据(对比可用于 gas 清算 vs 不可清算时,积分存量随时间的衰减/累积差异)。 - -### 3) 数据产物(在哪里、是什么、怎么看) - -所有 Paper7 专属数据默认写入: - -`packages/analytics/data/paper7_exclusive//` - -典型结构如下: - -```text -paper7_exclusive// - credit_cycle_1.json - credit_cycle_2.json - ... - reputation_credit.json - liquidity_velocity_simulation.csv - anvil.log # 若自动启动/部署,保留日志便于审计 - deploy.log # 若触发自动部署,保留 forge 日志便于复现 - synced_config.anvil.json # 若触发自动同步,记录当次使用的合约地址快照 -``` - -#### A) `credit_cycle_*.json`(闭环清算) - -每个 cycle 都是一次独立账户的闭环验证,核心字段: - -- `creditLimitWei / creditLimitEth`:该账户在 Registry 的信用额度(用于赞助/欠款边界) -- `debtBeforeWei / debtAfterRecordWei / debtAfterRepayWei`:欠款从 0 → 增加 → 清算归零 -- `gasUsed.*`:每一步合约调用的 gas units(`approve`, `setCreditTier`, `recordDebt`, `mint`) -- `tx.*`:对应交易哈希(便于回溯 receipts / debug) - -#### B) `reputation_credit.json`(声誉到信用映射) - -用于证明 Reputation sync 后,Registry 中的 `globalReputation` 与 `getCreditLimit` 发生预期变化,并给出每步 gas units: - -- `score`:ReputationSystem 计算出的 score -- `globalReputation`:Registry 聚合后的全局声誉 -- `creditLimitWei / creditLimitEth`:映射后的信用额度 -- `gasUsed.*`:`setRule`, `setReputationSource`, `setEntropyFactor`, `syncToRegistry` - -#### C) `liquidity_velocity_simulation.csv`(基线流动性趋势) - -列定义: - -- `day`:仿真步(天) -- `points_gas_redeemable`:积分可用于 gas 清算/赞助时的积分存量曲线 -- `points_baseline`:积分不可清算(仅基础用途)时的积分存量曲线 diff --git a/api/@aastar/analytics/classes/AnalyticsClient.md b/api/@aastar/analytics/classes/AnalyticsClient.md deleted file mode 100644 index a4adb93be..000000000 --- a/api/@aastar/analytics/classes/AnalyticsClient.md +++ /dev/null @@ -1,109 +0,0 @@ -Defined in: [index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/analytics/src/index.ts#L17) - -Analytics client for monitoring and statistics - -## Role Required - -None (public query APIs) - -## Description - -Dashboard and monitoring tools - -## No Permission Required - All Public Queries - -## Typical Users: -- Dashboard Developers -- Community Analytics -- Investors & Researchers - -## Constructors - -### Constructor - -> **new AnalyticsClient**(`publicClient`, `addresses?`): `AnalyticsClient` - -Defined in: [index.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/analytics/src/index.ts#L25) - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `publicClient` | [`PublicClient`](../../core/interfaces/PublicClient.md) | **`Internal`** | -| `addresses?` | \{ `gtoken?`: `` `0x${string}` ``; `registry?`: `` `0x${string}` ``; \} | - | -| `addresses.gtoken?` | `` `0x${string}` `` | - | -| `addresses.registry?` | `` `0x${string}` `` | - | - -#### Returns - -`AnalyticsClient` - -## Methods - -### getRoleEntranceCost() - -> **getRoleEntranceCost**(`roleId`): `Promise`\<\{ `entryBurn`: `bigint`; `exitFee`: \{ `minFee`: `bigint`; `percent`: `number`; \}; `minStake`: `bigint`; `totalRequired`: `bigint`; \}\> - -Defined in: [index.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/analytics/src/index.ts#L124) - -Get role entrance cost breakdown - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `roleId` | `` `0x${string}` `` | - -#### Returns - -`Promise`\<\{ `entryBurn`: `bigint`; `exitFee`: \{ `minFee`: `bigint`; `percent`: `number`; \}; `minStake`: `bigint`; `totalRequired`: `bigint`; \}\> - -#### Role Required - -None (public view) - -*** - -### getSupplyMetrics() - -> **getSupplyMetrics**(): `Promise`\<\{ `cap`: `bigint`; `deflationRate`: `number`; `remainingMintable`: `bigint`; `totalLifetimeBurned`: `bigint`; `totalSupply`: `bigint`; \}\> - -Defined in: [index.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/analytics/src/index.ts#L42) - -Get complete supply metrics - -#### Returns - -`Promise`\<\{ `cap`: `bigint`; `deflationRate`: `number`; `remainingMintable`: `bigint`; `totalLifetimeBurned`: `bigint`; `totalSupply`: `bigint`; \}\> - -#### Role Required - -None (public view) - -*** - -### subscribeToBurnEvents() - -> **subscribeToBurnEvents**(`callback`): () => `void` - -Defined in: [index.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/analytics/src/index.ts#L90) - -Subscribe to real-time burn events - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `callback` | (`event`) => `void` | - -#### Returns - -> (): `void` - -##### Returns - -`void` - -#### Role Required - -None (public events) diff --git a/api/@aastar/analytics/index.md b/api/@aastar/analytics/index.md deleted file mode 100644 index 8ba9794ef..000000000 --- a/api/@aastar/analytics/index.md +++ /dev/null @@ -1,440 +0,0 @@ -# Analytics Package (AAStar Gas Analytics & Experimentation) - -> **Status**: Active | **Version**: 3.0 (PhD Research Edition) - -This module is the core data intelligence engine for the AAStar ecosystem. It supports **Scientific Data Collection** for the "Asset-Oriented Abstraction" thesis with rigorous, on-chain ground truth verification. - -```bash -# 快速入口(从 aastar-sdk 根目录运行) - -# 收集 OP Mainnet paymaster 基线 -pnpm tsx packages/analytics/scripts/collect_paymaster_baselines.ts --network op-mainnet --n 50 - -# 收集 Paper7 专属数据 -bash packages/analytics/scripts/run_paper7_exclusive_data.sh --network anvil --cycles 5 - -# 全流程协调器 -pnpm tsx packages/analytics/scripts/run_analytics_coordinator.ts --network sepolia - -# Gas 分析报告文档 -packages/analytics/docs/OP_Mainnet_Gas_Analysis_Report.md -``` - ---- - -## System Architecture - -The Analytics module operates on a **Pipeline Architecture** composed of three distinct stages: **Generation**, **Collection**, and **Analysis**. - -```mermaid -graph TD - subgraph "Phase 1: Traffic Generation" - TG[Traffic Coordinator] -->|Trigger| G1[EOA Generator] - TG -->|Trigger| G2[Standard AA Generator] - TG -->|Trigger| G3[SuperPaymaster Generator] - TG -->|Trigger| G4[Paymaster V4 Generator] - G1 & G2 & G3 & G4 -->|Execute Tx| BLOCKCHAIN((Blockchain)) - end - - subgraph "Phase 2: Data Collection" - BLOCKCHAIN -->|Receipts| HF[Historical Fetcher] - HF -->|Raw Data| CACHE[(Data Store / JSON)] - style HF fill:#f9f,stroke:#333 - end - - subgraph "Phase 3: Analysis Engine" - CACHE -->|Load| DC[DataCollector] - DC -->|Enrich| CC[CostCalculator] - CC --> AA[Attribution Analyzer] - CC --> CA[Comparison Analyzer] - CC --> TA[Trend Analyzer] - AA & CA & TA --> REPORT[Final Academic Report] - end -``` - ---- - -## Directory Structure - -```text -packages/analytics/ -├── src/ -│ ├── generators/ # Traffic Generation Logic -│ ├── collectors/ # Etherscan/RPC Fetchers -│ │ └── EventFetcher.ts # On-chain UserOperationEvent collector -│ ├── core/ # Core Analysis Engines -│ ├── analyzers/ # Specific Analysis Strategies -│ └── gas-analyzer.ts # Main Entry Point -├── scripts/ # ← All data collection scripts (consolidated) -│ ├── collect_paymaster_baselines.ts # OP mainnet V4/SuperPM baselines -│ ├── collect_eoa_erc20_baseline.ts # EOA ERC20 transfer baseline -│ ├── collect_industry_baseline.ts # Alchemy/Pimlico baselines -│ ├── compute_cost_summary.ts # Aggregated cost breakdown table -│ ├── gasless-collect.ts # Gasless data collector (OP mainnet) -│ ├── paper7-exclusive-data.ts # Paper7 closed-loop data (anvil) -│ ├── paper7_credit_loop.ts # Credit→Debt→Repay cycle runner -│ ├── paper7_reputation_credit.ts # Reputation→Credit mapping runner -│ ├── run_analytics_coordinator.ts # Full pipeline coordinator -│ ├── run_paper7_exclusive_data.sh # Paper7 shell wrapper (CI-friendly) -│ ├── fetch-tx-hashes.ts # TX hash fetcher utility -│ └── scrape-tx.ts # Puppeteer Etherscan scraper -├── docs/ # ← Research reports and analysis documents -│ └── OP_Mainnet_Gas_Analysis_Report.md # Paper3/Paper7 gas cost evidence -├── data/ # Raw data store -│ ├── gasless_data_collection.csv # T1/T2/T2.1/T5 baseline (v1) -│ ├── gasless_data_collection_v2.csv # Controlled single-UserOp (v2) -│ ├── gasless_metrics_detailed.csv # Full L1/L2 fee decomposition -│ ├── industry_paymaster_baselines.csv # Alchemy, Pimlico on-chain baselines -│ ├── eoa_erc20_baseline.csv # Raw EOA transfer baseline -│ ├── paper7_exclusive/ # Paper7 credit/reputation/liquidity -│ └── paper_gas_op_mainnet/ # Paper3 per-date controlled datasets -│ ├── 2026-02-17/ # V4 n=36, SuperPM n=43 -│ └── 2026-02-18/ # V4/SuperPM with sender (n=50) -└── reports/ # HTML/Markdown summaries -``` - ---- - -## Workflows - -### A. Collect OP Mainnet Paymaster Baselines (Paper3) -```bash -# V4 baseline: strict single UserOp + ERC20 transfer filter -pnpm tsx packages/analytics/scripts/collect_paymaster_baselines.ts \ - --network op-mainnet --type v4 --n 50 --strict-transfer --single-userop - -# SuperPaymaster baseline -pnpm tsx packages/analytics/scripts/collect_paymaster_baselines.ts \ - --network op-mainnet --type super --n 50 -``` - -### B. Run Full Experiment (Coordinator) -```bash -# 1. Fetch History -> 2. Generate Missing Traffic -> 3. Analyze -pnpm tsx packages/analytics/scripts/run_analytics_coordinator.ts --network sepolia -``` - -### C. Fetch Historical Data Only -```bash -pnpm tsx packages/analytics/scripts/run_analytics_coordinator.ts --fetch-only --network op-sepolia -``` - -### D. Transaction Scraper (Etherscan) -Reads from `data/gasless_data_collection.csv`, outputs to `data/gasless_metrics_detailed.csv`. -```bash -pnpm tsx packages/analytics/scripts/scrape-tx.ts -``` - ---- - -## Data Directory - -| File | Description | -|------|-------------| -| `data/gasless_data_collection.csv` | T1/T2/T2.1/T5 records with TxHash + Label | -| `data/gasless_data_collection_v2.csv` | High-fidelity controlled dataset (single-UserOp, ERC20) | -| `data/gasless_metrics_detailed.csv` | L1 Fee, L2 Fee, Gas Used (Puppeteer scraped) | -| `data/industry_paymaster_baselines.csv` | Alchemy (mean=257k) + Pimlico (mean=387k) on-chain baselines | -| `data/eoa_erc20_baseline.csv` | Raw EOA ERC20 transfer baseline | -| `data/paper7_exclusive/` | Credit cycle + reputation + liquidity simulation (Anvil) | -| `data/paper_gas_op_mainnet/2026-02-17/` | V4 n=36, SuperPM n=43 (strict filter) | -| `data/paper_gas_op_mainnet/2026-02-18/` | V4/SuperPM with sender field (n=50) | - ---- - -## Paper7 Exclusive Data (Credit / Reputation / Liquidity) - -Paper7 requires a distinct set of evidence to prove **CommunityFi closed-loop semantics**: - -- **Reputation → Credit**: contribution/reputation synced into Registry, credit limit observed to change -- **Credit → Debt → Repay**: debt recorded in Paymaster/Registry, cleared via xPNTs -- **Liquidity (Baseline)**: simulation curve showing gas-redeemable vs non-redeemable points over time - -### Running - -```bash -# Unified entry (Anvil auto-start, deploy, sync, run all subtasks) -pnpm exec tsx packages/analytics/scripts/paper7-exclusive-data.ts --network anvil --cycles 5 - -# Shell wrapper (CI-friendly) -bash packages/analytics/scripts/run_paper7_exclusive_data.sh --network anvil --cycles 5 -``` - -### Output Structure - -```text -data/paper7_exclusive// - credit_cycle_1.json # credit→debt→repay per account - ... - reputation_credit.json # reputation sync → credit limit mapping - liquidity_velocity_simulation.csv - synced_config.anvil.json -``` - -#### `credit_cycle_*.json` fields -- `creditLimitWei / creditLimitEth`: credit limit in Registry -- `debtBeforeWei / debtAfterRecordWei / debtAfterRepayWei`: debt lifecycle -- `gasUsed.*`: per-step gas units (approve, setCreditTier, recordDebt, mint) - -#### `reputation_credit.json` fields -- `score` / `globalReputation` / `creditLimitWei`: reputation → credit mapping -- `gasUsed.*`: setRule, syncToRegistry, etc. - -#### `liquidity_velocity_simulation.csv` columns -- `day`: simulation step -- `points_gas_redeemable`: points stock when gas-redeemable -- `points_baseline`: points stock without gas redemption - ---- - -## Key Modules - -### 1. Traffic Generators (`src/generators/`) -- **EOAGenerator**: Baseline ETH transfers for network cost measurement. -- **SuperPaymasterGenerator**: Treatment group — credit/asset-oriented gasless model. -- **PaymasterV4Generator**: Treatment group B — deposit model for comparison. - -### 2. Data Collectors (`src/collectors/`) -- **HistoricalFetcher**: Etherscan/OptimismScan API for full transaction histories. -- **EventFetcher**: On-chain `UserOperationEvent` log collector with strict filtering. - -### 3. Analysis Engine (`src/core/` & `src/analyzers/`) -- **Attribution**: L1 Security | L2 Execution | Protocol Overhead breakdown. -- **Comparison**: T1 vs T2 vs T2.1 vs T5 vs industry baselines. - - -> **Status**: Active | **Version**: 3.0 (PhD Research Edition) - -This module is the core data intelligence engine for the AAStar ecosystem. It has been upgraded to support **Scientific Data Collection** for the "Asset-Oriented Abstraction" thesis, moving beyond simple log analysis to rigorous, on-chain ground truth verification. -工作流: - -收集数据(日常运行): -pnpm tsx scripts/run_analytics_coordinator.ts --network sepolia -产生新实验数据(需要时运行): -pnpm tsx scripts/run_analytics_coordinator.ts --network sepolia --gen-traffic - -收集events -pnpm tsx scripts/run_analytics_coordinator.ts --network sepolia --fetch-events - -分析报告(查看结果): -pnpm tsx packages/analytics/src/gas-analyzer-v4.ts --network sepolia - -步骤是解耦的,按需执行即可 ---- - -## 🏗 System Architecture - -The Analytics module operates on a **Pipeline Architecture** composed of three distinct stages: **Generation**, **Collection**, and **Analysis**. - -```mermaid -graph TD - subgraph "Phase 1: Traffic Generation" - TG[Traffic Coordinator] -->|Trigger| G1[EOA Generator] - TG -->|Trigger| G2[Standard AA Generator] - TG -->|Trigger| G3[SuperPaymaster Generator] - TG -->|Trigger| G4[Paymaster V4 Generator] - G1 & G2 & G3 & G4 -->|Execute Tx| BLOCKCHAIN((Blockchain)) - end - - subgraph "Phase 2: Data Collection" - BLOCKCHAIN -->|Receipts| HF[Historical Fetcher] - HF -->|Raw Data| CACHE[(Data Store / JSON)] - style HF fill:#f9f,stroke:#333 - end - - subgraph "Phase 3: Analysis Engine" - CACHE -->|Load| DC[DataCollector] - DC -->|Enrich| CC[CostCalculator] - - CC --> AA[Attribution Analyzer] - CC --> CA[Comparison Analyzer] - CC --> TA[Trend Analyzer] - - AA & CA & TA --> REPORT[Final Academic Report] - end -``` - ---- - -## 🧩 Key Modules - -### 1. Traffic Generators (`src/generators/`) -Responsible for creating controlled, verifiable traffic patterns on testnets (Sepolia, OP Sepolia) and mainnets. -- **EOAGenerator**: Baseline ETH transfers to measure intrinsic network costs. -- **StandardAAGenerator**: ERC-4337 flows using industry-standard Paymasters (Pimlico/Alchemy). -- **SuperPaymasterGenerator**: **Treatment Group**. Uses the `EndUserClient` to execute gasless transactions via the "Credit/Asset-Oriented" model (Dual-Token). -- **PaymasterV4Generator**: **Treatment Group B**. Uses the "Deposit" model (Single-Token) for comparative analysis. - -### 2. Data Collectors (`src/collectors/`) -Responsible for gathering "Ground Truth" data. -- **HistoricalFetcher**: Connects to Etherscan/OptimismScan APIs to retrieve full transaction histories for test accounts defined in `l4-state.json`. **Crucial for auditability.** -- **LogParser**: Legacy parser for development logs (kept for backward compatibility). - -### 3. Analysis Engine (`src/core/` & `src/analyzers/`) -The brain of the operation. -- **Double-Layer Analysis**: - - **Intrinsic Layer**: Gas used, Blob gas, Calldata efficiency. - - **Economic Layer**: USD costs, Protocol Revenue, Net Profit. -- **Attribution**: Breaks down cost into L1 Security, L2 Execution, and Protocol Overhead. - ---- - -## 🚀 Workflows - -### A. Run Full Experiment (Coordinator) -The `run_analytics_coordinator.ts` script orchestrates the entire lifecycle. - -```bash -# 1. Fetch History -> 2. Generate Missing Traffic -> 3. Analyze -npx tsx scripts/run_analytics_coordinator.ts --network sepolia -``` - -### B. Fetch Historical Data Only -Useful for auditing existing accounts without spending gas. -```bash -npx tsx scripts/run_analytics_coordinator.ts --fetch-only --network op-sepolia -``` - -### C. Traffic Generation Only -Generate a specific number of transactions for a specific group. -```bash -npx tsx packages/analytics/src/generators/cli.ts --group superpaymaster --runs 10 -``` - ---- - -## 📊 Data & Metrics - -We prioritize **Intrinsic Metrics** to ensure scientific validity independent of market volatility. - -| Metric | Definition | Source | -| :--- | :--- | :--- | -| **Gas Used** | Total gas consumed by the transaction | `receipt.gasUsed` | -| **L1 Fee** | Cost of posting data to L1 (for L2s) | Oracle Contract / Header | -| **Latency** | Time from `UserOp` submission to inclusion | Client-side Timestamp | -| **Steps** | Number of signatures/interactions required | Protocol Definition | - ---- - -## 📂 Directory Structure - -```text -packages/analytics/ -├── src/ -│ ├── generators/ # [NEW] Traffic Generation Logic -│ ├── collectors/ # [NEW] Etherscan/RPC Fetchers -│ ├── core/ # Core Analysis Engines -│ ├── analyzers/ # Specific Analysis Strategies -│ └── gas-analyzer.ts # Main Entry Point -├── data/ # Raw JSON Data Store -└── reports/ # HTML/Markdown Reports -``` - ---- - -## 🕷️ Transaction Scraper - -A Puppeteer-based scraper to extract detailed gas and fee metrics from Optimism Etherscan. - -### Prerequisites - -- Node.js & pnpm -- Chrome browser (Puppeteer will attempt to install this automatically, but you can run `npx puppeteer browsers install chrome` if needed) - -### Running the Scraper - -The scraper reads transaction hashes from `data/gasless_data_collection.csv` and outputs enriched metrics to `data/gasless_metrics_detailed.csv`. - -```bash -pnpm tsx scripts/scrape-tx.ts -``` - -## 📂 Data Directory (Paper7 Ground Truth) - -- `data/gasless_data_collection.csv`: 输入文件,包含 `Timestamp,Label,TxHash`,用于抓取交易详情。 -- `data/gasless_data_collection_v2.csv`: 主网/测试网的高保真样本集合(包含 `GasUsed(L2)`, `L2ExecutionFee(Wei)`, `L1DataFee(Wei)` 等列),用于论文/报告里的“真实网络成本与可用性”对照。 -- `data/gasless_metrics_detailed.csv`: 抓取后的明细输出(L1 Fee, L2 Fee, Gas Used 等),主要由 `scripts/scrape-tx.ts` 生成。 - ---- - -## 🧪 Paper7 专属数据:Credit / Reputation / Liquidity Loop - -Paper7 需要一组**与通用 gasless 基线不同**的专属证据,用来证明 CommunityFi 的闭环语义成立(而不仅是“能跑通 gasless”): - -- **Reputation → Credit**:将贡献/声誉同步进 Registry,并观察信用额度随之变化 -- **Credit → Debt → Repay**:在 Paymaster/Registry 侧记录债务,再用 xPNTs 完成清算归零 -- **Liquidity(Baseline Liquidity)**:用可复现实验/仿真曲线展示“积分可用于偿债/赞助”对流动性速度的影响(作为机制层证据,不依赖市场价格) - -### 1) 如何运行(推荐) - -统一入口脚本(负责启动 Anvil、必要时自动部署并同步配置,然后跑各子任务): - -```bash -pnpm exec tsx scripts/paper7-exclusive-data.ts --network anvil --cycles 5 -``` - -等价的 shell 包装(更适合 CI/重复跑批): - -```bash -./packages/analytics/run_paper7_exclusive_data.sh --network anvil --cycles 5 -``` - -### 2) 脚本目标与流程定位 - -- `scripts/paper7-exclusive-data.ts` - - **目标**:生成 Paper7 专属闭环数据(credit cycles + reputation→credit + liquidity simulation)。 - - **作用位置**:属于“可重复的受控实验层”,用 gas units 固定地刻画合约路径开销与状态变化,避免 ETH/USD 等市场变量污染结论。 -- `scripts/paper7_credit_loop.ts` - - **目标**:跑一次完整 **credit→debt→repay** 闭环(Anvil-only,依赖 `anvil_*` RPC)。 - - **产出**:每次运行写一个 `credit_cycle_*.json`。 -- `scripts/paper7_reputation_credit.ts` - - **目标**:跑一次 **reputation sync → registry credit update**,并记录关键读数与每笔交易 gasUsed。 - - **产出**:写 `reputation_credit.json`。 -- `liquidity_velocity_simulation.csv` - - **目标**:给论文提供“Baseline Liquidity 机制”的直观趋势证据(对比可用于 gas 清算 vs 不可清算时,积分存量随时间的衰减/累积差异)。 - -### 3) 数据产物(在哪里、是什么、怎么看) - -所有 Paper7 专属数据默认写入: - -`packages/analytics/data/paper7_exclusive//` - -典型结构如下: - -```text -paper7_exclusive// - credit_cycle_1.json - credit_cycle_2.json - ... - reputation_credit.json - liquidity_velocity_simulation.csv - anvil.log # 若自动启动/部署,保留日志便于审计 - deploy.log # 若触发自动部署,保留 forge 日志便于复现 - synced_config.anvil.json # 若触发自动同步,记录当次使用的合约地址快照 -``` - -#### A) `credit_cycle_*.json`(闭环清算) - -每个 cycle 都是一次独立账户的闭环验证,核心字段: - -- `creditLimitWei / creditLimitEth`:该账户在 Registry 的信用额度(用于赞助/欠款边界) -- `debtBeforeWei / debtAfterRecordWei / debtAfterRepayWei`:欠款从 0 → 增加 → 清算归零 -- `gasUsed.*`:每一步合约调用的 gas units(`approve`, `setCreditTier`, `recordDebt`, `mint`) -- `tx.*`:对应交易哈希(便于回溯 receipts / debug) - -#### B) `reputation_credit.json`(声誉到信用映射) - -用于证明 Reputation sync 后,Registry 中的 `globalReputation` 与 `getCreditLimit` 发生预期变化,并给出每步 gas units: - -- `score`:ReputationSystem 计算出的 score -- `globalReputation`:Registry 聚合后的全局声誉 -- `creditLimitWei / creditLimitEth`:映射后的信用额度 -- `gasUsed.*`:`setRule`, `setReputationSource`, `setEntropyFactor`, `syncToRegistry` - -#### C) `liquidity_velocity_simulation.csv`(基线流动性趋势) - -列定义: - -- `day`:仿真步(天) -- `points_gas_redeemable`:积分可用于 gas 清算/赞助时的积分存量曲线 -- `points_baseline`:积分不可清算(仅基础用途)时的积分存量曲线 diff --git a/api/@aastar/channel/classes/ChannelClient.md b/api/@aastar/channel/classes/ChannelClient.md new file mode 100644 index 000000000..8a543108e --- /dev/null +++ b/api/@aastar/channel/classes/ChannelClient.md @@ -0,0 +1,189 @@ +Defined in: [packages/channel/src/ChannelClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L13) + +## Constructors + +### Constructor + +> **new ChannelClient**(`config`): `ChannelClient` + +Defined in: [packages/channel/src/ChannelClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ChannelClientConfig`](../type-aliases/ChannelClientConfig.md) | + +#### Returns + +`ChannelClient` + +## Methods + +### closeChannel() + +> **closeChannel**(`voucher`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L59) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `voucher` | [`SignedVoucher`](../type-aliases/SignedVoucher.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getChannelState() + +> **getChannelState**(`channelId`): `Promise`\<[`ChannelState`](../type-aliases/ChannelState.md)\> + +Defined in: [packages/channel/src/ChannelClient.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L90) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<[`ChannelState`](../type-aliases/ChannelState.md)\> + +*** + +### getCloseTimeout() + +> **getCloseTimeout**(): `Promise`\<`bigint`\> + +Defined in: [packages/channel/src/ChannelClient.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L94) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getVersion() + +> **getVersion**(): `Promise`\<`string`\> + +Defined in: [packages/channel/src/ChannelClient.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L98) + +#### Returns + +`Promise`\<`string`\> + +*** + +### openChannel() + +> **openChannel**(`channelConfig`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L28) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelConfig` | [`ChannelConfig`](../type-aliases/ChannelConfig.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### requestClose() + +> **requestClose**(`channelId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### settleChannel() + +> **settleChannel**(`voucher`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L50) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `voucher` | [`SignedVoucher`](../type-aliases/SignedVoucher.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### signVoucherOffline() + +> **signVoucherOffline**(`channelId`, `cumulativeAmount`): `Promise`\<[`SignedVoucher`](../type-aliases/SignedVoucher.md)\> + +Defined in: [packages/channel/src/ChannelClient.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L39) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | +| `cumulativeAmount` | `bigint` | + +#### Returns + +`Promise`\<[`SignedVoucher`](../type-aliases/SignedVoucher.md)\> + +*** + +### topUpChannel() + +> **topUpChannel**(`channelId`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### withdraw() + +> **withdraw**(`channelId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L83) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/channel/functions/getVoucherDomain.md b/api/@aastar/channel/functions/getVoucherDomain.md new file mode 100644 index 000000000..f123e7a2b --- /dev/null +++ b/api/@aastar/channel/functions/getVoucherDomain.md @@ -0,0 +1,30 @@ +> **getVoucherDomain**(`chainId`, `verifyingContract`): `object` + +Defined in: [packages/channel/src/voucher.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/voucher.ts#L10) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `chainId` | `number` | +| `verifyingContract` | `` `0x${string}` `` | + +## Returns + +`object` + +### chainId + +> **chainId**: `number` + +### name + +> **name**: `string` = `'MicroPaymentChannel'` + +### verifyingContract + +> **verifyingContract**: `` `0x${string}` `` + +### version + +> **version**: `string` = `'1.0.0'` diff --git a/api/@aastar/channel/functions/signVoucher.md b/api/@aastar/channel/functions/signVoucher.md new file mode 100644 index 000000000..eb71614ad --- /dev/null +++ b/api/@aastar/channel/functions/signVoucher.md @@ -0,0 +1,61 @@ +> **signVoucher**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/voucher.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/voucher.ts#L19) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "fees" \| "gas" \| "nonce" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "fees" \| "gas" \| "nonce" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `channelId`: `` `0x${string}` ``; `cumulativeAmount`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.channelId` | `` `0x${string}` `` | - | +| `params.cumulativeAmount` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/channel/index.md b/api/@aastar/channel/index.md new file mode 100644 index 000000000..03f625b15 --- /dev/null +++ b/api/@aastar/channel/index.md @@ -0,0 +1,20 @@ +## Classes + +- [ChannelClient](classes/ChannelClient.md) + +## Type Aliases + +- [ChannelClientConfig](type-aliases/ChannelClientConfig.md) +- [ChannelConfig](type-aliases/ChannelConfig.md) +- [ChannelState](type-aliases/ChannelState.md) +- [SignedVoucher](type-aliases/SignedVoucher.md) +- [VoucherParams](type-aliases/VoucherParams.md) + +## Variables + +- [VOUCHER\_TYPES](variables/VOUCHER_TYPES.md) + +## Functions + +- [getVoucherDomain](functions/getVoucherDomain.md) +- [signVoucher](functions/signVoucher.md) diff --git a/api/@aastar/channel/type-aliases/ChannelClientConfig.md b/api/@aastar/channel/type-aliases/ChannelClientConfig.md new file mode 100644 index 000000000..431a98864 --- /dev/null +++ b/api/@aastar/channel/type-aliases/ChannelClientConfig.md @@ -0,0 +1,35 @@ +> **ChannelClientConfig** = `object` + +Defined in: [packages/channel/src/ChannelClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L6) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/channel/src/ChannelClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L10) + +*** + +### channelAddress + +> **channelAddress**: `Address` + +Defined in: [packages/channel/src/ChannelClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L9) + +*** + +### publicClient + +> **publicClient**: [`PublicClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/ChannelClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L7) + +*** + +### walletClient + +> **walletClient**: [`WalletClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/ChannelClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L8) diff --git a/api/@aastar/channel/type-aliases/ChannelConfig.md b/api/@aastar/channel/type-aliases/ChannelConfig.md new file mode 100644 index 000000000..3e5b08d3d --- /dev/null +++ b/api/@aastar/channel/type-aliases/ChannelConfig.md @@ -0,0 +1,43 @@ +> **ChannelConfig** = `object` + +Defined in: [packages/channel/src/types.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L15) + +## Properties + +### authorizedSigner + +> **authorizedSigner**: `` `0x${string}` `` + +Defined in: [packages/channel/src/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L20) + +*** + +### deposit + +> **deposit**: `bigint` + +Defined in: [packages/channel/src/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L18) + +*** + +### payee + +> **payee**: `` `0x${string}` `` + +Defined in: [packages/channel/src/types.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L16) + +*** + +### salt + +> **salt**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/types.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L19) + +*** + +### token + +> **token**: `` `0x${string}` `` + +Defined in: [packages/channel/src/types.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L17) diff --git a/api/@aastar/channel/type-aliases/ChannelState.md b/api/@aastar/channel/type-aliases/ChannelState.md new file mode 100644 index 000000000..d9eda3a67 --- /dev/null +++ b/api/@aastar/channel/type-aliases/ChannelState.md @@ -0,0 +1,67 @@ +> **ChannelState** = `object` + +Defined in: packages/core/dist/actions/channel.d.ts:2 + +## Properties + +### authorizedSigner + +> **authorizedSigner**: `Address` + +Defined in: packages/core/dist/actions/channel.d.ts:6 + +*** + +### closeRequestedAt + +> **closeRequestedAt**: `bigint` + +Defined in: packages/core/dist/actions/channel.d.ts:9 + +*** + +### deposit + +> **deposit**: `bigint` + +Defined in: packages/core/dist/actions/channel.d.ts:7 + +*** + +### finalized + +> **finalized**: `boolean` + +Defined in: packages/core/dist/actions/channel.d.ts:10 + +*** + +### payee + +> **payee**: `Address` + +Defined in: packages/core/dist/actions/channel.d.ts:4 + +*** + +### payer + +> **payer**: `Address` + +Defined in: packages/core/dist/actions/channel.d.ts:3 + +*** + +### settled + +> **settled**: `bigint` + +Defined in: packages/core/dist/actions/channel.d.ts:8 + +*** + +### token + +> **token**: `Address` + +Defined in: packages/core/dist/actions/channel.d.ts:5 diff --git a/api/@aastar/channel/type-aliases/SignedVoucher.md b/api/@aastar/channel/type-aliases/SignedVoucher.md new file mode 100644 index 000000000..24f7639f8 --- /dev/null +++ b/api/@aastar/channel/type-aliases/SignedVoucher.md @@ -0,0 +1,9 @@ +> **SignedVoucher** = [`VoucherParams`](VoucherParams.md) & `object` + +Defined in: [packages/channel/src/types.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L11) + +## Type Declaration + +### signature + +> **signature**: [`Hex`](https://viem.sh/docs/index.html) diff --git a/api/@aastar/channel/type-aliases/VoucherParams.md b/api/@aastar/channel/type-aliases/VoucherParams.md new file mode 100644 index 000000000..d0b283da0 --- /dev/null +++ b/api/@aastar/channel/type-aliases/VoucherParams.md @@ -0,0 +1,19 @@ +> **VoucherParams** = `object` + +Defined in: [packages/channel/src/types.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L6) + +## Properties + +### channelId + +> **channelId**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L7) + +*** + +### cumulativeAmount + +> **cumulativeAmount**: `bigint` + +Defined in: [packages/channel/src/types.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L8) diff --git a/api/@aastar/channel/variables/VOUCHER_TYPES.md b/api/@aastar/channel/variables/VOUCHER_TYPES.md new file mode 100644 index 000000000..8149952a6 --- /dev/null +++ b/api/@aastar/channel/variables/VOUCHER_TYPES.md @@ -0,0 +1,9 @@ +> `const` **VOUCHER\_TYPES**: `object` + +Defined in: [packages/channel/src/voucher.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/voucher.ts#L3) + +## Type Declaration + +### Voucher + +> `readonly` **Voucher**: readonly \[\{ `name`: `"channelId"`; `type`: `"bytes32"`; \}, \{ `name`: `"cumulativeAmount"`; `type`: `"uint128"`; \}\] diff --git a/api/@aastar/community/classes/CommunityClient.md b/api/@aastar/community/classes/CommunityClient.md deleted file mode 100644 index 4dd7b639b..000000000 --- a/api/@aastar/community/classes/CommunityClient.md +++ /dev/null @@ -1,232 +0,0 @@ -Defined in: [index.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L66) - -Community management client - -## Role Required - -ROLE_COMMUNITY (for most operations after launch) - -## Description - -Provides high-level APIs for community lifecycle operations - -## Permission Requirements: -- **Launch Community**: Requires GToken balance >= stakeAmount + entryBurn -- **Issue xPNTs**: Requires COMMUNITY role -- **Configure SBT**: Requires COMMUNITY role + community ownership - -## Typical Users: -- Community Administrators -- DAO Operators -- Protocol Partners - -## Constructors - -### Constructor - -> **new CommunityClient**(`publicClient`, `walletClient`, `addresses?`): `CommunityClient` - -Defined in: [index.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L86) - -Initialize CommunityClient - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `publicClient` | [`PublicClient`](../../core/interfaces/PublicClient.md) | The public client for queries | -| `walletClient` | [`WalletClient`](../../core/interfaces/WalletClient.md) | The wallet client for transactions | -| `addresses?` | \{ `gtoken?`: `` `0x${string}` ``; `registry?`: `` `0x${string}` ``; `staking?`: `` `0x${string}` ``; \} | Optional contract address overrides | -| `addresses.gtoken?` | `` `0x${string}` `` | - | -| `addresses.registry?` | `` `0x${string}` `` | - | -| `addresses.staking?` | `` `0x${string}` `` | - | - -#### Returns - -`CommunityClient` - -## Methods - -### checkLaunchRequirements() - -> **checkLaunchRequirements**(`address?`, `requiredAmount?`): `Promise`\<[`RoleRequirement`](../../core/interfaces/RoleRequirement.md)\> - -Defined in: [index.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L124) - -Check if user meets requirements to launch a community - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `address?` | `` `0x${string}` `` | User address to check (optional, defaults to wallet account) | -| `requiredAmount?` | `bigint` | Total GToken required (stake + burn) | - -#### Returns - -`Promise`\<[`RoleRequirement`](../../core/interfaces/RoleRequirement.md)\> - -Requirement check result - -#### Role Required - -None (pre-check before registration) - -#### Example - -```typescript -const check = await communityClient.checkLaunchRequirements( - myAddress, - parseEther("33") // 30 stake + 3 burn -); -if (!check.hasEnoughGToken) { - console.error(`❌ ${check.missingRequirements.join('\n')}`); - return; -} -``` - -*** - -### configureSBTRules() - -> **configureSBTRules**(`rules`): `Promise`\<`` `0x${string}` ``\> - -Defined in: [index.ts:307](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L307) - -Configure SBT minting rules for the community - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `rules` | [`SBTRuleConfig`](../interfaces/SBTRuleConfig.md) | SBT rule configuration | - -#### Returns - -`Promise`\<`` `0x${string}` ``\> - -Transaction hash - -#### Role Required - -ROLE_COMMUNITY - -#### Permission - -Must be registered community admin + community ownership - -*** - -### getCommunityStats() - -> **getCommunityStats**(`communityId`): `Promise`\<[`CommunityStats`](../interfaces/CommunityStats.md)\> - -Defined in: [index.ts:334](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L334) - -Get community statistics - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `communityId` | `` `0x${string}` `` | Community address | - -#### Returns - -`Promise`\<[`CommunityStats`](../interfaces/CommunityStats.md)\> - -Community statistics - -#### Role Required - -None (public query) - -*** - -### issueXPNTs() - -> **issueXPNTs**(`params`): `Promise`\<\{ `txHash`: `` `0x${string}` ``; `xpntsAddress`: `` `0x${string}` ``; \}\> - -Defined in: [index.ts:255](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L255) - -Issue community-specific xPNTs token - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | [`XPNTsIssuanceParams`](../interfaces/XPNTsIssuanceParams.md) | xPNTs issuance parameters | - -#### Returns - -`Promise`\<\{ `txHash`: `` `0x${string}` ``; `xpntsAddress`: `` `0x${string}` ``; \}\> - -xPNTs contract address and transaction hash - -#### Role Required - -ROLE_COMMUNITY - -#### Permission - -Must be registered community admin - -*** - -### launchCommunity() - -> **launchCommunity**(`config`): `Promise`\<\{ `communityId`: `` `0x${string}` ``; `txHash`: `` `0x${string}` ``; \}\> - -Defined in: [index.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L174) - -Launch a community with one-click operation - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `config` | [`CommunityLaunchConfig`](../interfaces/CommunityLaunchConfig.md) | Community configuration | - -#### Returns - -`Promise`\<\{ `communityId`: `` `0x${string}` ``; `txHash`: `` `0x${string}` ``; \}\> - -Community ID and transaction hash - -#### Role Required - -None (will register ROLE_COMMUNITY) - -#### Permission - -Requires GToken balance >= stakeAmount + entryBurn - -#### Description - -Combines: approve → stake → register → configure -- Auto-approves GToken for staking contract -- Registers caller as COMMUNITY role -- Stakes required amount -- **Pre-checks requirements before execution** - -#### Throws - -Error if requirements not met - -#### Example - -```typescript -const communityClient = new CommunityClient(publicClient, walletClient); - -try { - const { communityId, txHash } = await communityClient.launchCommunity({ - name: "MyDAO", - stakeAmount: parseEther("30"), - entryBurn: parseEther("3"), - logoURI: "ipfs://..." - }); - console.log(`✅ Community launched: ${communityId}`); -} catch (error) { - console.error(`❌ Failed: ${error.message}`); -} -``` diff --git a/api/@aastar/community/index.md b/api/@aastar/community/index.md deleted file mode 100644 index 41a7d85d0..000000000 --- a/api/@aastar/community/index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Classes - -- [CommunityClient](classes/CommunityClient.md) - -## Interfaces - -- [CommunityLaunchConfig](interfaces/CommunityLaunchConfig.md) -- [CommunityStats](interfaces/CommunityStats.md) -- [SBTRuleConfig](interfaces/SBTRuleConfig.md) -- [XPNTsIssuanceParams](interfaces/XPNTsIssuanceParams.md) diff --git a/api/@aastar/community/interfaces/CommunityLaunchConfig.md b/api/@aastar/community/interfaces/CommunityLaunchConfig.md deleted file mode 100644 index a48987361..000000000 --- a/api/@aastar/community/interfaces/CommunityLaunchConfig.md +++ /dev/null @@ -1,67 +0,0 @@ -Defined in: [index.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L11) - -Community configuration for launch - -## Properties - -### description? - -> `optional` **description**: `string` - -Defined in: [index.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L15) - -*** - -### ensName? - -> `optional` **ensName**: `string` - -Defined in: [index.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L13) - -*** - -### entryBurn? - -> `optional` **entryBurn**: `bigint` - -Defined in: [index.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L18) - -*** - -### logoURI? - -> `optional` **logoURI**: `string` - -Defined in: [index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L16) - -*** - -### name - -> **name**: `string` - -Defined in: [index.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L12) - -*** - -### sbtRules? - -> `optional` **sbtRules**: [`SBTRuleConfig`](SBTRuleConfig.md) - -Defined in: [index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L19) - -*** - -### stakeAmount - -> **stakeAmount**: `bigint` - -Defined in: [index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L17) - -*** - -### website? - -> `optional` **website**: `string` - -Defined in: [index.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L14) diff --git a/api/@aastar/community/interfaces/CommunityStats.md b/api/@aastar/community/interfaces/CommunityStats.md deleted file mode 100644 index 6b762e3f2..000000000 --- a/api/@aastar/community/interfaces/CommunityStats.md +++ /dev/null @@ -1,35 +0,0 @@ -Defined in: [index.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L43) - -Community statistics - -## Properties - -### reputationAvg - -> **reputationAvg**: `number` - -Defined in: [index.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L47) - -*** - -### totalMembers - -> **totalMembers**: `number` - -Defined in: [index.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L44) - -*** - -### totalStaked - -> **totalStaked**: `bigint` - -Defined in: [index.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L45) - -*** - -### xpntsSupply - -> **xpntsSupply**: `bigint` - -Defined in: [index.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L46) diff --git a/api/@aastar/community/interfaces/SBTRuleConfig.md b/api/@aastar/community/interfaces/SBTRuleConfig.md deleted file mode 100644 index b7cd0b98b..000000000 --- a/api/@aastar/community/interfaces/SBTRuleConfig.md +++ /dev/null @@ -1,27 +0,0 @@ -Defined in: [index.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L25) - -SBT minting rules configuration - -## Properties - -### maxSupply - -> **maxSupply**: `bigint` - -Defined in: [index.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L27) - -*** - -### minStake - -> **minStake**: `bigint` - -Defined in: [index.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L26) - -*** - -### mintPrice - -> **mintPrice**: `bigint` - -Defined in: [index.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L28) diff --git a/api/@aastar/community/interfaces/XPNTsIssuanceParams.md b/api/@aastar/community/interfaces/XPNTsIssuanceParams.md deleted file mode 100644 index e332e0436..000000000 --- a/api/@aastar/community/interfaces/XPNTsIssuanceParams.md +++ /dev/null @@ -1,27 +0,0 @@ -Defined in: [index.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L34) - -xPNTs issuance parameters - -## Properties - -### exchangeRate - -> **exchangeRate**: `bigint` - -Defined in: [index.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L37) - -*** - -### initialSupply - -> **initialSupply**: `bigint` - -Defined in: [index.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L36) - -*** - -### symbol - -> **symbol**: `string` - -Defined in: [index.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/community/src/index.ts#L35) diff --git a/api/@aastar/core/classes/BLSSigner.md b/api/@aastar/core/classes/BLSSigner.md index 6742d1790..5ff9c60e3 100644 --- a/api/@aastar/core/classes/BLSSigner.md +++ b/api/@aastar/core/classes/BLSSigner.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/crypto/blsSigner.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L9) +Defined in: [packages/core/src/crypto/blsSigner.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L9) BLS Signer for Registry reputation updates and DVT operations @@ -10,7 +10,7 @@ Uses BLS12-381 curve for signature aggregation > **new BLSSigner**(`privateKeyHex`): `BLSSigner` -Defined in: [packages/core/src/crypto/blsSigner.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L12) +Defined in: [packages/core/src/crypto/blsSigner.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L12) #### Parameters @@ -28,7 +28,7 @@ Defined in: [packages/core/src/crypto/blsSigner.ts:12](https://github.com/AAStar > **getPublicKey**(): `` `0x${string}` `` -Defined in: [packages/core/src/crypto/blsSigner.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L31) +Defined in: [packages/core/src/crypto/blsSigner.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L31) Get BLS public key @@ -44,7 +44,7 @@ Public key as hex string > **sign**(`message`): `` `0x${string}` `` -Defined in: [packages/core/src/crypto/blsSigner.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L21) +Defined in: [packages/core/src/crypto/blsSigner.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L21) Sign a message with BLS private key @@ -66,7 +66,7 @@ BLS signature as hex string > `static` **aggregatePublicKeys**(`pubKeys`): `` `0x${string}` `` -Defined in: [packages/core/src/crypto/blsSigner.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L52) +Defined in: [packages/core/src/crypto/blsSigner.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L52) Aggregate multiple BLS public keys @@ -88,7 +88,7 @@ Aggregated public key (uncompressed G1 - 96 bytes for EVM) > `static` **aggregateSignatures**(`signatures`): `` `0x${string}` `` -Defined in: [packages/core/src/crypto/blsSigner.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L41) +Defined in: [packages/core/src/crypto/blsSigner.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L41) Aggregate multiple BLS signatures @@ -110,7 +110,7 @@ Aggregated signature > `static` **verify**(`message`, `signature`, `publicKey`): `boolean` -Defined in: [packages/core/src/crypto/blsSigner.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L65) +Defined in: [packages/core/src/crypto/blsSigner.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L65) Verify a BLS signature diff --git a/api/@aastar/core/classes/BaseClient.md b/api/@aastar/core/classes/BaseClient.md index 7cc78154a..93d6e8f0d 100644 --- a/api/@aastar/core/classes/BaseClient.md +++ b/api/@aastar/core/classes/BaseClient.md @@ -1,12 +1,4 @@ -Defined in: [packages/core/src/clients/BaseClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L5) - -## Extended by - -- [`CommunityClient`](../../enduser/classes/CommunityClient.md) -- [`UserClient`](../../enduser/classes/UserClient.md) -- [`UserLifecycle`](../../enduser/classes/UserLifecycle.md) -- [`PaymasterOperatorClient`](../../operator/classes/PaymasterOperatorClient.md) -- [`ProtocolClient`](../../operator/classes/ProtocolClient.md) +Defined in: [packages/core/src/clients/BaseClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L5) ## Constructors @@ -14,7 +6,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:5](https://github.com/AASta > **new BaseClient**(`config`): `BaseClient` -Defined in: [packages/core/src/clients/BaseClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L14) +Defined in: [packages/core/src/clients/BaseClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L14) #### Parameters @@ -32,7 +24,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:14](https://github.com/AASt > **client**: [`WalletClient`](../interfaces/WalletClient.md) -Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L6) +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) *** @@ -40,7 +32,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AASta > `protected` `optional` **entryPointAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L12) +Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L12) *** @@ -48,7 +40,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AASt > `protected` `optional` **gTokenAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L9) +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) *** @@ -56,7 +48,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AASta > `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L10) +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) *** @@ -64,7 +56,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AASt > `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L11) +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) *** @@ -72,7 +64,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AASt > `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) -Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L7) +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) *** @@ -80,7 +72,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AASta > `protected` `optional` **registryAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L8) +Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L8) ## Methods @@ -88,7 +80,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AASta > **getAddress**(): `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L34) +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) Get the account address of the connected wallet @@ -102,7 +94,7 @@ Get the account address of the connected wallet > **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> -Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L41) +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) Helper to ensure public client exists or fallback to wallet client (if it supports read) @@ -116,7 +108,7 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > `protected` **requireEntryPoint**(): `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L73) +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) #### Returns @@ -128,7 +120,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AASt > `protected` **requireGToken**(): `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L52) +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) #### Returns @@ -140,7 +132,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AASt > `protected` **requireGTokenStaking**(): `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L59) +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) #### Returns @@ -152,7 +144,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AASt > `protected` **requirePaymasterFactory**(): `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L66) +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) #### Returns @@ -164,7 +156,7 @@ Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AASt > `protected` **requireRegistry**(): `` `0x${string}` `` -Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BaseClient.ts#L45) +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) #### Returns diff --git a/api/@aastar/core/classes/BundlerClient.md b/api/@aastar/core/classes/BundlerClient.md index d644c3cf9..33c07d8ff 100644 --- a/api/@aastar/core/classes/BundlerClient.md +++ b/api/@aastar/core/classes/BundlerClient.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/clients/BundlerClient.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L31) +Defined in: [packages/core/src/clients/BundlerClient.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L31) BundlerClient Low-level JSON-RPC client for ERC-4337 Bundlers. @@ -9,7 +9,7 @@ Low-level JSON-RPC client for ERC-4337 Bundlers. > **new BundlerClient**(`url`, `entryPoint`): `BundlerClient` -Defined in: [packages/core/src/clients/BundlerClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L32) +Defined in: [packages/core/src/clients/BundlerClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L32) #### Parameters @@ -28,7 +28,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:32](https://github.com/A > `readonly` **entryPoint**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L34) +Defined in: [packages/core/src/clients/BundlerClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L34) *** @@ -36,7 +36,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:34](https://github.com/A > `readonly` **url**: `string` -Defined in: [packages/core/src/clients/BundlerClient.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L33) +Defined in: [packages/core/src/clients/BundlerClient.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L33) ## Methods @@ -44,7 +44,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:33](https://github.com/A > **estimateUserOperationGas**(`userOp`): `Promise`\<`any`\> -Defined in: [packages/core/src/clients/BundlerClient.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L115) +Defined in: [packages/core/src/clients/BundlerClient.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L115) eth_estimateUserOperationGas @@ -64,7 +64,7 @@ eth_estimateUserOperationGas > **getUserOperationByHash**(`hash`): `Promise`\<`any`\> -Defined in: [packages/core/src/clients/BundlerClient.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L129) +Defined in: [packages/core/src/clients/BundlerClient.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L129) eth_getUserOperationByHash @@ -84,7 +84,7 @@ eth_getUserOperationByHash > **getUserOperationReceipt**(`hash`): `Promise`\<`any`\> -Defined in: [packages/core/src/clients/BundlerClient.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L122) +Defined in: [packages/core/src/clients/BundlerClient.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L122) eth_getUserOperationReceipt (v0.7 support prep) @@ -104,7 +104,7 @@ eth_getUserOperationReceipt (v0.7 support prep) > **sendUserOperation**(`userOp`): `Promise`\<`` `0x${string}` ``\> -Defined in: [packages/core/src/clients/BundlerClient.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L108) +Defined in: [packages/core/src/clients/BundlerClient.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L108) eth_sendUserOperation diff --git a/api/@aastar/core/classes/ContractConfigManager.md b/api/@aastar/core/classes/ContractConfigManager.md index 4a504e2aa..47670e33a 100644 --- a/api/@aastar/core/classes/ContractConfigManager.md +++ b/api/@aastar/core/classes/ContractConfigManager.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/config/ContractConfigManager.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L14) +Defined in: [packages/core/src/config/ContractConfigManager.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L14) ## Constructors @@ -16,7 +16,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:14](https://githu > `static` **getConfig**(): [`SuperPaymasterConfig`](../interfaces/SuperPaymasterConfig.md) -Defined in: [packages/core/src/config/ContractConfigManager.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L18) +Defined in: [packages/core/src/config/ContractConfigManager.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L18) Get validated core configuration diff --git a/api/@aastar/core/classes/RequirementChecker.md b/api/@aastar/core/classes/RequirementChecker.md index 98fd9017f..34a60f6da 100644 --- a/api/@aastar/core/classes/RequirementChecker.md +++ b/api/@aastar/core/classes/RequirementChecker.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/requirementChecker.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L43) +Defined in: [packages/core/src/requirementChecker.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L99) Requirement Checker Utility @@ -30,7 +30,7 @@ if (!result.hasEnoughGToken) { > **new RequirementChecker**(`publicClient`, `addresses?`): `RequirementChecker` -Defined in: [packages/core/src/requirementChecker.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L44) +Defined in: [packages/core/src/requirementChecker.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L100) #### Parameters @@ -53,7 +53,7 @@ Defined in: [packages/core/src/requirementChecker.ts:44](https://github.com/AASt > **checkAPNTsBalance**(`address`, `required`): `Promise`\<\{ `balance`: `bigint`; `hasEnough`: `boolean`; \}\> -Defined in: [packages/core/src/requirementChecker.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L183) +Defined in: [packages/core/src/requirementChecker.ts:239](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L239) Check aPNTs balance only (shortcut) @@ -74,7 +74,7 @@ Check aPNTs balance only (shortcut) > **checkGTokenBalance**(`address`, `required`): `Promise`\<\{ `balance`: `bigint`; `hasEnough`: `boolean`; \}\> -Defined in: [packages/core/src/requirementChecker.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L162) +Defined in: [packages/core/src/requirementChecker.ts:218](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L218) Check GToken balance only (shortcut) @@ -95,7 +95,7 @@ Check GToken balance only (shortcut) > **checkHasRole**(`roleId`, `address`): `Promise`\<`boolean`\> -Defined in: [packages/core/src/requirementChecker.ts:219](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L219) +Defined in: [packages/core/src/requirementChecker.ts:275](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L275) Check if user has specific role (shortcut) @@ -116,7 +116,7 @@ Check if user has specific role (shortcut) > **checkHasSBT**(`address`): `Promise`\<`boolean`\> -Defined in: [packages/core/src/requirementChecker.ts:204](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L204) +Defined in: [packages/core/src/requirementChecker.ts:260](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L260) Check if user has MySBT (shortcut) @@ -136,7 +136,7 @@ Check if user has MySBT (shortcut) > **checkRequirements**(`params`): `Promise`\<[`RoleRequirement`](../interfaces/RoleRequirement.md)\> -Defined in: [packages/core/src/requirementChecker.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/requirementChecker.ts#L62) +Defined in: [packages/core/src/requirementChecker.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L118) Check all requirements for a user @@ -156,3 +156,56 @@ Check all requirements for a user `Promise`\<[`RoleRequirement`](../interfaces/RoleRequirement.md)\> Detailed requirement status + +*** + +### checkResources() + +> **checkResources**(`wallet`, `mode`, `options`): `Promise`\<[`ResourceReport`](../interfaces/ResourceReport.md)\> + +Defined in: [packages/core/src/requirementChecker.ts:321](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L321) + +Aggregated readiness query for an operator onboarding mode. + +Composes the existing `check*` shortcuts into a single structured report, +so consumers (e.g. YAA) no longer need to wire each balance/role/SBT read +by hand. Each unmet requirement produces an actionable `issue` string. + +- `AOA` — independent paymaster operator: checks `ROLE_PAYMASTER_AOA` + role stake. +- `AOA+` — shared SuperPaymaster operator: checks `ROLE_PAYMASTER_SUPER` + role stake + SBT. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `wallet` | `` `0x${string}` `` | Operator address to evaluate. | +| `mode` | [`OperatorMode`](../type-aliases/OperatorMode.md) | Onboarding mode (`'AOA'` | `'AOA+'`). | +| `options` | [`CheckResourcesOptions`](../interfaces/CheckResourcesOptions.md) | Optional threshold overrides. | + +#### Returns + +`Promise`\<[`ResourceReport`](../interfaces/ResourceReport.md)\> + +A [ResourceReport](../interfaces/ResourceReport.md); `ready` is true iff `issues` is empty. + +*** + +### checkRoleStake() + +> **checkRoleStake**(`roleId`, `address`, `required`): `Promise`\<\{ `hasEnough`: `boolean`; `staked`: `bigint`; \}\> + +Defined in: [packages/core/src/requirementChecker.ts:288](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L288) + +Check a user's on-chain role stake (`getRoleStake(roleId, operator)`) (shortcut). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `address` | `` `0x${string}` `` | +| `required` | `bigint` | + +#### Returns + +`Promise`\<\{ `hasEnough`: `boolean`; `staked`: `bigint`; \}\> diff --git a/api/@aastar/core/classes/SepoliaFaucetAPI.md b/api/@aastar/core/classes/SepoliaFaucetAPI.md index 90acb92a2..1b5b224ee 100644 --- a/api/@aastar/core/classes/SepoliaFaucetAPI.md +++ b/api/@aastar/core/classes/SepoliaFaucetAPI.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/faucet.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L36) +Defined in: [packages/core/src/actions/faucet.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L36) SepoliaFaucetAPI provides orchestration for setting up test accounts on Sepolia/Anvil. @@ -18,7 +18,7 @@ SepoliaFaucetAPI provides orchestration for setting up test accounts on Sepolia/ > `static` **adminDepositForUser**(`adminWallet`, `publicClient`, `paymasterAddr`, `target`, `tokenAddr`, `amount`): `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/faucet.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L229) +Defined in: [packages/core/src/actions/faucet.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L229) Admin mints tokens to self, approves Paymaster, and deposits FOR user. @@ -26,7 +26,7 @@ Admin mints tokens to self, approves Paymaster, and deposits FOR user. | Parameter | Type | Description | | ------ | ------ | ------ | -| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | | `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | | `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | | `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | @@ -40,14 +40,14 @@ Admin mints tokens to self, approves Paymaster, and deposits FOR user. | `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | | `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | | `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | -| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | | `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | | `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | | `adminWallet.key` | `string` | A key for the client. | | `adminWallet.name` | `string` | A name for the client. | | `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | | `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | -| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | | `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | @@ -70,7 +70,7 @@ Admin mints tokens to self, approves Paymaster, and deposits FOR user. | `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | | `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | | `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | -| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | | `publicClient.account` | `undefined` | The Account of the Client. | | `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | | `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | @@ -120,7 +120,7 @@ Admin mints tokens to self, approves Paymaster, and deposits FOR user. | `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | | `publicClient.name` | `string` | A name for the client. | | `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | -| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | | `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | @@ -158,7 +158,7 @@ Admin mints tokens to self, approves Paymaster, and deposits FOR user. > `static` **fundETH**(`adminWallet`, `publicClient`, `target`, `amount`): `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/faucet.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L99) +Defined in: [packages/core/src/actions/faucet.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L99) Funds the target with ETH if balance is below threshold. @@ -166,7 +166,7 @@ Funds the target with ETH if balance is below threshold. | Parameter | Type | Description | | ------ | ------ | ------ | -| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | | `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | | `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | | `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | @@ -180,14 +180,14 @@ Funds the target with ETH if balance is below threshold. | `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | | `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | | `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | -| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | | `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | | `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | | `adminWallet.key` | `string` | A key for the client. | | `adminWallet.name` | `string` | A name for the client. | | `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | | `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | -| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | | `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | @@ -210,7 +210,7 @@ Funds the target with ETH if balance is below threshold. | `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | | `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | | `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | -| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | | `publicClient.account` | `undefined` | The Account of the Client. | | `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | | `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | @@ -260,7 +260,7 @@ Funds the target with ETH if balance is below threshold. | `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | | `publicClient.name` | `string` | A name for the client. | | `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | -| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | | `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | @@ -296,7 +296,7 @@ Funds the target with ETH if balance is below threshold. > `static` **mintTestTokens**(`adminWallet`, `publicClient`, `tokenAddr`, `target`, `amount`): `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/faucet.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L195) +Defined in: [packages/core/src/actions/faucet.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L195) Mints tokens directly to the target. @@ -304,7 +304,7 @@ Mints tokens directly to the target. | Parameter | Type | Description | | ------ | ------ | ------ | -| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | | `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | | `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | | `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | @@ -318,14 +318,14 @@ Mints tokens directly to the target. | `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | | `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | | `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | -| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | | `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | | `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | | `adminWallet.key` | `string` | A key for the client. | | `adminWallet.name` | `string` | A name for the client. | | `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | | `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | -| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | | `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | @@ -348,7 +348,7 @@ Mints tokens directly to the target. | `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | | `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | | `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | -| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | | `publicClient.account` | `undefined` | The Account of the Client. | | `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | | `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | @@ -398,7 +398,7 @@ Mints tokens directly to the target. | `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | | `publicClient.name` | `string` | A name for the client. | | `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | -| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | | `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | @@ -435,7 +435,7 @@ Mints tokens directly to the target. > `static` **prepareTestAccount**(`adminWallet`, `publicClient`, `config`): `Promise`\<[`FaucetPreparationResult`](../type-aliases/FaucetPreparationResult.md)\> -Defined in: [packages/core/src/actions/faucet.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L45) +Defined in: [packages/core/src/actions/faucet.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L45) Orchestrates the complete setup for a test account. 1. Funds ETH @@ -447,7 +447,7 @@ Orchestrates the complete setup for a test account. | Parameter | Type | Description | | ------ | ------ | ------ | -| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | | `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | | `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | | `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | @@ -461,14 +461,14 @@ Orchestrates the complete setup for a test account. | `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | | `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | | `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | -| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | | `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | | `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | | `adminWallet.key` | `string` | A key for the client. | | `adminWallet.name` | `string` | A name for the client. | | `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | | `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | -| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | | `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | @@ -491,7 +491,7 @@ Orchestrates the complete setup for a test account. | `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | | `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | | `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | -| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | | `publicClient.account` | `undefined` | The Account of the Client. | | `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | | `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | @@ -541,7 +541,7 @@ Orchestrates the complete setup for a test account. | `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | | `publicClient.name` | `string` | A name for the client. | | `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | -| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | | `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | @@ -576,7 +576,7 @@ Orchestrates the complete setup for a test account. > `static` **registerEndUser**(`adminWallet`, `publicClient`, `registryAddr`, `target`, `gasToken`): `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/faucet.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L128) +Defined in: [packages/core/src/actions/faucet.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L128) Registers the ENDUSER role using Sponsor Mode (Admin pays stake). @@ -584,7 +584,7 @@ Registers the ENDUSER role using Sponsor Mode (Admin pays stake). | Parameter | Type | Description | | ------ | ------ | ------ | -| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | | `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | | `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | | `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | @@ -598,14 +598,14 @@ Registers the ENDUSER role using Sponsor Mode (Admin pays stake). | `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | | `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | | `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | -| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | | `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | | `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | | `adminWallet.key` | `string` | A key for the client. | | `adminWallet.name` | `string` | A name for the client. | | `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | | `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | -| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | | `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | @@ -628,7 +628,7 @@ Registers the ENDUSER role using Sponsor Mode (Admin pays stake). | `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | | `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | | `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | -| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | | `publicClient.account` | `undefined` | The Account of the Client. | | `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | | `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | @@ -678,7 +678,7 @@ Registers the ENDUSER role using Sponsor Mode (Admin pays stake). | `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | | `publicClient.name` | `string` | A name for the client. | | `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | -| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | | `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | diff --git a/api/@aastar/core/classes/StateValidator.md b/api/@aastar/core/classes/StateValidator.md index 5e6f6552d..acd8b1f7d 100644 --- a/api/@aastar/core/classes/StateValidator.md +++ b/api/@aastar/core/classes/StateValidator.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L44) +Defined in: [packages/core/src/actions/StateValidator.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L44) ## Constructors @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:44](https://github.com/ > `static` **getAccountBalances**(`params`): `Promise`\<[`AccountBalance`](../interfaces/AccountBalance.md)[]\> -Defined in: [packages/core/src/actions/StateValidator.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L58) +Defined in: [packages/core/src/actions/StateValidator.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L58) Batch fetch balances for multiple accounts @@ -42,7 +42,7 @@ Batch fetch balances for multiple accounts > `static` **validateDeployment**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> -Defined in: [packages/core/src/actions/StateValidator.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L232) +Defined in: [packages/core/src/actions/StateValidator.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L232) Deployment Validation @@ -62,7 +62,7 @@ Deployment Validation > `static` **validateETHBalance**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> -Defined in: [packages/core/src/actions/StateValidator.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L153) +Defined in: [packages/core/src/actions/StateValidator.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L153) ETH Balance Validation @@ -82,7 +82,7 @@ ETH Balance Validation > `static` **validateRole**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> -Defined in: [packages/core/src/actions/StateValidator.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L114) +Defined in: [packages/core/src/actions/StateValidator.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L114) Role Validation @@ -102,7 +102,7 @@ Role Validation > `static` **validateTokenBalance**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> -Defined in: [packages/core/src/actions/StateValidator.ts:189](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L189) +Defined in: [packages/core/src/actions/StateValidator.ts:189](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L189) Token Balance Validation diff --git a/api/@aastar/core/enumerations/AuthorizationState.md b/api/@aastar/core/enumerations/AuthorizationState.md new file mode 100644 index 000000000..27c1fc687 --- /dev/null +++ b/api/@aastar/core/enumerations/AuthorizationState.md @@ -0,0 +1,25 @@ +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L6) + +## Enumeration Members + +### Canceled + +> **Canceled**: `2` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L9) + +*** + +### Unused + +> **Unused**: `0` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L7) + +*** + +### Used + +> **Used**: `1` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L8) diff --git a/api/@aastar/core/enumerations/EntryPointVersion.md b/api/@aastar/core/enumerations/EntryPointVersion.md index ef53a025d..7b221956f 100644 --- a/api/@aastar/core/enumerations/EntryPointVersion.md +++ b/api/@aastar/core/enumerations/EntryPointVersion.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/entryPoint.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L6) +Defined in: [packages/core/src/actions/entryPoint.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L6) ## Enumeration Members @@ -6,7 +6,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:6](https://github.com/AASta > **V06**: `"0.6"` -Defined in: [packages/core/src/actions/entryPoint.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L7) +Defined in: [packages/core/src/actions/entryPoint.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L7) *** @@ -14,4 +14,4 @@ Defined in: [packages/core/src/actions/entryPoint.ts:7](https://github.com/AASta > **V07**: `"0.7"` -Defined in: [packages/core/src/actions/entryPoint.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L8) +Defined in: [packages/core/src/actions/entryPoint.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L8) diff --git a/api/@aastar/core/enumerations/NodeType.md b/api/@aastar/core/enumerations/NodeType.md index c4d0933b4..c1dfa107c 100644 --- a/api/@aastar/core/enumerations/NodeType.md +++ b/api/@aastar/core/enumerations/NodeType.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/communities.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L8) +Defined in: [packages/core/src/communities.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L8) ## Enumeration Members @@ -6,7 +6,7 @@ Defined in: [packages/core/src/communities.ts:8](https://github.com/AAStarCommun > **ANODE**: `2` -Defined in: [packages/core/src/communities.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L11) +Defined in: [packages/core/src/communities.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L11) *** @@ -14,7 +14,7 @@ Defined in: [packages/core/src/communities.ts:11](https://github.com/AAStarCommu > **KMS**: `3` -Defined in: [packages/core/src/communities.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L12) +Defined in: [packages/core/src/communities.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L12) *** @@ -22,7 +22,7 @@ Defined in: [packages/core/src/communities.ts:12](https://github.com/AAStarCommu > **PAYMASTER\_AOA**: `0` -Defined in: [packages/core/src/communities.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L9) +Defined in: [packages/core/src/communities.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L9) *** @@ -30,4 +30,4 @@ Defined in: [packages/core/src/communities.ts:9](https://github.com/AAStarCommun > **PAYMASTER\_SUPER**: `1` -Defined in: [packages/core/src/communities.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L10) +Defined in: [packages/core/src/communities.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L10) diff --git a/api/@aastar/core/enumerations/PolicyDecision.md b/api/@aastar/core/enumerations/PolicyDecision.md new file mode 100644 index 000000000..d58edbef1 --- /dev/null +++ b/api/@aastar/core/enumerations/PolicyDecision.md @@ -0,0 +1,32 @@ +Defined in: [packages/core/src/actions/policyRegistry.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L14) + +Tri-state result of a validation-time policy read (checkPolicy). +Mirrors `IPolicyRegistry.PolicyDecision` (the on-chain `uint8` enum): + 0 ALLOW — proceed with normal single-signature validation. + 1 REQUIRE_DVT — within the hard ceiling but past a configured DVT trigger; the + consumer MUST additionally verify a >=threshold DVT BLS co-sign. + 2 REJECT — frozen sender, over a hard cap / daily limit, or off-allowlist. + +## Enumeration Members + +### ALLOW + +> **ALLOW**: `0` + +Defined in: [packages/core/src/actions/policyRegistry.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L15) + +*** + +### REJECT + +> **REJECT**: `2` + +Defined in: [packages/core/src/actions/policyRegistry.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L17) + +*** + +### REQUIRE\_DVT + +> **REQUIRE\_DVT**: `1` + +Defined in: [packages/core/src/actions/policyRegistry.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L16) diff --git a/api/@aastar/core/enumerations/RolePermissionLevel.md b/api/@aastar/core/enumerations/RolePermissionLevel.md index f87754e2b..56000587c 100644 --- a/api/@aastar/core/enumerations/RolePermissionLevel.md +++ b/api/@aastar/core/enumerations/RolePermissionLevel.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/roles.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L149) +Defined in: [packages/core/src/roles.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L149) Role permission levels (for UI sorting/filtering) @@ -8,7 +8,7 @@ Role permission levels (for UI sorting/filtering) > **COMMUNITY**: `30` -Defined in: [packages/core/src/roles.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L153) +Defined in: [packages/core/src/roles.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L153) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/roles.ts:153](https://github.com/AAStarCommunity/ > **KMS**: `80` -Defined in: [packages/core/src/roles.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L151) +Defined in: [packages/core/src/roles.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L151) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/roles.ts:151](https://github.com/AAStarCommunity/ > **OPERATOR**: `50` -Defined in: [packages/core/src/roles.ts:152](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L152) +Defined in: [packages/core/src/roles.ts:152](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L152) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/roles.ts:152](https://github.com/AAStarCommunity/ > **PROTOCOL**: `100` -Defined in: [packages/core/src/roles.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L150) +Defined in: [packages/core/src/roles.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L150) *** @@ -40,4 +40,4 @@ Defined in: [packages/core/src/roles.ts:150](https://github.com/AAStarCommunity/ > **USER**: `10` -Defined in: [packages/core/src/roles.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L154) +Defined in: [packages/core/src/roles.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L154) diff --git a/api/@aastar/core/functions/accountActions.md b/api/@aastar/core/functions/accountActions.md index 8585386cb..375dd7a4e 100644 --- a/api/@aastar/core/functions/accountActions.md +++ b/api/@aastar/core/functions/accountActions.md @@ -1,6 +1,6 @@ > **accountActions**(`address`): (`client`) => [`AccountActions`](../type-aliases/AccountActions.md) -Defined in: [packages/core/src/actions/account.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L24) +Defined in: [packages/core/src/actions/account.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L24) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/account.ts:24](https://github.com/AAStarC | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/accountFactoryActions.md b/api/@aastar/core/functions/accountFactoryActions.md index 8f858d4c9..08c34bea4 100644 --- a/api/@aastar/core/functions/accountFactoryActions.md +++ b/api/@aastar/core/functions/accountFactoryActions.md @@ -1,6 +1,6 @@ > **accountFactoryActions**(`address`, `abi`): (`client`) => [`AccountFactoryActions`](../type-aliases/AccountFactoryActions.md) -Defined in: [packages/core/src/actions/account.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L158) +Defined in: [packages/core/src/actions/account.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L158) ## Parameters @@ -17,7 +17,7 @@ Defined in: [packages/core/src/actions/account.ts:158](https://github.com/AAStar | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/agentActions.md b/api/@aastar/core/functions/agentActions.md new file mode 100644 index 000000000..de269ff1f --- /dev/null +++ b/api/@aastar/core/functions/agentActions.md @@ -0,0 +1,23 @@ +> **agentActions**(`address`): (`client`) => [`AgentActions`](../type-aliases/AgentActions.md) + +Defined in: [packages/core/src/actions/agent.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L29) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AgentActions`](../type-aliases/AgentActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AgentActions`](../type-aliases/AgentActions.md) diff --git a/api/@aastar/core/functions/agentRegistryActions.md b/api/@aastar/core/functions/agentRegistryActions.md new file mode 100644 index 000000000..a135f14e1 --- /dev/null +++ b/api/@aastar/core/functions/agentRegistryActions.md @@ -0,0 +1,23 @@ +> **agentRegistryActions**(`address`): (`client`) => [`AgentRegistryActions`](../type-aliases/AgentRegistryActions.md) + +Defined in: [packages/core/src/actions/agentRegistry.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L52) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AgentRegistryActions`](../type-aliases/AgentRegistryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AgentRegistryActions`](../type-aliases/AgentRegistryActions.md) diff --git a/api/@aastar/core/functions/aggregatorActions.md b/api/@aastar/core/functions/aggregatorActions.md index bd690d73b..151e9d67f 100644 --- a/api/@aastar/core/functions/aggregatorActions.md +++ b/api/@aastar/core/functions/aggregatorActions.md @@ -1,6 +1,6 @@ > **aggregatorActions**(`address`): (`client`) => [`AggregatorActions`](../type-aliases/AggregatorActions.md) -Defined in: [packages/core/src/actions/aggregator.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L45) +Defined in: [packages/core/src/actions/aggregator.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L72) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:45](https://github.com/AASt | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/airAccountActions.md b/api/@aastar/core/functions/airAccountActions.md new file mode 100644 index 000000000..636657014 --- /dev/null +++ b/api/@aastar/core/functions/airAccountActions.md @@ -0,0 +1,23 @@ +> **airAccountActions**(`address`): (`client`) => [`AirAccountActions`](../type-aliases/AirAccountActions.md) + +Defined in: [packages/core/src/actions/airAccount.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L87) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AirAccountActions`](../type-aliases/AirAccountActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AirAccountActions`](../type-aliases/AirAccountActions.md) diff --git a/api/@aastar/core/functions/airAccountFactoryActions.md b/api/@aastar/core/functions/airAccountFactoryActions.md new file mode 100644 index 000000000..56b1dda6c --- /dev/null +++ b/api/@aastar/core/functions/airAccountFactoryActions.md @@ -0,0 +1,23 @@ +> **airAccountFactoryActions**(`address`): (`client`) => [`AirAccountFactoryActions`](../type-aliases/AirAccountFactoryActions.md) + +Defined in: [packages/core/src/actions/airAccountFactory.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L54) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AirAccountFactoryActions`](../type-aliases/AirAccountFactoryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AirAccountFactoryActions`](../type-aliases/AirAccountFactoryActions.md) diff --git a/api/@aastar/core/functions/applyConfig.md b/api/@aastar/core/functions/applyConfig.md index 534307bd2..ce752e84e 100644 --- a/api/@aastar/core/functions/applyConfig.md +++ b/api/@aastar/core/functions/applyConfig.md @@ -1,6 +1,6 @@ > **applyConfig**(`newConfig`): `void` -Defined in: [packages/core/src/constants.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L48) +Defined in: [packages/core/src/constants.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L51) Apply external configuration (for Node.js environment) diff --git a/api/@aastar/core/functions/blsAlgorithmActions.md b/api/@aastar/core/functions/blsAlgorithmActions.md new file mode 100644 index 000000000..cc29d29bc --- /dev/null +++ b/api/@aastar/core/functions/blsAlgorithmActions.md @@ -0,0 +1,27 @@ +> **blsAlgorithmActions**(`address`): (`client`) => [`BLSAlgorithmActions`](../type-aliases/BLSAlgorithmActions.md) + +Defined in: [packages/core/src/actions/blsAlgorithm.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/blsAlgorithm.ts#L19) + +AAStarBLSAlgorithm — the on-chain DVT combined-signature verifier. Pair with +`dvtWire.encodeDVTVerifierProof()` (which builds `proof`) to verify an SDK-assembled +DVT co-signature on-chain via the SDK rather than a hand-written ABI call. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`BLSAlgorithmActions`](../type-aliases/BLSAlgorithmActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`BLSAlgorithmActions`](../type-aliases/BLSAlgorithmActions.md) diff --git a/api/@aastar/core/functions/channelActions.md b/api/@aastar/core/functions/channelActions.md new file mode 100644 index 000000000..959fa059c --- /dev/null +++ b/api/@aastar/core/functions/channelActions.md @@ -0,0 +1,23 @@ +> **channelActions**(`address`): (`client`) => [`ChannelActions`](../type-aliases/ChannelActions.md) + +Defined in: [packages/core/src/actions/channel.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L64) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`ChannelActions`](../type-aliases/ChannelActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`ChannelActions`](../type-aliases/ChannelActions.md) diff --git a/api/@aastar/core/functions/createAAStarPublicClient.md b/api/@aastar/core/functions/createAAStarPublicClient.md index 3fef20ea3..7b3ae7c1e 100644 --- a/api/@aastar/core/functions/createAAStarPublicClient.md +++ b/api/@aastar/core/functions/createAAStarPublicClient.md @@ -1,6 +1,6 @@ > **createAAStarPublicClient**(`rpcUrl`, `chain`): [`PublicClient`](../interfaces/PublicClient.md) -Defined in: [packages/core/src/clients.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients.ts#L8) +Defined in: [packages/core/src/clients.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients.ts#L8) Creates a standard AAStar public client for any given chain. diff --git a/api/@aastar/core/functions/createHeliosTransport.md b/api/@aastar/core/functions/createHeliosTransport.md new file mode 100644 index 000000000..247675fb6 --- /dev/null +++ b/api/@aastar/core/functions/createHeliosTransport.md @@ -0,0 +1,19 @@ +> **createHeliosTransport**(`config`): `Promise`\<[`CustomTransport`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/transports/helios.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L62) + +Create a viem custom transport backed by the Helios light client. + +Helios is lazy-initialized on the first RPC request so the WASM module +loads only when needed. The returned transport is safe to pass directly +to `createPublicClient`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`HeliosTransportConfig`](../interfaces/HeliosTransportConfig.md) | + +## Returns + +`Promise`\<[`CustomTransport`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/functions/describeSupportedChains.md b/api/@aastar/core/functions/describeSupportedChains.md new file mode 100644 index 000000000..397450056 --- /dev/null +++ b/api/@aastar/core/functions/describeSupportedChains.md @@ -0,0 +1,11 @@ +> **describeSupportedChains**(): `string` + +Defined in: [packages/core/src/addresses.ts:251](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L251) + +A friendly, human-readable list of the supported chains for error messages — +e.g. `"OP Mainnet (10), Sepolia (11155111), OP Sepolia (11155420)"`. Names come +from viem/chains so callers recognize them by the same label viem uses. + +## Returns + +`string` diff --git a/api/@aastar/core/functions/dvtActions.md b/api/@aastar/core/functions/dvtActions.md index 562ff3608..bed66072e 100644 --- a/api/@aastar/core/functions/dvtActions.md +++ b/api/@aastar/core/functions/dvtActions.md @@ -1,6 +1,6 @@ > **dvtActions**(`address`): (`client`) => [`DVTActions`](../type-aliases/DVTActions.md) -Defined in: [packages/core/src/actions/dvt.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L33) +Defined in: [packages/core/src/actions/dvt.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L38) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/dvt.ts:33](https://github.com/AAStarCommu | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/encodeDVTAccountSignature.md b/api/@aastar/core/functions/encodeDVTAccountSignature.md new file mode 100644 index 000000000..f6c0144d6 --- /dev/null +++ b/api/@aastar/core/functions/encodeDVTAccountSignature.md @@ -0,0 +1,21 @@ +> **encodeDVTAccountSignature**(`params`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L201) + +Encode the ACCOUNT-LEVEL combined signature that goes into +`PackedUserOperation.signature`, per airaccount-contract #110: +``` +T2: [0x04][P256(64)][nodeIdsLength(32)][nodeIds(N×32)][blsSig(256)] +T3: [0x05][P256(64)][nodeIdsLength(32)][nodeIds(N×32)][blsSig(256)][guardianECDSA(65)] +``` +`nodeIdsLength` is a 32-byte big-endian `uint256` count of `nodeIds`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`DVTAccountSignatureParams`](../interfaces/DVTAccountSignatureParams.md) | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/core/functions/encodeDVTVerifierProof.md b/api/@aastar/core/functions/encodeDVTVerifierProof.md new file mode 100644 index 000000000..94e230d81 --- /dev/null +++ b/api/@aastar/core/functions/encodeDVTVerifierProof.md @@ -0,0 +1,20 @@ +> **encodeDVTVerifierProof**(`nodeIds`, `blsSig`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L155) + +Encode the VERIFIER-LEVEL proof passed to `AAStarBLSAlgorithm.validate`: +`[nodeId_1(32)…nodeId_N(32)][blsSig(256)]` — NO `nodeIdsLength` prefix (the contract +derives `nodeCount = (sig.length - 256) / 32`). + +`nodeIds` order MUST equal the nodes' signing/aggregation order. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `nodeIds` | `` `0x${string}` ``[] | Explicit `bytes32` node IDs of the contributing signers, in order. | +| `blsSig` | `Uint8Array` \| `` `0x${string}` `` | The aggregate BLS G2 signature (256-byte EIP-2537, or 96/192-byte zkcrypto). | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/core/functions/encodeG2Point.md b/api/@aastar/core/functions/encodeG2Point.md new file mode 100644 index 000000000..52932fd09 --- /dev/null +++ b/api/@aastar/core/functions/encodeG2Point.md @@ -0,0 +1,27 @@ +> **encodeG2Point**(`blsSig`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L94) + +Produce the canonical 256-byte EIP-2537 G2 layout for a BLS aggregate signature, +byte-identical to the DVT node's `encodeG2Point` (YetAnotherAA-Validator +`src/utils/bls.util.ts`) and to what the contract pairs over. + +Layout: `x.c0 @ 16 / x.c1 @ 80 / y.c0 @ 144 / y.c1 @ 208`, each Fp a 48-byte +big-endian value right-aligned in its 64-byte slot (16 leading zero bytes). + +Accepts the signature in three forms: +- **256-byte EIP-2537** (what the node already emits): validated and passed through. +- **96-byte compressed** / **192-byte uncompressed** zkcrypto G2: re-packed via + `@noble/curves` (parse → affine → EIP-2537 slots). + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `blsSig` | `Uint8Array` \| `` `0x${string}` `` | The aggregate BLS G2 signature (hex or bytes). | + +## Returns + +`` `0x${string}` `` + +The 256-byte EIP-2537 G2 point as hex. diff --git a/api/@aastar/core/functions/entryPointActions.md b/api/@aastar/core/functions/entryPointActions.md index e3638929e..145b38e8c 100644 --- a/api/@aastar/core/functions/entryPointActions.md +++ b/api/@aastar/core/functions/entryPointActions.md @@ -1,6 +1,6 @@ > **entryPointActions**(`address`): (`client`) => [`EntryPointActions`](../type-aliases/EntryPointActions.md) -Defined in: [packages/core/src/actions/entryPoint.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L19) +Defined in: [packages/core/src/actions/entryPoint.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L19) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:19](https://github.com/AASt | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/forceExitActions.md b/api/@aastar/core/functions/forceExitActions.md new file mode 100644 index 000000000..aa0177039 --- /dev/null +++ b/api/@aastar/core/functions/forceExitActions.md @@ -0,0 +1,23 @@ +> **forceExitActions**(`address`): (`client`) => [`ForceExitActions`](../type-aliases/ForceExitActions.md) + +Defined in: [packages/core/src/actions/forceExit.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L21) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`ForceExitActions`](../type-aliases/ForceExitActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`ForceExitActions`](../type-aliases/ForceExitActions.md) diff --git a/api/@aastar/core/functions/gTokenActions.md b/api/@aastar/core/functions/gTokenActions.md index f8d3af4fe..a16ae09d6 100644 --- a/api/@aastar/core/functions/gTokenActions.md +++ b/api/@aastar/core/functions/gTokenActions.md @@ -1,6 +1,6 @@ > **gTokenActions**(`address?`): (`client`) => [`GTokenActions`](../type-aliases/GTokenActions.md) -Defined in: [packages/core/src/actions/tokens.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L83) +Defined in: [packages/core/src/actions/tokens.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L129) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/tokens.ts:83](https://github.com/AAStarCo | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/gTokenAuthorizationActions.md b/api/@aastar/core/functions/gTokenAuthorizationActions.md new file mode 100644 index 000000000..3c4f65c77 --- /dev/null +++ b/api/@aastar/core/functions/gTokenAuthorizationActions.md @@ -0,0 +1,13 @@ +> **gTokenAuthorizationActions**(`client`): [`GTokenAuthorizationActions`](../type-aliases/GTokenAuthorizationActions.md) + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L80) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: (...) \| (...) \| (...) \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: (...)\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: (...) \| (...); paymasterService?: (...) \| (...); unstable\_addSubAccount?: (...) \| (...); \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +## Returns + +[`GTokenAuthorizationActions`](../type-aliases/GTokenAuthorizationActions.md) diff --git a/api/@aastar/core/functions/getAddressUrl.md b/api/@aastar/core/functions/getAddressUrl.md index 8e14d7b99..b9fa93d8f 100644 --- a/api/@aastar/core/functions/getAddressUrl.md +++ b/api/@aastar/core/functions/getAddressUrl.md @@ -1,6 +1,6 @@ > **getAddressUrl**(`network`, `address`): `string` -Defined in: [packages/core/src/networks.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L131) +Defined in: [packages/core/src/networks.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L131) Get address URL on block explorer diff --git a/api/@aastar/core/functions/getAllCommunityConfigs.md b/api/@aastar/core/functions/getAllCommunityConfigs.md index bd4982cab..5603bb658 100644 --- a/api/@aastar/core/functions/getAllCommunityConfigs.md +++ b/api/@aastar/core/functions/getAllCommunityConfigs.md @@ -1,6 +1,6 @@ > **getAllCommunityConfigs**(): [`CommunityConfig`](../interfaces/CommunityConfig.md)[] -Defined in: [packages/core/src/communities.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L84) +Defined in: [packages/core/src/communities.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L84) Get all community configurations diff --git a/api/@aastar/core/functions/getAllV2Contracts.md b/api/@aastar/core/functions/getAllV2Contracts.md index e22c4bf31..f374ebd3f 100644 --- a/api/@aastar/core/functions/getAllV2Contracts.md +++ b/api/@aastar/core/functions/getAllV2Contracts.md @@ -1,6 +1,6 @@ > **getAllV2Contracts**(): [`ContractVersion`](../interfaces/ContractVersion.md)[] -Defined in: [packages/core/src/contract-versions.ts:264](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L264) +Defined in: [packages/core/src/contract-versions.ts:264](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L264) Get all V2 contracts with VERSION interface diff --git a/api/@aastar/core/functions/getBlockExplorer.md b/api/@aastar/core/functions/getBlockExplorer.md index b9c915fa3..eceefc17c 100644 --- a/api/@aastar/core/functions/getBlockExplorer.md +++ b/api/@aastar/core/functions/getBlockExplorer.md @@ -1,6 +1,6 @@ -> **getBlockExplorer**(`network`): `""` \| `"https://sepolia.etherscan.io"` \| `"https://optimistic.etherscan.io"` \| `"https://optimism-sepolia.blockscout.com"` +> **getBlockExplorer**(`network`): `""` \| `"https://sepolia.etherscan.io"` \| `"https://optimistic.etherscan.io"` \| `"https://sepolia-optimism.etherscan.io"` -Defined in: [packages/core/src/networks.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L97) +Defined in: [packages/core/src/networks.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L97) Get block explorer URL @@ -12,7 +12,7 @@ Get block explorer URL ## Returns -`""` \| `"https://sepolia.etherscan.io"` \| `"https://optimistic.etherscan.io"` \| `"https://optimism-sepolia.blockscout.com"` +`""` \| `"https://sepolia.etherscan.io"` \| `"https://optimistic.etherscan.io"` \| `"https://sepolia-optimism.etherscan.io"` Block explorer base URL diff --git a/api/@aastar/core/functions/getCanonicalAddresses.md b/api/@aastar/core/functions/getCanonicalAddresses.md new file mode 100644 index 000000000..d2ce597e6 --- /dev/null +++ b/api/@aastar/core/functions/getCanonicalAddresses.md @@ -0,0 +1,33 @@ +> **getCanonicalAddresses**(`chainId`): CanonicalAddresses & \{ gTokenStaking: \`0x$\{string\}\`; mySBT: \`0x$\{string\}\`; \} \| `undefined` + +Defined in: [packages/core/src/addresses.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L225) + +Resolve the canonical contract address book for a chain, keyed by `chainId`, +normalized to the key names the role-based client factories expect. + +The canonical table uses `staking` / `sbt`; the historical client factories +(and many consumers) reference `gTokenStaking` / `mySBT`. This helper returns +the canonical set plus those aliases so a single object satisfies both, which +is what makes `createEndUserClient({ chain })` resolve addresses automatically +— no manual `addresses` needed for any supported chain. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `chainId` | `number` | EVM chain id (e.g. 10 = Optimism, 11155111 = Sepolia). | + +## Returns + +CanonicalAddresses & \{ gTokenStaking: \`0x$\{string\}\`; mySBT: \`0x$\{string\}\`; \} \| `undefined` + +The normalized address record, or `undefined` if the chain has no + canonical entry (caller must then pass `addresses` explicitly). + +## Example + +```ts +import { optimism } from 'viem/chains'; +const addrs = getCanonicalAddresses(optimism.id); // chainId 10 +addrs?.registry; addrs?.mySBT; // alias of `sbt` +``` diff --git a/api/@aastar/core/functions/getChainId.md b/api/@aastar/core/functions/getChainId.md index 73cb321a3..54dd396d6 100644 --- a/api/@aastar/core/functions/getChainId.md +++ b/api/@aastar/core/functions/getChainId.md @@ -1,6 +1,6 @@ > **getChainId**(`network`): `number` -Defined in: [packages/core/src/networks.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L147) +Defined in: [packages/core/src/networks.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L147) Get chain ID for a network diff --git a/api/@aastar/core/functions/getCommunities.md b/api/@aastar/core/functions/getCommunities.md index b5634b576..80a5b4056 100644 --- a/api/@aastar/core/functions/getCommunities.md +++ b/api/@aastar/core/functions/getCommunities.md @@ -1,6 +1,6 @@ > **getCommunities**(`network`): `object` -Defined in: [packages/core/src/contracts.ts:395](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L395) +Defined in: [packages/core/src/contracts.ts:395](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L395) Get registered communities diff --git a/api/@aastar/core/functions/getCommunity.md b/api/@aastar/core/functions/getCommunity.md index 7d463b42a..aa9d2a0bd 100644 --- a/api/@aastar/core/functions/getCommunity.md +++ b/api/@aastar/core/functions/getCommunity.md @@ -1,6 +1,6 @@ > **getCommunity**(`network`, `communityName`): \{ `ensName`: `"aastar.eth"`; `gasToken`: `` `0x${string}` ``; `name`: `"AAStar"`; `owner`: `"0x411BD567E46C0781248dbB6a9211891C032885e5"`; `stake`: `"50"`; \} \| \{ `ensName`: `"bread.eth"`; `gasToken`: `` `0x${string}` ``; `name`: `"BreadCommunity"`; `owner`: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"`; `stake`: `"50"`; \} -Defined in: [packages/core/src/contracts.ts:412](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L412) +Defined in: [packages/core/src/contracts.ts:412](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L412) Get a specific community diff --git a/api/@aastar/core/functions/getCommunityConfig.md b/api/@aastar/core/functions/getCommunityConfig.md index feb8b40d9..eb5bed43a 100644 --- a/api/@aastar/core/functions/getCommunityConfig.md +++ b/api/@aastar/core/functions/getCommunityConfig.md @@ -1,6 +1,6 @@ > **getCommunityConfig**(`address`): [`CommunityConfig`](../interfaces/CommunityConfig.md) \| `undefined` -Defined in: [packages/core/src/communities.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L77) +Defined in: [packages/core/src/communities.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L77) Get community configuration by address diff --git a/api/@aastar/core/functions/getContract.md b/api/@aastar/core/functions/getContract.md index c655e3fcb..9221798cb 100644 --- a/api/@aastar/core/functions/getContract.md +++ b/api/@aastar/core/functions/getContract.md @@ -1,6 +1,6 @@ > **getContract**(`network`, `category`, `name`): `string` -Defined in: [packages/core/src/contracts.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L151) +Defined in: [packages/core/src/contracts.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L151) Get a specific contract address diff --git a/api/@aastar/core/functions/getContractNetworks.md b/api/@aastar/core/functions/getContractNetworks.md index f74a4d6ec..35d045360 100644 --- a/api/@aastar/core/functions/getContractNetworks.md +++ b/api/@aastar/core/functions/getContractNetworks.md @@ -1,6 +1,6 @@ > **getContractNetworks**(): `"sepolia"`[] -Defined in: [packages/core/src/contracts.ts:325](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L325) +Defined in: [packages/core/src/contracts.ts:325](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L325) Get all supported contract network names diff --git a/api/@aastar/core/functions/getContracts.md b/api/@aastar/core/functions/getContracts.md index a5b004228..29d5ef3ee 100644 --- a/api/@aastar/core/functions/getContracts.md +++ b/api/@aastar/core/functions/getContracts.md @@ -1,6 +1,6 @@ > **getContracts**(`network`): `object` -Defined in: [packages/core/src/contracts.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L130) +Defined in: [packages/core/src/contracts.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L130) Get all contracts for a specific network @@ -76,6 +76,14 @@ BreadCommunity - Test community for development (registered: 2025-11-03) > `readonly` **core**: `object` = `CORE_ADDRESSES` +#### core.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +#### core.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + #### core.aPNTs > `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` @@ -96,6 +104,10 @@ BreadCommunity - Test community for development (registered: 2025-11-03) > `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` +#### core.microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + #### core.mySBT > `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` diff --git a/api/@aastar/core/functions/getCoreContracts.md b/api/@aastar/core/functions/getCoreContracts.md index 87fc3c036..f01ac6770 100644 --- a/api/@aastar/core/functions/getCoreContracts.md +++ b/api/@aastar/core/functions/getCoreContracts.md @@ -1,6 +1,6 @@ > **getCoreContracts**(`network`): `object` -Defined in: [packages/core/src/contracts.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L184) +Defined in: [packages/core/src/contracts.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L184) Get core system contracts @@ -16,6 +16,14 @@ Get core system contracts Core contract addresses +### agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +### agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + ### aPNTs > `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` @@ -36,6 +44,10 @@ Core contract addresses > `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` +### microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + ### mySBT > `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` diff --git a/api/@aastar/core/functions/getDeploymentDate.md b/api/@aastar/core/functions/getDeploymentDate.md index a902975f1..9b030d28b 100644 --- a/api/@aastar/core/functions/getDeploymentDate.md +++ b/api/@aastar/core/functions/getDeploymentDate.md @@ -1,6 +1,6 @@ > **getDeploymentDate**(`network`, `contractName`): `string` \| `undefined` -Defined in: [packages/core/src/contracts.ts:376](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L376) +Defined in: [packages/core/src/contracts.ts:376](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L376) Get contract deployment date diff --git a/api/@aastar/core/functions/getEntryPoint.md b/api/@aastar/core/functions/getEntryPoint.md index b0da0be5c..90f16125d 100644 --- a/api/@aastar/core/functions/getEntryPoint.md +++ b/api/@aastar/core/functions/getEntryPoint.md @@ -1,6 +1,6 @@ > **getEntryPoint**(`network`): `string` -Defined in: [packages/core/src/contracts.ts:293](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L293) +Defined in: [packages/core/src/contracts.ts:293](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L293) Get EntryPoint v0.7 address diff --git a/api/@aastar/core/functions/getNetwork.md b/api/@aastar/core/functions/getNetwork.md index 77ef162ba..dfcf4008a 100644 --- a/api/@aastar/core/functions/getNetwork.md +++ b/api/@aastar/core/functions/getNetwork.md @@ -1,6 +1,6 @@ -> **getNetwork**(`network`): \{ `blockExplorer`: `"https://sepolia.etherscan.io"`; `chainId`: `11155111`; `name`: `"Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://rpc.sepolia.org"`; \} \| \{ `blockExplorer`: `""`; `chainId`: `31337`; `name`: `"Anvil"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"http://127.0.0.1:8545"`; \} \| \{ `blockExplorer`: `"https://optimistic.etherscan.io"`; `chainId`: `10`; `name`: `"Optimism"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://mainnet.optimism.io"`; \} \| \{ `blockExplorer`: `"https://optimism-sepolia.blockscout.com"`; `chainId`: `11155420`; `name`: `"Optimism Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://sepolia.optimism.io"`; \} +> **getNetwork**(`network`): \{ `blockExplorer`: `"https://sepolia.etherscan.io"`; `chainId`: `11155111`; `name`: `"Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://rpc.sepolia.org"`; \} \| \{ `blockExplorer`: `""`; `chainId`: `31337`; `name`: `"Anvil"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"http://127.0.0.1:8545"`; \} \| \{ `blockExplorer`: `"https://optimistic.etherscan.io"`; `chainId`: `10`; `name`: `"Optimism"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://mainnet.optimism.io"`; \} \| \{ `blockExplorer`: `"https://sepolia-optimism.etherscan.io"`; `chainId`: `11155420`; `name`: `"Optimism Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://sepolia.optimism.io"`; \} -Defined in: [packages/core/src/networks.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L66) +Defined in: [packages/core/src/networks.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L66) Get network configuration @@ -12,7 +12,7 @@ Get network configuration ## Returns -\{ `blockExplorer`: `"https://sepolia.etherscan.io"`; `chainId`: `11155111`; `name`: `"Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://rpc.sepolia.org"`; \} \| \{ `blockExplorer`: `""`; `chainId`: `31337`; `name`: `"Anvil"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"http://127.0.0.1:8545"`; \} \| \{ `blockExplorer`: `"https://optimistic.etherscan.io"`; `chainId`: `10`; `name`: `"Optimism"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://mainnet.optimism.io"`; \} \| \{ `blockExplorer`: `"https://optimism-sepolia.blockscout.com"`; `chainId`: `11155420`; `name`: `"Optimism Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://sepolia.optimism.io"`; \} +\{ `blockExplorer`: `"https://sepolia.etherscan.io"`; `chainId`: `11155111`; `name`: `"Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://rpc.sepolia.org"`; \} \| \{ `blockExplorer`: `""`; `chainId`: `31337`; `name`: `"Anvil"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"http://127.0.0.1:8545"`; \} \| \{ `blockExplorer`: `"https://optimistic.etherscan.io"`; `chainId`: `10`; `name`: `"Optimism"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://mainnet.optimism.io"`; \} \| \{ `blockExplorer`: `"https://sepolia-optimism.etherscan.io"`; `chainId`: `11155420`; `name`: `"Optimism Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://sepolia.optimism.io"`; \} Network configuration diff --git a/api/@aastar/core/functions/getPaymasterV4_1.md b/api/@aastar/core/functions/getPaymasterV4_1.md index 5256f1317..6508508d9 100644 --- a/api/@aastar/core/functions/getPaymasterV4_1.md +++ b/api/@aastar/core/functions/getPaymasterV4_1.md @@ -1,6 +1,6 @@ > **getPaymasterV4\_1**(`network`): `string` -Defined in: [packages/core/src/contracts.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L232) +Defined in: [packages/core/src/contracts.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L232) Get PaymasterV4_1 address (AOA mode) diff --git a/api/@aastar/core/functions/getRoleName.md b/api/@aastar/core/functions/getRoleName.md index 98ac5fea7..181de9e63 100644 --- a/api/@aastar/core/functions/getRoleName.md +++ b/api/@aastar/core/functions/getRoleName.md @@ -1,6 +1,6 @@ > **getRoleName**(`roleHash`): `string` -Defined in: [packages/core/src/roles.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L142) +Defined in: [packages/core/src/roles.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L142) Get human-readable role name diff --git a/api/@aastar/core/functions/getRpcUrl.md b/api/@aastar/core/functions/getRpcUrl.md index d5ae7b7f1..4817ba08f 100644 --- a/api/@aastar/core/functions/getRpcUrl.md +++ b/api/@aastar/core/functions/getRpcUrl.md @@ -1,6 +1,6 @@ > **getRpcUrl**(`network`): `"https://rpc.sepolia.org"` \| `"http://127.0.0.1:8545"` \| `"https://mainnet.optimism.io"` \| `"https://sepolia.optimism.io"` -Defined in: [packages/core/src/networks.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L81) +Defined in: [packages/core/src/networks.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L81) Get RPC URL for a network diff --git a/api/@aastar/core/functions/getSimpleAccountFactory.md b/api/@aastar/core/functions/getSimpleAccountFactory.md index 429c030b9..f7741abd0 100644 --- a/api/@aastar/core/functions/getSimpleAccountFactory.md +++ b/api/@aastar/core/functions/getSimpleAccountFactory.md @@ -1,6 +1,6 @@ > **getSimpleAccountFactory**(`network`): `string` -Defined in: [packages/core/src/contracts.ts:263](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L263) +Defined in: [packages/core/src/contracts.ts:263](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L263) Get SimpleAccountFactory address diff --git a/api/@aastar/core/functions/getSuperPaymasterV2.md b/api/@aastar/core/functions/getSuperPaymasterV2.md index f651c3cf4..833f64cd6 100644 --- a/api/@aastar/core/functions/getSuperPaymasterV2.md +++ b/api/@aastar/core/functions/getSuperPaymasterV2.md @@ -1,6 +1,6 @@ > **getSuperPaymasterV2**(`network`): `string` -Defined in: [packages/core/src/contracts.ts:278](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L278) +Defined in: [packages/core/src/contracts.ts:278](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L278) Get SuperPaymaster V2 address (AOA+ mode) diff --git a/api/@aastar/core/functions/getTestAccounts.md b/api/@aastar/core/functions/getTestAccounts.md index 582aa6afa..c54b14085 100644 --- a/api/@aastar/core/functions/getTestAccounts.md +++ b/api/@aastar/core/functions/getTestAccounts.md @@ -1,6 +1,6 @@ > **getTestAccounts**(`network`): `object` -Defined in: [packages/core/src/contracts.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L248) +Defined in: [packages/core/src/contracts.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L248) Get test account contracts (SimpleAccountFactory, etc.) diff --git a/api/@aastar/core/functions/getTestTokenContracts.md b/api/@aastar/core/functions/getTestTokenContracts.md index 7891d8193..006c1e038 100644 --- a/api/@aastar/core/functions/getTestTokenContracts.md +++ b/api/@aastar/core/functions/getTestTokenContracts.md @@ -1,6 +1,6 @@ > **getTestTokenContracts**(`network`): `object` -Defined in: [packages/core/src/contracts.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L217) +Defined in: [packages/core/src/contracts.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L217) Get test token contracts (for development & testing) diff --git a/api/@aastar/core/functions/getTokenContracts.md b/api/@aastar/core/functions/getTokenContracts.md index 39e7576d6..10d539077 100644 --- a/api/@aastar/core/functions/getTokenContracts.md +++ b/api/@aastar/core/functions/getTokenContracts.md @@ -1,6 +1,6 @@ > **getTokenContracts**(`network`): `object` -Defined in: [packages/core/src/contracts.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L201) +Defined in: [packages/core/src/contracts.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L201) Get token system contracts diff --git a/api/@aastar/core/functions/getTxUrl.md b/api/@aastar/core/functions/getTxUrl.md index 7d679027e..c3e3d2521 100644 --- a/api/@aastar/core/functions/getTxUrl.md +++ b/api/@aastar/core/functions/getTxUrl.md @@ -1,6 +1,6 @@ > **getTxUrl**(`network`, `txHash`): `string` -Defined in: [packages/core/src/networks.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L114) +Defined in: [packages/core/src/networks.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L114) Get transaction URL on block explorer diff --git a/api/@aastar/core/functions/getV2ContractByAddress.md b/api/@aastar/core/functions/getV2ContractByAddress.md index b3403ab1f..610b9b744 100644 --- a/api/@aastar/core/functions/getV2ContractByAddress.md +++ b/api/@aastar/core/functions/getV2ContractByAddress.md @@ -1,6 +1,6 @@ > **getV2ContractByAddress**(`address`): [`ContractVersion`](../interfaces/ContractVersion.md) \| `undefined` -Defined in: [packages/core/src/contract-versions.ts:322](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L322) +Defined in: [packages/core/src/contract-versions.ts:322](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L322) Get V2 contract by address diff --git a/api/@aastar/core/functions/getV2ContractByName.md b/api/@aastar/core/functions/getV2ContractByName.md index a13a623e4..3c924cf51 100644 --- a/api/@aastar/core/functions/getV2ContractByName.md +++ b/api/@aastar/core/functions/getV2ContractByName.md @@ -1,6 +1,6 @@ > **getV2ContractByName**(`name`): [`ContractVersion`](../interfaces/ContractVersion.md) \| `undefined` -Defined in: [packages/core/src/contract-versions.ts:303](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L303) +Defined in: [packages/core/src/contract-versions.ts:303](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L303) Get V2 contract by name diff --git a/api/@aastar/core/functions/getV2ContractsByDate.md b/api/@aastar/core/functions/getV2ContractsByDate.md index 1447d820c..4ea55d960 100644 --- a/api/@aastar/core/functions/getV2ContractsByDate.md +++ b/api/@aastar/core/functions/getV2ContractsByDate.md @@ -1,6 +1,6 @@ > **getV2ContractsByDate**(`date`): [`ContractVersion`](../interfaces/ContractVersion.md)[] -Defined in: [packages/core/src/contract-versions.ts:356](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L356) +Defined in: [packages/core/src/contract-versions.ts:356](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L356) Get all V2 contracts deployed on a specific date diff --git a/api/@aastar/core/functions/hashToFieldU0U1.md b/api/@aastar/core/functions/hashToFieldU0U1.md new file mode 100644 index 000000000..aa4ddb977 --- /dev/null +++ b/api/@aastar/core/functions/hashToFieldU0U1.md @@ -0,0 +1,25 @@ +> **hashToFieldU0U1**(`message`): [`HashToFieldU0U1`](../interfaces/HashToFieldU0U1.md) + +Defined in: [packages/core/src/crypto/hashToField.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L73) + +Compute `hash_to_field(message, DST=BLS_POP_DST, count=2)` for BLS12-381 G2 +and serialize the resulting two Fp2 elements (u0, u1) into SuperPaymaster's +EIP-2537 split-bytes32 layout. + +This is the authoritative cross-repo golden surface for DVT: the node, the +SDK, and the on-chain verifier must all agree byte-for-byte on (u0, u1). +Full hash-to-curve (map_to_curve + clear_cofactor) is intentionally NOT +computed here because it needs EIP-2537 precompiles absent on cancun; the +contract only verifies the `hash_to_field` intermediate. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `message` | `` `0x${string}` `` | The message to hash (arbitrary-length bytes, as Hex). | + +## Returns + +[`HashToFieldU0U1`](../interfaces/HashToFieldU0U1.md) + +The 8 bytes32 values (u0/u1 × c0/c1 × a/b). diff --git a/api/@aastar/core/functions/isContractNetworkSupported.md b/api/@aastar/core/functions/isContractNetworkSupported.md index 2782f7fe2..2b7dba57f 100644 --- a/api/@aastar/core/functions/isContractNetworkSupported.md +++ b/api/@aastar/core/functions/isContractNetworkSupported.md @@ -1,6 +1,6 @@ > **isContractNetworkSupported**(`network`): `network is "sepolia"` -Defined in: [packages/core/src/contracts.ts:310](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L310) +Defined in: [packages/core/src/contracts.ts:310](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L310) Check if a network is supported for contracts diff --git a/api/@aastar/core/functions/isRegisteredCommunity.md b/api/@aastar/core/functions/isRegisteredCommunity.md index fbbea9e1d..a07b09bba 100644 --- a/api/@aastar/core/functions/isRegisteredCommunity.md +++ b/api/@aastar/core/functions/isRegisteredCommunity.md @@ -1,6 +1,6 @@ > **isRegisteredCommunity**(`address`): `boolean` -Defined in: [packages/core/src/communities.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L91) +Defined in: [packages/core/src/communities.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L91) Check if address is a registered community diff --git a/api/@aastar/core/functions/isSupportedChainId.md b/api/@aastar/core/functions/isSupportedChainId.md new file mode 100644 index 000000000..fabd64c18 --- /dev/null +++ b/api/@aastar/core/functions/isSupportedChainId.md @@ -0,0 +1,15 @@ +> **isSupportedChainId**(`chainId`): chainId is 10 \| 11155111 \| 11155420 + +Defined in: [packages/core/src/addresses.ts:200](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L200) + +True if [CANONICAL\_ADDRESSES](../variables/CANONICAL_ADDRESSES.md) has an entry for `chainId`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `chainId` | `number` | + +## Returns + +chainId is 10 \| 11155111 \| 11155420 diff --git a/api/@aastar/core/functions/isV2Contract.md b/api/@aastar/core/functions/isV2Contract.md index d70dc55aa..0379a25a6 100644 --- a/api/@aastar/core/functions/isV2Contract.md +++ b/api/@aastar/core/functions/isV2Contract.md @@ -1,6 +1,6 @@ > **isV2Contract**(`address`): `boolean` -Defined in: [packages/core/src/contract-versions.ts:340](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L340) +Defined in: [packages/core/src/contract-versions.ts:340](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L340) Check if an address is a V2 contract diff --git a/api/@aastar/core/functions/listSupportedChainIds.md b/api/@aastar/core/functions/listSupportedChainIds.md new file mode 100644 index 000000000..f3d888c6d --- /dev/null +++ b/api/@aastar/core/functions/listSupportedChainIds.md @@ -0,0 +1,15 @@ +> **listSupportedChainIds**(): `number`[] + +Defined in: [packages/core/src/addresses.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L195) + +Chain IDs that have a canonical address book in [CANONICAL\_ADDRESSES](../variables/CANONICAL_ADDRESSES.md). + +## Returns + +`number`[] + +## Example + +```ts +listSupportedChainIds(); // [10, 11155111, 11155420] +``` diff --git a/api/@aastar/core/functions/lookupAddress.md b/api/@aastar/core/functions/lookupAddress.md new file mode 100644 index 000000000..393b5bba4 --- /dev/null +++ b/api/@aastar/core/functions/lookupAddress.md @@ -0,0 +1,23 @@ +> **lookupAddress**(`address`, `options`): `Promise`\<`string` \| `null`\> + +Defined in: [packages/core/src/utils/ens.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L64) + +Reverse-resolve an Ethereum address to its primary ENS name. +Returns null if the address has no reverse record. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | +| `options` | [`EnsOptions`](../interfaces/EnsOptions.md) | + +## Returns + +`Promise`\<`string` \| `null`\> + +## Example + +```ts +const name = await lookupAddress('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'); +``` diff --git a/api/@aastar/core/functions/paymasterActions.md b/api/@aastar/core/functions/paymasterActions.md index 2ce127ca6..57166966d 100644 --- a/api/@aastar/core/functions/paymasterActions.md +++ b/api/@aastar/core/functions/paymasterActions.md @@ -1,6 +1,6 @@ > **paymasterActions**(`address`): (`client`) => [`PaymasterActions`](../type-aliases/PaymasterActions.md) -Defined in: [packages/core/src/actions/paymaster.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L78) +Defined in: [packages/core/src/actions/paymaster.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L79) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:78](https://github.com/AASta | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/paymasterFactoryActions.md b/api/@aastar/core/functions/paymasterFactoryActions.md index 5f0f5f92b..c096c978b 100644 --- a/api/@aastar/core/functions/paymasterFactoryActions.md +++ b/api/@aastar/core/functions/paymasterFactoryActions.md @@ -1,6 +1,6 @@ > **paymasterFactoryActions**(`address`): (`client`) => [`PaymasterFactoryActions`](../type-aliases/PaymasterFactoryActions.md) -Defined in: [packages/core/src/actions/factory.ts:422](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L422) +Defined in: [packages/core/src/actions/factory.ts:416](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L416) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/factory.ts:422](https://github.com/AAStar | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/policyRegistryActions.md b/api/@aastar/core/functions/policyRegistryActions.md new file mode 100644 index 000000000..4c92fad30 --- /dev/null +++ b/api/@aastar/core/functions/policyRegistryActions.md @@ -0,0 +1,37 @@ +> **policyRegistryActions**(`address`): (`client`) => [`PolicyRegistryActions`](../type-aliases/PolicyRegistryActions.md) + +Defined in: [packages/core/src/actions/policyRegistry.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L179) + +Action factory for the SuperPaymaster v5.4 PolicyRegistry (DVT layer-1 account policy). + +Asymmetric lifecycle (enforced ON-CHAIN — the SDK is only a client and does NOT +re-implement the delay): + - IMMEDIATE tighten/freeze: [PolicyRegistryActions.tightenAssetPolicy](../type-aliases/PolicyRegistryActions.md#tightenassetpolicy) / + [PolicyRegistryActions.tightenContractScope](../type-aliases/PolicyRegistryActions.md#tightencontractscope) / [PolicyRegistryActions.freezeSender](../type-aliases/PolicyRegistryActions.md#freezesender) + (guardian OR timelock). + - TIMELOCKED loosen/unfreeze/admin: [PolicyRegistryActions.setAssetPolicy](../type-aliases/PolicyRegistryActions.md#setassetpolicy) / + [PolicyRegistryActions.setContractScope](../type-aliases/PolicyRegistryActions.md#setcontractscope) / [PolicyRegistryActions.unfreezeSender](../type-aliases/PolicyRegistryActions.md#unfreezesender) / + [PolicyRegistryActions.setGuardian](../type-aliases/PolicyRegistryActions.md#setguardian) / [PolicyRegistryActions.setConsumerAuthorization](../type-aliases/PolicyRegistryActions.md#setconsumerauthorization) + — `onlyTimelock`. The 2-day delay is the EXTERNAL OZ TimelockController's `minDelay`; + this registry has NO pending-change store, so callers must schedule/execute through + [PolicyRegistryActions.timelock](../type-aliases/PolicyRegistryActions.md#timelock) and read the controller's ETA themselves. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`PolicyRegistryActions`](../type-aliases/PolicyRegistryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`PolicyRegistryActions`](../type-aliases/PolicyRegistryActions.md) diff --git a/api/@aastar/core/functions/registryActions.md b/api/@aastar/core/functions/registryActions.md index 3480383e0..603693289 100644 --- a/api/@aastar/core/functions/registryActions.md +++ b/api/@aastar/core/functions/registryActions.md @@ -1,6 +1,6 @@ > **registryActions**(`address`): (`client`) => [`RegistryActions`](../type-aliases/RegistryActions.md) -Defined in: [packages/core/src/actions/registry.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L101) +Defined in: [packages/core/src/actions/registry.ts:282](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L282) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/registry.ts:101](https://github.com/AASta | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/reputationActions.md b/api/@aastar/core/functions/reputationActions.md index 4448fe3f8..bd5d2cba3 100644 --- a/api/@aastar/core/functions/reputationActions.md +++ b/api/@aastar/core/functions/reputationActions.md @@ -1,6 +1,6 @@ > **reputationActions**(`address`): (`client`) => [`ReputationActions`](../type-aliases/ReputationActions.md) -Defined in: [packages/core/src/actions/reputation.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L81) +Defined in: [packages/core/src/actions/reputation.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L107) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/reputation.ts:81](https://github.com/AASt | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/resolveEns.md b/api/@aastar/core/functions/resolveEns.md new file mode 100644 index 000000000..39f1d7586 --- /dev/null +++ b/api/@aastar/core/functions/resolveEns.md @@ -0,0 +1,23 @@ +> **resolveEns**(`name`, `options`): `Promise`\<`` `0x${string}` `` \| `null`\> + +Defined in: [packages/core/src/utils/ens.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L49) + +Forward-resolve an ENS name to an Ethereum address. +Returns null if the name has no address record. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `name` | `string` | +| `options` | [`EnsOptions`](../interfaces/EnsOptions.md) | + +## Returns + +`Promise`\<`` `0x${string}` `` \| `null`\> + +## Example + +```ts +const address = await resolveEns('vitalik.eth'); +``` diff --git a/api/@aastar/core/functions/resolveEnsVerified.md b/api/@aastar/core/functions/resolveEnsVerified.md new file mode 100644 index 000000000..c63936ea2 --- /dev/null +++ b/api/@aastar/core/functions/resolveEnsVerified.md @@ -0,0 +1,20 @@ +> **resolveEnsVerified**(`name`, `options`): `Promise`\<\{ `address`: `` `0x${string}` `` \| `null`; `name`: `string`; `verified`: `boolean`; \}\> + +Defined in: [packages/core/src/utils/ens.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L79) + +Resolve both directions at once: given an ENS name, return the address and +confirm the reverse record matches (to detect misconfigurations). + +Returns `{ address, name, verified }` where `verified` is true only when +the reverse record of the resolved address points back to `name`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `name` | `string` | +| `options` | [`EnsOptions`](../interfaces/EnsOptions.md) | + +## Returns + +`Promise`\<\{ `address`: `` `0x${string}` `` \| `null`; `name`: `string`; `verified`: `boolean`; \}\> diff --git a/api/@aastar/core/functions/sbtActions.md b/api/@aastar/core/functions/sbtActions.md index 3f08893d0..540e91f52 100644 --- a/api/@aastar/core/functions/sbtActions.md +++ b/api/@aastar/core/functions/sbtActions.md @@ -1,6 +1,6 @@ > **sbtActions**(`address`): (`client`) => [`SBTActions`](../type-aliases/SBTActions.md) -Defined in: [packages/core/src/actions/sbt.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L101) +Defined in: [packages/core/src/actions/sbt.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L121) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/sbt.ts:101](https://github.com/AAStarComm | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/sessionKeyValidatorActions.md b/api/@aastar/core/functions/sessionKeyValidatorActions.md new file mode 100644 index 000000000..53010f6d8 --- /dev/null +++ b/api/@aastar/core/functions/sessionKeyValidatorActions.md @@ -0,0 +1,23 @@ +> **sessionKeyValidatorActions**(`address`): (`client`) => [`SessionKeyValidatorActions`](../type-aliases/SessionKeyValidatorActions.md) + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L26) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`SessionKeyValidatorActions`](../type-aliases/SessionKeyValidatorActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`SessionKeyValidatorActions`](../type-aliases/SessionKeyValidatorActions.md) diff --git a/api/@aastar/core/functions/stakingActions.md b/api/@aastar/core/functions/stakingActions.md index b6495a49f..f6b65a656 100644 --- a/api/@aastar/core/functions/stakingActions.md +++ b/api/@aastar/core/functions/stakingActions.md @@ -1,6 +1,6 @@ > **stakingActions**(`address`): (`client`) => [`StakingActions`](../type-aliases/StakingActions.md) -Defined in: [packages/core/src/actions/staking.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L77) +Defined in: [packages/core/src/actions/staking.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L89) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/staking.ts:77](https://github.com/AAStarC | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/superPaymasterActions.md b/api/@aastar/core/functions/superPaymasterActions.md index 98b1c4553..e18002ca0 100644 --- a/api/@aastar/core/functions/superPaymasterActions.md +++ b/api/@aastar/core/functions/superPaymasterActions.md @@ -1,6 +1,6 @@ > **superPaymasterActions**(`address`): (`client`) => [`SuperPaymasterActions`](../type-aliases/SuperPaymasterActions.md) -Defined in: [packages/core/src/actions/superPaymaster.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L114) +Defined in: [packages/core/src/actions/superPaymaster.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L225) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:114](https://github.com | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/tokenActions.md b/api/@aastar/core/functions/tokenActions.md index 7851ad6fe..0a1704226 100644 --- a/api/@aastar/core/functions/tokenActions.md +++ b/api/@aastar/core/functions/tokenActions.md @@ -1,6 +1,6 @@ > **tokenActions**(`address?`): (`client`) => [`TokenActions`](../type-aliases/TokenActions.md) -Defined in: [packages/core/src/actions/tokens.ts:457](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L457) +Defined in: [packages/core/src/actions/tokens.ts:631](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L631) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/tokens.ts:457](https://github.com/AAStarC | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/x402Actions.md b/api/@aastar/core/functions/x402Actions.md new file mode 100644 index 000000000..6f1984fa7 --- /dev/null +++ b/api/@aastar/core/functions/x402Actions.md @@ -0,0 +1,27 @@ +> **x402Actions**(`address`): (`client`) => [`X402Actions`](../type-aliases/X402Actions.md) + +Defined in: [packages/core/src/actions/x402.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L75) + +x402 settlement actions. As of SP v5.4 these functions live on the standalone +X402Facilitator contract (NOT SuperPaymaster), so `address` MUST be the deployed +X402Facilitator address — passing the SuperPaymaster address will revert on-chain. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`X402Actions`](../type-aliases/X402Actions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`X402Actions`](../type-aliases/X402Actions.md) diff --git a/api/@aastar/core/functions/x402IsNonceUsed.md b/api/@aastar/core/functions/x402IsNonceUsed.md new file mode 100644 index 000000000..d49c12841 --- /dev/null +++ b/api/@aastar/core/functions/x402IsNonceUsed.md @@ -0,0 +1,94 @@ +> **x402IsNonceUsed**(`client`, `superPaymasterAddress`, `params`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/x402.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L23) + +Checks if an x402 settlement nonce has been used. +Queries the triple-key slot: keccak256(abi.encode(asset, from, nonce)). +Replaces the pre-P0-13 pattern of querying x402SettlementNonces({ nonce }). + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `client.account` | `undefined` | The Account of the Client. | +| `client.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `client.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `client.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `client.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `client.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `client.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `client.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `client.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `client.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `client.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `client.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `client.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `client.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `client.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `client.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `client.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `client.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `client.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `client.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `client.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `client.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `client.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `client.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `client.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `client.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `client.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `client.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `client.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `client.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `client.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `client.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `client.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `client.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `client.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.key` | `string` | A key for the client. | +| `client.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `client.name` | `string` | A name for the client. | +| `client.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `client.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `client.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `client.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `client.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `client.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `client.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `client.type` | `string` | The type of client. | +| `client.uid` | `string` | A unique ID for the client. | +| `client.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `client.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `client.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `client.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `client.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `client.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `client.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `client.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `client.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `client.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `superPaymasterAddress` | `` `0x${string}` `` | - | +| `params` | \{ `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; \} | - | +| `params.asset` | `` `0x${string}` `` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/core/functions/x402NonceKey.md b/api/@aastar/core/functions/x402NonceKey.md new file mode 100644 index 000000000..5d7548c8a --- /dev/null +++ b/api/@aastar/core/functions/x402NonceKey.md @@ -0,0 +1,19 @@ +> **x402NonceKey**(`asset`, `from`, `nonce`): `` `0x${string}` `` + +Defined in: [packages/core/src/actions/x402.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L11) + +Computes the storage key for x402SettlementNonces[key]. +Mirrors SuperPaymaster.x402NonceKey: keccak256(abi.encode(asset, from, nonce)). +Changed from raw nonce (pre P0-13) to triple-key (post P0-13). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `asset` | `` `0x${string}` `` | +| `from` | `` `0x${string}` `` | +| `nonce` | `` `0x${string}` `` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/core/functions/xPNTsFactoryActions.md b/api/@aastar/core/functions/xPNTsFactoryActions.md index d08abebdf..4b4e4c7c7 100644 --- a/api/@aastar/core/functions/xPNTsFactoryActions.md +++ b/api/@aastar/core/functions/xPNTsFactoryActions.md @@ -1,6 +1,6 @@ > **xPNTsFactoryActions**(`address`): (`client`) => [`XPNTsFactoryActions`](../type-aliases/XPNTsFactoryActions.md) -Defined in: [packages/core/src/actions/factory.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L86) +Defined in: [packages/core/src/actions/factory.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L94) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/factory.ts:86](https://github.com/AAStarC | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/functions/xPNTsTokenActions.md b/api/@aastar/core/functions/xPNTsTokenActions.md index 671967262..561f0dee8 100644 --- a/api/@aastar/core/functions/xPNTsTokenActions.md +++ b/api/@aastar/core/functions/xPNTsTokenActions.md @@ -1,6 +1,6 @@ > **xPNTsTokenActions**(`address?`): (`client`) => [`XPNTsTokenActions`](../type-aliases/XPNTsTokenActions.md) -Defined in: [packages/core/src/actions/tokens.ts:194](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L194) +Defined in: [packages/core/src/actions/tokens.ts:240](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L240) ## Parameters @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/tokens.ts:194](https://github.com/AAStarC | Parameter | Type | | ------ | ------ | -| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | ### Returns diff --git a/api/@aastar/core/index.md b/api/@aastar/core/index.md index fd865832a..9041a2da9 100644 --- a/api/@aastar/core/index.md +++ b/api/@aastar/core/index.md @@ -1,7 +1,9 @@ ## Enumerations +- [AuthorizationState](enumerations/AuthorizationState.md) - [EntryPointVersion](enumerations/EntryPointVersion.md) - [NodeType](enumerations/NodeType.md) +- [PolicyDecision](enumerations/PolicyDecision.md) - [RolePermissionLevel](enumerations/RolePermissionLevel.md) ## Classes @@ -19,11 +21,19 @@ - [AccountBalance](interfaces/AccountBalance.md) - [BalanceValidationParams](interfaces/BalanceValidationParams.md) - [BundlerResponse](interfaces/BundlerResponse.md) +- [CheckResourcesOptions](interfaces/CheckResourcesOptions.md) - [ClientConfig](interfaces/ClientConfig.md) - [CommunityConfig](interfaces/CommunityConfig.md) - [ContractVersion](interfaces/ContractVersion.md) - [DeploymentValidationParams](interfaces/DeploymentValidationParams.md) +- [DVTAccountSignatureParams](interfaces/DVTAccountSignatureParams.md) +- [EnsOptions](interfaces/EnsOptions.md) +- [HashToFieldU0U1](interfaces/HashToFieldU0U1.md) +- [HeliosTransportConfig](interfaces/HeliosTransportConfig.md) - [PublicClient](interfaces/PublicClient.md) +- [ResourceBoolCheck](interfaces/ResourceBoolCheck.md) +- [ResourceReport](interfaces/ResourceReport.md) +- [ResourceStakeCheck](interfaces/ResourceStakeCheck.md) - [RoleConfig](interfaces/RoleConfig.md) - [RoleRequirement](interfaces/RoleRequirement.md) - [RoleValidationParams](interfaces/RoleValidationParams.md) @@ -39,43 +49,95 @@ - [AccountActions](type-aliases/AccountActions.md) - [AccountFactoryActions](type-aliases/AccountFactoryActions.md) +- [AgentActions](type-aliases/AgentActions.md) +- [AgentRegistryActions](type-aliases/AgentRegistryActions.md) +- [AgentSponsorshipPolicy](type-aliases/AgentSponsorshipPolicy.md) - [AggregatorActions](type-aliases/AggregatorActions.md) +- [AirAccountActions](type-aliases/AirAccountActions.md) +- [AirAccountFactoryActions](type-aliases/AirAccountFactoryActions.md) +- [AssetPolicy](type-aliases/AssetPolicy.md) +- [AssetPolicyInput](type-aliases/AssetPolicyInput.md) +- [BatchMintResult](type-aliases/BatchMintResult.md) +- [BLSAlgorithmActions](type-aliases/BLSAlgorithmActions.md) +- [BLSG1Point](type-aliases/BLSG1Point.md) - [BusinessResult](type-aliases/BusinessResult.md) +- [CanonicalAddresses](type-aliases/CanonicalAddresses.md) +- [ChannelActions](type-aliases/ChannelActions.md) +- [ChannelState](type-aliases/ChannelState.md) +- [CommunityProfile](type-aliases/CommunityProfile.md) - [ContractCategory](type-aliases/ContractCategory.md) - [ContractNetwork](type-aliases/ContractNetwork.md) +- [ContractScope](type-aliases/ContractScope.md) +- [ContractScopeInput](type-aliases/ContractScopeInput.md) +- [DryRunValidationResult](type-aliases/DryRunValidationResult.md) - [DVTActions](type-aliases/DVTActions.md) +- [DVTTier](type-aliases/DVTTier.md) - [EntryPointActions](type-aliases/EntryPointActions.md) - [ERC20Actions](type-aliases/ERC20Actions.md) - [FaucetConfig](type-aliases/FaucetConfig.md) - [FaucetPreparationResult](type-aliases/FaucetPreparationResult.md) +- [ForceExitActions](type-aliases/ForceExitActions.md) - [GTokenActions](type-aliases/GTokenActions.md) +- [GTokenAuthorizationActions](type-aliases/GTokenAuthorizationActions.md) +- [InitConfig](type-aliases/InitConfig.md) - [NetworkContracts](type-aliases/NetworkContracts.md) - [OperatorConfig](type-aliases/OperatorConfig.md) +- [OperatorMode](type-aliases/OperatorMode.md) +- [P256SessionState](type-aliases/P256SessionState.md) +- [PackedUserOperation](type-aliases/PackedUserOperation.md) - [PaymasterActions](type-aliases/PaymasterActions.md) - [PaymasterFactoryActions](type-aliases/PaymasterFactoryActions.md) +- [PendingExit](type-aliases/PendingExit.md) +- [PendingModuleInstall](type-aliases/PendingModuleInstall.md) +- [PolicyRegistryActions](type-aliases/PolicyRegistryActions.md) - [RegistryActions](type-aliases/RegistryActions.md) - [ReputationActions](type-aliases/ReputationActions.md) - [ReputationBreakdown](type-aliases/ReputationBreakdown.md) - [ReputationRule](type-aliases/ReputationRule.md) +- [ResolvedAPNTsToken](type-aliases/ResolvedAPNTsToken.md) - [RoleConfigDetailed](type-aliases/RoleConfigDetailed.md) - [SBTActions](type-aliases/SBTActions.md) - [SBTData](type-aliases/SBTData.md) - [SBTMembership](type-aliases/SBTMembership.md) +- [SessionKeyValidatorActions](type-aliases/SessionKeyValidatorActions.md) - [SlashRecord](type-aliases/SlashRecord.md) +- [SpendCounter](type-aliases/SpendCounter.md) - [StakingActions](type-aliases/StakingActions.md) - [SuperPaymasterActions](type-aliases/SuperPaymasterActions.md) +- [SupportedChainId](type-aliases/SupportedChainId.md) - [SupportedNetwork](type-aliases/SupportedNetwork.md) - [TokenActions](type-aliases/TokenActions.md) +- [TokenConfig](type-aliases/TokenConfig.md) +- [X402Actions](type-aliases/X402Actions.md) - [XPNTsFactoryActions](type-aliases/XPNTsFactoryActions.md) - [XPNTsTokenActions](type-aliases/XPNTsTokenActions.md) ## Variables - [AASTAR\_COMMUNITY](variables/AASTAR_COMMUNITY.md) +- [AAStarAirAccountFactoryV7ABI](variables/AAStarAirAccountFactoryV7ABI.md) +- [AAStarAirAccountFactoryV7Artifact](variables/AAStarAirAccountFactoryV7Artifact.md) +- [AAStarAirAccountV7ABI](variables/AAStarAirAccountV7ABI.md) +- [AAStarAirAccountV7Artifact](variables/AAStarAirAccountV7Artifact.md) +- [AAStarBLSAggregatorABI](variables/AAStarBLSAggregatorABI.md) +- [AAStarBLSAggregatorArtifact](variables/AAStarBLSAggregatorArtifact.md) +- [AAStarBLSAlgorithmABI](variables/AAStarBLSAlgorithmABI.md) +- [AAStarBLSAlgorithmArtifact](variables/AAStarBLSAlgorithmArtifact.md) +- [AAStarValidatorABI](variables/AAStarValidatorABI.md) +- [AAStarValidatorArtifact](variables/AAStarValidatorArtifact.md) +- [AGENT\_IDENTITY\_REGISTRY\_ADDRESS](variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md) +- [AGENT\_REPUTATION\_REGISTRY\_ADDRESS](variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md) +- [AgentRegistryABI](variables/AgentRegistryABI.md) +- [AgentRegistryArtifact](variables/AgentRegistryArtifact.md) +- [AirAccountDelegateABI](variables/AirAccountDelegateABI.md) +- [AirAccountDelegateArtifact](variables/AirAccountDelegateArtifact.md) +- [AirAccountExtensionABI](variables/AirAccountExtensionABI.md) +- [AirAccountExtensionArtifact](variables/AirAccountExtensionArtifact.md) - [ALL\_ADDRESSES](variables/ALL_ADDRESSES.md) - [ALL\_ROLES](variables/ALL_ROLES.md) - [APNTS\_ADDRESS](variables/APNTS_ADDRESS.md) - [BLS\_AGGREGATOR\_ADDRESS](variables/BLS_AGGREGATOR_ADDRESS.md) +- [BLS\_POP\_DST](variables/BLS_POP_DST.md) - [BLS\_VALIDATOR\_ADDRESS](variables/BLS_VALIDATOR_ADDRESS.md) - [BLSAggregatorABI](variables/BLSAggregatorABI.md) - [BLSAggregatorArtifact](variables/BLSAggregatorArtifact.md) @@ -85,6 +147,9 @@ - [BPS\_DENOMINATOR](variables/BPS_DENOMINATOR.md) - [BRANDING](variables/BRANDING.md) - [BREAD\_COMMUNITY](variables/BREAD_COMMUNITY.md) +- [CalldataParserRegistryABI](variables/CalldataParserRegistryABI.md) +- [CalldataParserRegistryArtifact](variables/CalldataParserRegistryArtifact.md) +- [CANONICAL\_ADDRESSES](variables/CANONICAL_ADDRESSES.md) - [CHAIN\_MAINNET](variables/CHAIN_MAINNET.md) - [CHAIN\_SEPOLIA](variables/CHAIN_SEPOLIA.md) - [COMMUNITIES](variables/COMMUNITIES.md) @@ -103,6 +168,8 @@ - [DEFAULT\_TOKEN\_SYMBOL](variables/DEFAULT_TOKEN_SYMBOL.md) - [DEFAULT\_USDT\_MINT\_AMOUNT](variables/DEFAULT_USDT_MINT_AMOUNT.md) - [DEFAULT\_VERIFICATION\_GAS\_LIMIT](variables/DEFAULT_VERIFICATION_GAS_LIMIT.md) +- [DVT\_TIER\_T2](variables/DVT_TIER_T2.md) +- [DVT\_TIER\_T3](variables/DVT_TIER_T3.md) - [DVT\_VALIDATOR\_ADDRESS](variables/DVT_VALIDATOR_ADDRESS.md) - [DVTValidatorABI](variables/DVTValidatorABI.md) - [DVTValidatorArtifact](variables/DVTValidatorArtifact.md) @@ -110,15 +177,22 @@ - [EntryPointABI](variables/EntryPointABI.md) - [EntryPointArtifact](variables/EntryPointArtifact.md) - [FAUCET\_API\_URL](variables/FAUCET_API_URL.md) +- [ForceExitModuleABI](variables/ForceExitModuleABI.md) +- [ForceExitModuleArtifact](variables/ForceExitModuleArtifact.md) - [GTOKEN\_ADDRESS](variables/GTOKEN_ADDRESS.md) - [GTOKEN\_STAKING\_ADDRESS](variables/GTOKEN_STAKING_ADDRESS.md) - [GTokenABI](variables/GTokenABI.md) - [GTokenArtifact](variables/GTokenArtifact.md) +- [GTokenAuthorizationABI](variables/GTokenAuthorizationABI.md) +- [GTokenAuthorizationArtifact](variables/GTokenAuthorizationArtifact.md) - [GTokenStakingABI](variables/GTokenStakingABI.md) - [GTokenStakingArtifact](variables/GTokenStakingArtifact.md) - [INITIAL\_ROLE\_STAKES](variables/INITIAL_ROLE_STAKES.md) - [LINKS](variables/LINKS.md) - [MAX\_SERVICE\_FEE](variables/MAX_SERVICE_FEE.md) +- [MICRO\_PAYMENT\_CHANNEL\_ADDRESS](variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md) +- [MicroPaymentChannelABI](variables/MicroPaymentChannelABI.md) +- [MicroPaymentChannelArtifact](variables/MicroPaymentChannelArtifact.md) - [MONITORING\_ADDRESSES](variables/MONITORING_ADDRESSES.md) - [MySBTABI](variables/MySBTABI.md) - [MySBTArtifact](variables/MySBTArtifact.md) @@ -133,6 +207,8 @@ - [PaymasterArtifact](variables/PaymasterArtifact.md) - [PaymasterFactoryABI](variables/PaymasterFactoryABI.md) - [PaymasterFactoryArtifact](variables/PaymasterFactoryArtifact.md) +- [PolicyRegistryABI](variables/PolicyRegistryABI.md) +- [PolicyRegistryArtifact](variables/PolicyRegistryArtifact.md) - [REGISTRY\_ADDRESS](variables/REGISTRY_ADDRESS.md) - [RegistryABI](variables/RegistryABI.md) - [RegistryArtifact](variables/RegistryArtifact.md) @@ -152,6 +228,8 @@ - [SEPOLIA\_CONTRACTS](variables/SEPOLIA_CONTRACTS.md) - [SEPOLIA\_V2\_VERSIONS](variables/SEPOLIA_V2_VERSIONS.md) - [SERVICE\_FEE\_RATE](variables/SERVICE_FEE_RATE.md) +- [SessionKeyValidatorABI](variables/SessionKeyValidatorABI.md) +- [SessionKeyValidatorArtifact](variables/SessionKeyValidatorArtifact.md) - [SimpleAccountABI](variables/SimpleAccountABI.md) - [SimpleAccountArtifact](variables/SimpleAccountArtifact.md) - [SimpleAccountFactoryABI](variables/SimpleAccountFactoryABI.md) @@ -165,6 +243,8 @@ - [TEST\_TOKEN\_ADDRESSES](variables/TEST_TOKEN_ADDRESSES.md) - [TOKEN\_ADDRESSES](variables/TOKEN_ADDRESSES.md) - [V2\_SUMMARY](variables/V2_SUMMARY.md) +- [X402FacilitatorABI](variables/X402FacilitatorABI.md) +- [X402FacilitatorArtifact](variables/X402FacilitatorArtifact.md) - [XPNTS\_FACTORY\_ADDRESS](variables/XPNTS_FACTORY_ADDRESS.md) - [xPNTsFactoryABI](variables/xPNTsFactoryABI.md) - [xPNTsFactoryArtifact](variables/xPNTsFactoryArtifact.md) @@ -175,15 +255,28 @@ - [accountActions](functions/accountActions.md) - [accountFactoryActions](functions/accountFactoryActions.md) +- [agentActions](functions/agentActions.md) +- [agentRegistryActions](functions/agentRegistryActions.md) - [aggregatorActions](functions/aggregatorActions.md) +- [airAccountActions](functions/airAccountActions.md) +- [airAccountFactoryActions](functions/airAccountFactoryActions.md) - [applyConfig](functions/applyConfig.md) +- [blsAlgorithmActions](functions/blsAlgorithmActions.md) +- [channelActions](functions/channelActions.md) - [createAAStarPublicClient](functions/createAAStarPublicClient.md) +- [createHeliosTransport](functions/createHeliosTransport.md) +- [describeSupportedChains](functions/describeSupportedChains.md) - [dvtActions](functions/dvtActions.md) +- [encodeDVTAccountSignature](functions/encodeDVTAccountSignature.md) +- [encodeDVTVerifierProof](functions/encodeDVTVerifierProof.md) +- [encodeG2Point](functions/encodeG2Point.md) - [entryPointActions](functions/entryPointActions.md) +- [forceExitActions](functions/forceExitActions.md) - [getAddressUrl](functions/getAddressUrl.md) - [getAllCommunityConfigs](functions/getAllCommunityConfigs.md) - [getAllV2Contracts](functions/getAllV2Contracts.md) - [getBlockExplorer](functions/getBlockExplorer.md) +- [getCanonicalAddresses](functions/getCanonicalAddresses.md) - [getChainId](functions/getChainId.md) - [getCommunities](functions/getCommunities.md) - [getCommunity](functions/getCommunity.md) @@ -208,16 +301,28 @@ - [getV2ContractByName](functions/getV2ContractByName.md) - [getV2ContractsByDate](functions/getV2ContractsByDate.md) - [gTokenActions](functions/gTokenActions.md) +- [gTokenAuthorizationActions](functions/gTokenAuthorizationActions.md) +- [hashToFieldU0U1](functions/hashToFieldU0U1.md) - [isContractNetworkSupported](functions/isContractNetworkSupported.md) - [isRegisteredCommunity](functions/isRegisteredCommunity.md) +- [isSupportedChainId](functions/isSupportedChainId.md) - [isV2Contract](functions/isV2Contract.md) +- [listSupportedChainIds](functions/listSupportedChainIds.md) +- [lookupAddress](functions/lookupAddress.md) - [paymasterActions](functions/paymasterActions.md) - [paymasterFactoryActions](functions/paymasterFactoryActions.md) +- [policyRegistryActions](functions/policyRegistryActions.md) - [registryActions](functions/registryActions.md) - [reputationActions](functions/reputationActions.md) +- [resolveEns](functions/resolveEns.md) +- [resolveEnsVerified](functions/resolveEnsVerified.md) - [sbtActions](functions/sbtActions.md) +- [sessionKeyValidatorActions](functions/sessionKeyValidatorActions.md) - [stakingActions](functions/stakingActions.md) - [superPaymasterActions](functions/superPaymasterActions.md) - [tokenActions](functions/tokenActions.md) +- [x402Actions](functions/x402Actions.md) +- [x402IsNonceUsed](functions/x402IsNonceUsed.md) +- [x402NonceKey](functions/x402NonceKey.md) - [xPNTsFactoryActions](functions/xPNTsFactoryActions.md) - [xPNTsTokenActions](functions/xPNTsTokenActions.md) diff --git a/api/@aastar/core/interfaces/AccountBalance.md b/api/@aastar/core/interfaces/AccountBalance.md index 8a0f77434..66a213033 100644 --- a/api/@aastar/core/interfaces/AccountBalance.md +++ b/api/@aastar/core/interfaces/AccountBalance.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L36) +Defined in: [packages/core/src/actions/StateValidator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L36) ## Properties @@ -6,7 +6,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:36](https://github.com/ > **address**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L37) +Defined in: [packages/core/src/actions/StateValidator.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L37) *** @@ -14,7 +14,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:37](https://github.com/ > **aPNTs**: `bigint` -Defined in: [packages/core/src/actions/StateValidator.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L40) +Defined in: [packages/core/src/actions/StateValidator.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L40) *** @@ -22,7 +22,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:40](https://github.com/ > **eth**: `bigint` -Defined in: [packages/core/src/actions/StateValidator.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L38) +Defined in: [packages/core/src/actions/StateValidator.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L38) *** @@ -30,7 +30,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:38](https://github.com/ > **gToken**: `bigint` -Defined in: [packages/core/src/actions/StateValidator.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L39) +Defined in: [packages/core/src/actions/StateValidator.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L39) *** @@ -38,4 +38,4 @@ Defined in: [packages/core/src/actions/StateValidator.ts:39](https://github.com/ > **xPNTs**: `bigint` -Defined in: [packages/core/src/actions/StateValidator.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L41) +Defined in: [packages/core/src/actions/StateValidator.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L41) diff --git a/api/@aastar/core/interfaces/BalanceValidationParams.md b/api/@aastar/core/interfaces/BalanceValidationParams.md index 1e8f43a28..ee9fd2c1b 100644 --- a/api/@aastar/core/interfaces/BalanceValidationParams.md +++ b/api/@aastar/core/interfaces/BalanceValidationParams.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L17) +Defined in: [packages/core/src/actions/StateValidator.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L17) Interface definitions @@ -16,7 +16,7 @@ Interface definitions > **address**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L18) +Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L18) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/ > **chain**: [`Chain`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L8) +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) #### Inherited from @@ -36,7 +36,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/A > `optional` **minBalance**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L19) +Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L19) *** @@ -44,7 +44,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/ > **rpcUrl**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L7) +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) #### Inherited from diff --git a/api/@aastar/core/interfaces/BundlerResponse.md b/api/@aastar/core/interfaces/BundlerResponse.md index dd03e8f9c..82ffa0770 100644 --- a/api/@aastar/core/interfaces/BundlerResponse.md +++ b/api/@aastar/core/interfaces/BundlerResponse.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/clients/BundlerClient.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L16) +Defined in: [packages/core/src/clients/BundlerClient.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L16) ## Type Parameters @@ -12,7 +12,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:16](https://github.com/A > `optional` **error**: `object` -Defined in: [packages/core/src/clients/BundlerClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L20) +Defined in: [packages/core/src/clients/BundlerClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L20) #### code @@ -32,7 +32,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:20](https://github.com/A > **id**: `number` -Defined in: [packages/core/src/clients/BundlerClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L18) +Defined in: [packages/core/src/clients/BundlerClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L18) *** @@ -40,7 +40,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:18](https://github.com/A > **jsonrpc**: `"2.0"` -Defined in: [packages/core/src/clients/BundlerClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L17) +Defined in: [packages/core/src/clients/BundlerClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L17) *** @@ -48,4 +48,4 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:17](https://github.com/A > `optional` **result**: `T` -Defined in: [packages/core/src/clients/BundlerClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L19) +Defined in: [packages/core/src/clients/BundlerClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L19) diff --git a/api/@aastar/core/interfaces/CheckResourcesOptions.md b/api/@aastar/core/interfaces/CheckResourcesOptions.md new file mode 100644 index 000000000..53f3be287 --- /dev/null +++ b/api/@aastar/core/interfaces/CheckResourcesOptions.md @@ -0,0 +1,13 @@ +Defined in: [packages/core/src/requirementChecker.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L60) + +Optional threshold overrides for [RequirementChecker.checkResources](../classes/RequirementChecker.md#checkresources). + +## Properties + +### requiredStake? + +> `optional` **requiredStake**: `bigint` + +Defined in: [packages/core/src/requirementChecker.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L62) + +Minimum role stake (defaults: 30 GT for AOA, 50 GT for AOA+). diff --git a/api/@aastar/core/interfaces/ClientConfig.md b/api/@aastar/core/interfaces/ClientConfig.md index ee41198ed..d22f9fc36 100644 --- a/api/@aastar/core/interfaces/ClientConfig.md +++ b/api/@aastar/core/interfaces/ClientConfig.md @@ -1,22 +1,14 @@ -Defined in: [packages/core/src/clients/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L7) +Defined in: [packages/core/src/clients/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L7) Base configuration for all L2 Business Clients -## Extended by - -- [`CommunityClientConfig`](../../enduser/interfaces/CommunityClientConfig.md) -- [`UserClientConfig`](../../enduser/interfaces/UserClientConfig.md) -- [`UserLifecycleConfig`](../../enduser/interfaces/UserLifecycleConfig.md) -- [`OperatorClientConfig`](../../operator/interfaces/OperatorClientConfig.md) -- [`ProtocolClientConfig`](../../operator/interfaces/ProtocolClientConfig.md) - ## Properties ### client > **client**: [`WalletClient`](WalletClient.md) -Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L12) +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) Viem WalletClient for write operations. Must have an account attached. @@ -27,7 +19,7 @@ Must have an account attached. > `optional` **entryPointAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L47) +Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L47) *** @@ -35,7 +27,7 @@ Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCom > `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L46) +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) *** @@ -43,7 +35,7 @@ Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCom > `optional` **gTokenAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L32) +Defined in: [packages/core/src/clients/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L32) GToken contract address. Required for operations involving token approvals and transfers. @@ -54,7 +46,7 @@ Required for operations involving token approvals and transfers. > `optional` **gTokenStakingAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L38) +Defined in: [packages/core/src/clients/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L38) GTokenStaking contract address. Required for role registration that involves staking. @@ -65,7 +57,7 @@ Required for role registration that involves staking. > `optional` **paymasterFactoryAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L44) +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) PaymasterFactory contract address. Required for deploying new PaymasterV4 instances. @@ -76,7 +68,7 @@ Required for deploying new PaymasterV4 instances. > `optional` **publicClient**: [`PublicClient`](PublicClient.md) -Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L20) +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) Optional PublicClient for read operations. If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). @@ -89,7 +81,7 @@ However, explicitly accepting PublicClient encourages separation. > `optional` **registryAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L26) +Defined in: [packages/core/src/clients/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L26) Registry contract address. Essential for looking up other contracts if not provided explicitly. @@ -100,4 +92,4 @@ Essential for looking up other contracts if not provided explicitly. > `optional` **xpntsFactoryAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L45) +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) diff --git a/api/@aastar/core/interfaces/CommunityConfig.md b/api/@aastar/core/interfaces/CommunityConfig.md index 6e5e7e491..f7cbc92d3 100644 --- a/api/@aastar/core/interfaces/CommunityConfig.md +++ b/api/@aastar/core/interfaces/CommunityConfig.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/communities.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L15) +Defined in: [packages/core/src/communities.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L15) ## Properties @@ -6,7 +6,7 @@ Defined in: [packages/core/src/communities.ts:15](https://github.com/AAStarCommu > **address**: `string` -Defined in: [packages/core/src/communities.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L18) +Defined in: [packages/core/src/communities.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L18) *** @@ -14,7 +14,7 @@ Defined in: [packages/core/src/communities.ts:18](https://github.com/AAStarCommu > **allowPermissionlessMint**: `boolean` -Defined in: [packages/core/src/communities.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L23) +Defined in: [packages/core/src/communities.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L23) *** @@ -22,7 +22,7 @@ Defined in: [packages/core/src/communities.ts:23](https://github.com/AAStarCommu > **ensName**: `string` -Defined in: [packages/core/src/communities.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L17) +Defined in: [packages/core/src/communities.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L17) *** @@ -30,7 +30,7 @@ Defined in: [packages/core/src/communities.ts:17](https://github.com/AAStarCommu > **isActive**: `boolean` -Defined in: [packages/core/src/communities.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L22) +Defined in: [packages/core/src/communities.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L22) *** @@ -38,7 +38,7 @@ Defined in: [packages/core/src/communities.ts:22](https://github.com/AAStarCommu > **name**: `string` -Defined in: [packages/core/src/communities.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L16) +Defined in: [packages/core/src/communities.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L16) *** @@ -46,7 +46,7 @@ Defined in: [packages/core/src/communities.ts:16](https://github.com/AAStarCommu > **nodeType**: [`NodeType`](../enumerations/NodeType.md) -Defined in: [packages/core/src/communities.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L21) +Defined in: [packages/core/src/communities.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L21) *** @@ -54,7 +54,7 @@ Defined in: [packages/core/src/communities.ts:21](https://github.com/AAStarCommu > **registeredAt**: `number` -Defined in: [packages/core/src/communities.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L25) +Defined in: [packages/core/src/communities.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L25) *** @@ -62,7 +62,7 @@ Defined in: [packages/core/src/communities.ts:25](https://github.com/AAStarCommu > **stakedAmount**: `string` -Defined in: [packages/core/src/communities.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L24) +Defined in: [packages/core/src/communities.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L24) *** @@ -70,7 +70,7 @@ Defined in: [packages/core/src/communities.ts:24](https://github.com/AAStarCommu > **supportedSBTs**: `string`[] -Defined in: [packages/core/src/communities.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L20) +Defined in: [packages/core/src/communities.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L20) *** @@ -78,4 +78,4 @@ Defined in: [packages/core/src/communities.ts:20](https://github.com/AAStarCommu > **xPNTsToken**: `string` -Defined in: [packages/core/src/communities.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L19) +Defined in: [packages/core/src/communities.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L19) diff --git a/api/@aastar/core/interfaces/ContractVersion.md b/api/@aastar/core/interfaces/ContractVersion.md index ecb1fe5cd..33dfe5f30 100644 --- a/api/@aastar/core/interfaces/ContractVersion.md +++ b/api/@aastar/core/interfaces/ContractVersion.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/contract-versions.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L24) +Defined in: [packages/core/src/contract-versions.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L24) Contract version information @@ -8,7 +8,7 @@ Contract version information > **address**: `string` -Defined in: [packages/core/src/contract-versions.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L34) +Defined in: [packages/core/src/contract-versions.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L34) Contract address on network @@ -18,7 +18,7 @@ Contract address on network > **deployedAt**: `string` -Defined in: [packages/core/src/contract-versions.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L32) +Defined in: [packages/core/src/contract-versions.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L32) Deployment date (YYYY-MM-DD) @@ -28,7 +28,7 @@ Deployment date (YYYY-MM-DD) > `optional` **features**: `string`[] -Defined in: [packages/core/src/contract-versions.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L36) +Defined in: [packages/core/src/contract-versions.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L36) Key features in this version @@ -38,7 +38,7 @@ Key features in this version > **name**: `string` -Defined in: [packages/core/src/contract-versions.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L26) +Defined in: [packages/core/src/contract-versions.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L26) Contract name @@ -48,7 +48,7 @@ Contract name > **version**: `string` -Defined in: [packages/core/src/contract-versions.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L28) +Defined in: [packages/core/src/contract-versions.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L28) Semantic version string (e.g., "2.0.0") @@ -58,6 +58,6 @@ Semantic version string (e.g., "2.0.0") > **versionCode**: `number` -Defined in: [packages/core/src/contract-versions.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L30) +Defined in: [packages/core/src/contract-versions.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L30) Numeric version code (e.g., 20000) diff --git a/api/@aastar/core/interfaces/DVTAccountSignatureParams.md b/api/@aastar/core/interfaces/DVTAccountSignatureParams.md new file mode 100644 index 000000000..1e4f0eea2 --- /dev/null +++ b/api/@aastar/core/interfaces/DVTAccountSignatureParams.md @@ -0,0 +1,53 @@ +Defined in: [packages/core/src/crypto/dvtWire.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L179) + +Parameters for [encodeDVTAccountSignature](../functions/encodeDVTAccountSignature.md). + +## Properties + +### blsSig + +> **blsSig**: `Uint8Array` \| `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L187) + +Aggregate BLS G2 signature (256-byte EIP-2537, or 96/192-byte zkcrypto). + +*** + +### guardianSig? + +> `optional` **guardianSig**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:189](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L189) + +REQUIRED for T3 (0x05): the trailing 65-byte guardian ECDSA signature. Forbidden for T2. + +*** + +### nodeIds + +> **nodeIds**: `` `0x${string}` ``[] + +Defined in: [packages/core/src/crypto/dvtWire.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L185) + +Explicit `bytes32` node IDs of the contributing signers, in signing/aggregation order. + +*** + +### p256 + +> **p256**: `` `0x${string}` `` \| \{ `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; \} + +Defined in: [packages/core/src/crypto/dvtWire.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L183) + +P256 primary signature, as `{ r, s }` (each 32 bytes) or a 64-byte `r‖s` hex value. + +*** + +### tier + +> **tier**: [`DVTTier`](../type-aliases/DVTTier.md) + +Defined in: [packages/core/src/crypto/dvtWire.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L181) + +Tier byte: [DVT\_TIER\_T2](../variables/DVT_TIER_T2.md) (0x04) or [DVT\_TIER\_T3](../variables/DVT_TIER_T3.md) (0x05). diff --git a/api/@aastar/core/interfaces/DeploymentValidationParams.md b/api/@aastar/core/interfaces/DeploymentValidationParams.md index 3a9e9c97b..804ac39c3 100644 --- a/api/@aastar/core/interfaces/DeploymentValidationParams.md +++ b/api/@aastar/core/interfaces/DeploymentValidationParams.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L26) +Defined in: [packages/core/src/actions/StateValidator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L26) Interface definitions @@ -12,7 +12,7 @@ Interface definitions > **chain**: [`Chain`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L8) +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) #### Inherited from @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/A > **contractAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L27) +Defined in: [packages/core/src/actions/StateValidator.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L27) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:27](https://github.com/ > **rpcUrl**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L7) +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) #### Inherited from diff --git a/api/@aastar/core/interfaces/EnsOptions.md b/api/@aastar/core/interfaces/EnsOptions.md new file mode 100644 index 000000000..c461e3803 --- /dev/null +++ b/api/@aastar/core/interfaces/EnsOptions.md @@ -0,0 +1,2581 @@ +Defined in: [packages/core/src/utils/ens.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L27) + +Options accepted by resolveEns and lookupAddress. + +## Properties + +### client? + +> `optional` **client**: `object` + +Defined in: [packages/core/src/utils/ens.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L33) + +viem PublicClient configured for the ENS registry chain (usually mainnet). +If omitted, a default mainnet client using the public RPC is created. +Pass your own client to control the RPC URL, caching, etc. + +#### account + +> **account**: `undefined` + +The Account of the Client. + +#### batch? + +> `optional` **batch**: `object` + +Flags for batch settings. + +##### batch.multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +###### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +#### cacheTime + +> **cacheTime**: `number` + +Time (in ms) that cached data will remain in memory. + +#### call() + +> **call**: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CallParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +##### Returns + +`Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +The call data. [CallReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +##### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +#### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) \| `undefined` + +Chain for the client. + +#### createAccessList() + +> **createAccessList**: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +Creates an EIP-2930 access list that you can include in a transaction. + +- Docs: https://viem.sh/docs/actions/public/createAccessList +- JSON-RPC Methods: `eth_createAccessList` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CreateAccessListParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +##### Returns + +`Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +The call data. [CreateAccessListReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const data = await client.createAccessList({ + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +##### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Filter. [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +#### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +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). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`CreateContractEventFilterParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> | [CreateContractEventFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateContractEventFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +#### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`CreateEventFilterParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> | [CreateEventFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateEventFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +#### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +##### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +#### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +##### Type Parameters + +| Type Parameter | +| ------ | +| `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateContractGasParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `chain`\> | [EstimateContractGasParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateContractGasReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +#### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `type` *extends* [`FeeValuesType`](https://viem.sh/docs/index.html) | `"eip1559"` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | [`EstimateFeesPerGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `type`\> | + +##### Returns + +`Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +An estimate (in wei) for the fees per gas. [EstimateFeesPerGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +#### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [EstimateGasParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `chain`: `chainOverride` \| `null`; \} | +| `args.chain?` | `chainOverride` \| `null` | + +##### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. [EstimateMaxPriorityFeePerGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +#### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Default block tag to use for RPC requests. + +#### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +##### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`\>\> | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +##### Returns + +[`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +#### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | + +##### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetBalanceParameters`](https://viem.sh/docs/index.html) | [GetBalanceParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. [GetBalanceReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +#### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +##### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). [GetBlobBaseFeeReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +#### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockParameters`](https://viem.sh/docs/index.html)\<`includeTransactions`, `blockTag`\> | [GetBlockParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Information about the block. [GetBlockReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +#### getBlockNumber() + +> **getBlockNumber**: (`args?`) => `Promise`\<`bigint`\> + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockNumberParameters`](https://viem.sh/docs/index.html) | [GetBlockNumberParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The number of the block. [GetBlockNumberReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +#### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args?`) => `Promise`\<`number`\> + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetBlockTransactionCountParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`number`\> + +The block transaction count. [GetBlockTransactionCountReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +#### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +##### Deprecated + +Use `getCode` instead. + +#### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +##### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +#### getCode() + +> **getCode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | GetBytecodeParameters | + +##### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +The contract's bytecode. GetBytecodeReturnType + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +#### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetContractEventsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | + +##### Returns + +`Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetContractEventsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +#### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetEip712DomainParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +The EIP-712 domain, fields, and extensions. [GetEip712DomainReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +#### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAddressParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | Name to get the address for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS name or `null` if not found. [GetEnsAddressReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +#### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `assetGatewayUrls?`: [`AssetGatewayUrls`](https://viem.sh/docs/index.html); `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAvatarParameters](https://viem.sh/docs/index.html) | +| `args.assetGatewayUrls?` | [`AssetGatewayUrls`](https://viem.sh/docs/index.html) | Gateway urls to resolve IPFS and/or Arweave assets. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Avatar URI or `null` if not found. [GetEnsAvatarReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +#### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsNameParameters](https://viem.sh/docs/index.html) | +| `args.address` | `` `0x${string}` `` | Address to get ENS name for. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Name or `null` if not found. [GetEnsNameReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +#### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `name`: `string`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsResolverParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.name` | `string` | Name to get the address for. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +Address for ENS resolver. [GetEnsResolverReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +#### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `key`: `string`; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsTextParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.key` | `string` | Text record to retrieve. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS resolver. [GetEnsTextReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +#### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFeeHistoryParameters`](https://viem.sh/docs/index.html) | [GetFeeHistoryParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +The gas estimate (in wei). [GetFeeHistoryReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +#### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterChangesParameters`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterChangesParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. [GetFilterChangesReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +##### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +#### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterLogsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterLogsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetFilterLogsReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +##### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +#### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +##### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). [GetGasPriceReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +#### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetLogsParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> | [GetLogsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetLogsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +#### getProof() + +> **getProof**: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetProofParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Proof data. [GetProofReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +#### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetStorageAtParameters`](https://viem.sh/docs/index.html) | [GetStorageAtParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +The value of the storage slot. [GetStorageAtReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +#### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionParameters`](https://viem.sh/docs/index.html)\<`blockTag`\> | [GetTransactionParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +The transaction information. [GetTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionConfirmationsParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [GetTransactionConfirmationsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. [GetTransactionConfirmationsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetTransactionCountParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. [GetTransactionCountReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionReceiptParameters`](https://viem.sh/docs/index.html) | [GetTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [GetTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### key + +> **key**: `string` + +A key for the client. + +#### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `contracts` *extends* readonly `unknown`[] | - | +| `allowFailure` *extends* `boolean` | `true` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`MulticallParameters`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\> | [MulticallParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. [MulticallReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +#### name + +> **name**: `string` + +A name for the client. + +#### pollingInterval + +> **pollingInterval**: `number` + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +#### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${(...)}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${(...)}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +##### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +#### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts + +##### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`ReadContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\> | [ReadContractParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. [ReadContractReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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. + +Internally, 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). + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +#### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> + +Request function wrapped with friendly error handling + +#### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### ~~simulate()~~ + +> **simulate**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +##### Deprecated + +Use `simulateBlocks` instead. + +#### simulateBlocks() + +> **simulateBlocks**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls on block(s) with optional block and state overrides. + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulated blocks. SimulateReturnType + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateBlocks({ + blocks: [{ + blockOverrides: { + number: 69420n, + }, + calls: [{ + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + }], + stateOverrides: [{ + address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + balance: parseEther('10'), + }], + }] +}) +``` + +#### simulateCalls() + +> **simulateCalls**: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls. + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateCallsParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Results. [SimulateCallsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateCalls({ + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + calls: [{ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + ] +}) +``` + +#### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SimulateContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | [SimulateContractParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. [SimulateContractReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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. + +Internally, 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). + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### transport + +> **transport**: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> + +The RPC transport + +#### type + +> **type**: `string` + +The type of client. + +#### uid + +> **uid**: `string` + +A unique ID for the client. + +#### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`UninstallFilterParameters`](https://viem.sh/docs/index.html) | [UninstallFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. [UninstallFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +#### verifyHash() + +> **verifyHash**: (`args`) => `Promise`\<`boolean`\> + +Verify that a hash was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyHashParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyHashReturnType](https://viem.sh/docs/index.html) + +#### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args.address` | `` `0x${string}` `` | The address that signed the original message. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `null` | The chain to use. | +| `args.erc6492VerifierAddress?` | `` `0x${string}` `` | The address of the ERC-6492 signature verifier contract. | +| `args.factory?` | `` `0x${string}` `` | - | +| `args.factoryData?` | `` `0x${string}` `` | - | +| `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | +| `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | +| `args.signature` | `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyMessageReturnType](https://viem.sh/docs/index.html) + +#### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address?`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `domain?`: `string`; `message`: `string`; `nonce?`: `string`; `scheme?`: `string`; `signature`: `` `0x${string}` ``; `time?`: `Date`; \} | - | +| `args.address?` | `` `0x${string}` `` | Ethereum address to check against. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.domain?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. | +| `args.message` | `string` | EIP-4361 formatted message. | +| `args.nonce?` | `string` | Random string to check against. | +| `args.scheme?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. | +| `args.signature` | `` `0x${string}` `` | Signature to check against. | +| `args.time?` | `Date` | Current time to check optional `expirationTime` and `notBefore` fields. **Default** `new Date()` | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifySiweMessageReturnType](https://viem.sh/docs/index.html) + +#### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyTypedDataParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyTypedDataReturnType](https://viem.sh/docs/index.html) + +#### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WaitForTransactionReceiptParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [WaitForTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [WaitForTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlockNumberParameters`](https://viem.sh/docs/index.html) | [WatchBlockNumberParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlockNumberReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +#### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlocksParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `includeTransactions`, `blockTag`\> | [WatchBlocksParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlocksReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +#### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchContractEventParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchContractEventParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new event logs. [WatchContractEventReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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). + +`watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +#### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchEventParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchEventParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new Event Logs. [WatchEventReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +#### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchPendingTransactionsParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html)\> | [WatchPendingTransactionsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new pending transaction hashes. [WatchPendingTransactionsReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +*** + +### rpcUrl? + +> `optional` **rpcUrl**: `string` + +Defined in: [packages/core/src/utils/ens.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L39) + +Mainnet JSON-RPC URL. Only used when `client` is not provided. +Defaults to the viem public mainnet RPC. diff --git a/api/@aastar/core/interfaces/HashToFieldU0U1.md b/api/@aastar/core/interfaces/HashToFieldU0U1.md new file mode 100644 index 000000000..3d71de8a2 --- /dev/null +++ b/api/@aastar/core/interfaces/HashToFieldU0U1.md @@ -0,0 +1,75 @@ +Defined in: [packages/core/src/crypto/hashToField.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L29) + +The two Fp2 field elements (u0, u1) produced by `hash_to_field(msg, DST, 2)`, +each serialized in EIP-2537 split form to mirror SuperPaymaster's on-chain +`BLS.G2Point` X-coordinate layout. + +Each Fp2 element has two coordinates (c0, c1). Each Fp (a BLS12-381 base-field +element, 48 bytes) is serialized EIP-2537-style as 64 bytes +(16 zero bytes + 48-byte big-endian) and split into two bytes32: + - `a` = high 32 bytes (16 zero bytes + top 16 bytes of the field element) + - `b` = low 32 bytes (bottom 32 bytes of the field element) + +## Properties + +### u0c0a + +> **u0c0a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L31) + +*** + +### u0c0b + +> **u0c0b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L32) + +*** + +### u0c1a + +> **u0c1a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L33) + +*** + +### u0c1b + +> **u0c1b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L34) + +*** + +### u1c0a + +> **u1c0a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L36) + +*** + +### u1c0b + +> **u1c0b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L37) + +*** + +### u1c1a + +> **u1c1a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L38) + +*** + +### u1c1b + +> **u1c1b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L39) diff --git a/api/@aastar/core/interfaces/HeliosTransportConfig.md b/api/@aastar/core/interfaces/HeliosTransportConfig.md new file mode 100644 index 000000000..3afb880ba --- /dev/null +++ b/api/@aastar/core/interfaces/HeliosTransportConfig.md @@ -0,0 +1,43 @@ +Defined in: [packages/core/src/transports/helios.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L31) + +## Properties + +### consensusRpcUrl + +> **consensusRpcUrl**: `string` + +Defined in: [packages/core/src/transports/helios.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L42) + +Consensus-layer REST beacon URL (used for light client sync). +Example: "https://www.lightclientdata.org" + +*** + +### executionRpcUrl + +> **executionRpcUrl**: `string` + +Defined in: [packages/core/src/transports/helios.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L36) + +Execution-layer JSON-RPC URL (used for historical state, mempool). +Example: "https://eth.llamarpc.com" + +*** + +### network? + +> `optional` **network**: `"mainnet"` \| `"sepolia"` + +Defined in: [packages/core/src/transports/helios.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L47) + +Network name. Defaults to "mainnet". Also accepts "sepolia". + +*** + +### transportConfig? + +> `optional` **transportConfig**: [`CustomTransportConfig`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/transports/helios.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L52) + +Options forwarded to viem's custom() transport (timeout, retryCount, etc.) diff --git a/api/@aastar/core/interfaces/PublicClient.md b/api/@aastar/core/interfaces/PublicClient.md index 459221cf0..6cfde74b5 100644 --- a/api/@aastar/core/interfaces/PublicClient.md +++ b/api/@aastar/core/interfaces/PublicClient.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/clients/doc-types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/doc-types.ts#L7) +Defined in: [packages/core/src/clients/doc-types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/doc-types.ts#L7) Public Client Interface Standardized interface for reading from the blockchain. @@ -260,9 +260,9 @@ Creates a Filter to retrieve event logs that can be used with [`getFilterChanges | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | | `eventName` *extends* `string` \| `undefined` | - | -| `args` *extends* `Record`\<`string`, `unknown`\> \| readonly `unknown`[] \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | | `strict` *extends* `boolean` \| `undefined` | `undefined` | | `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | | `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | @@ -321,7 +321,7 @@ Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for n | `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | | `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | | `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | -| `_Args` *extends* `Record`\<`string`, `unknown`\> \| readonly `unknown`[] \| `undefined` | `undefined` | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | #### Parameters @@ -408,7 +408,7 @@ Estimates the gas required to successfully execute a contract write function cal | Type Parameter | | ------ | | `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | -| `abi` *extends* `Abi` \| readonly `unknown`[] | +| `abi` *extends* readonly `unknown`[] \| `Abi` | | `functionName` *extends* `string` | | `args` *extends* `unknown` | @@ -1049,7 +1049,7 @@ Returns a list of event logs emitted by a contract. | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | | `eventName` *extends* `string` \| `undefined` | `undefined` | | `strict` *extends* `boolean` \| `undefined` | `undefined` | | `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | @@ -1494,7 +1494,7 @@ Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter | Type Parameter | Default type | | ------ | ------ | | `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | -| `abi` *extends* `Abi` \| readonly `unknown`[] \| `undefined` | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | | `eventName` *extends* `string` \| `undefined` | - | | `strict` *extends* `boolean` \| `undefined` | `undefined` | | `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | @@ -1609,7 +1609,7 @@ Returns a list of event logs since the filter was created. | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] \| `undefined` | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | | `eventName` *extends* `string` \| `undefined` | - | | `strict` *extends* `boolean` \| `undefined` | `undefined` | | `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | @@ -2131,7 +2131,7 @@ Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 millis ### prepareTransactionRequest() -> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\, "from"\> & (DeriveChain\<(...), (...)\> extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1069 @@ -2155,7 +2155,7 @@ Prepares a transaction request for signing. #### Returns -`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\, "from"\> & (DeriveChain\<(...), (...)\> extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) @@ -2214,7 +2214,7 @@ Calls a read-only function on a contract, and returns the response. | Type Parameter | | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | +| `abi` *extends* readonly `unknown`[] \| `Abi` | | `functionName` *extends* `string` | | `args` *extends* `unknown` | @@ -2541,7 +2541,7 @@ Simulates/validates a contract interaction. This is useful for retrieving **retu | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | | `functionName` *extends* `string` | - | | `args` *extends* `unknown` | - | | `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | @@ -2721,7 +2721,7 @@ Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-649 | Parameter | Type | Description | | ------ | ------ | ------ | -| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `` `0x${string}` `` \| `Uint8Array` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | | `args.address` | `` `0x${string}` `` | The address that signed the original message. | | `args.blockNumber?` | `bigint` | The balance of the account at a block number. | | `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | @@ -2731,7 +2731,7 @@ Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-649 | `args.factoryData?` | `` `0x${string}` `` | - | | `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | | `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | -| `args.signature` | `` `0x${string}` `` \| `Uint8Array` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.signature` | `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | | `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | #### Returns @@ -2990,7 +2990,7 @@ Watches and returns emitted contract event logs. | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | | `eventName` *extends* `string` | - | | `strict` *extends* `boolean` \| `undefined` | `undefined` | diff --git a/api/@aastar/core/interfaces/ResourceBoolCheck.md b/api/@aastar/core/interfaces/ResourceBoolCheck.md new file mode 100644 index 000000000..f54bb779f --- /dev/null +++ b/api/@aastar/core/interfaces/ResourceBoolCheck.md @@ -0,0 +1,19 @@ +Defined in: [packages/core/src/requirementChecker.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L27) + +Boolean sub-check result (role / SBT). + +## Properties + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L29) + +*** + +### value + +> **value**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L28) diff --git a/api/@aastar/core/interfaces/ResourceReport.md b/api/@aastar/core/interfaces/ResourceReport.md new file mode 100644 index 000000000..f1b8baa24 --- /dev/null +++ b/api/@aastar/core/interfaces/ResourceReport.md @@ -0,0 +1,60 @@ +Defined in: [packages/core/src/requirementChecker.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L45) + +Aggregated readiness report for a given [OperatorMode](../type-aliases/OperatorMode.md). +Mirrors the structured-report style of PaymasterV4 `checkGaslessReadiness`. + +## Properties + +### checks + +> **checks**: `object` + +Defined in: [packages/core/src/requirementChecker.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L50) + +Only the sub-checks relevant to the requested mode are populated. + +#### role? + +> `optional` **role**: [`ResourceBoolCheck`](ResourceBoolCheck.md) & `object` + +##### Type Declaration + +###### roleId + +> **roleId**: `` `0x${string}` `` + +#### sbt? + +> `optional` **sbt**: [`ResourceBoolCheck`](ResourceBoolCheck.md) + +#### stake? + +> `optional` **stake**: [`ResourceStakeCheck`](ResourceStakeCheck.md) + +*** + +### issues + +> **issues**: `string`[] + +Defined in: [packages/core/src/requirementChecker.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L56) + +Actionable, human-readable description of each unmet requirement. + +*** + +### mode + +> **mode**: [`OperatorMode`](../type-aliases/OperatorMode.md) + +Defined in: [packages/core/src/requirementChecker.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L48) + +*** + +### ready + +> **ready**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L47) + +True when every relevant sub-check passed (`issues.length === 0`). diff --git a/api/@aastar/core/interfaces/ResourceStakeCheck.md b/api/@aastar/core/interfaces/ResourceStakeCheck.md new file mode 100644 index 000000000..5389e531d --- /dev/null +++ b/api/@aastar/core/interfaces/ResourceStakeCheck.md @@ -0,0 +1,31 @@ +Defined in: [packages/core/src/requirementChecker.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L33) + +Role-stake sub-check result. + +## Properties + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L38) + +*** + +### required + +> **required**: `bigint` + +Defined in: [packages/core/src/requirementChecker.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L37) + +Minimum stake required for this mode. + +*** + +### staked + +> **staked**: `bigint` + +Defined in: [packages/core/src/requirementChecker.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L35) + +Current on-chain role stake (`getRoleStake(roleId, operator)`). diff --git a/api/@aastar/core/interfaces/RoleConfig.md b/api/@aastar/core/interfaces/RoleConfig.md index ad2034cb5..6e19f911a 100644 --- a/api/@aastar/core/interfaces/RoleConfig.md +++ b/api/@aastar/core/interfaces/RoleConfig.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/roles.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L102) +Defined in: [packages/core/src/roles.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L102) Role configuration structure (matches Registry.sol RoleConfig struct) @@ -8,15 +8,7 @@ Role configuration structure (matches Registry.sol RoleConfig struct) > **description**: `string` -Defined in: [packages/core/src/roles.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L112) - -*** - -### entryBurn - -> **entryBurn**: `bigint` - -Defined in: [packages/core/src/roles.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L104) +Defined in: [packages/core/src/roles.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L112) *** @@ -24,7 +16,7 @@ Defined in: [packages/core/src/roles.ts:104](https://github.com/AAStarCommunity/ > **exitFeePercent**: `bigint` -Defined in: [packages/core/src/roles.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L109) +Defined in: [packages/core/src/roles.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L109) *** @@ -32,7 +24,7 @@ Defined in: [packages/core/src/roles.ts:109](https://github.com/AAStarCommunity/ > **isActive**: `boolean` -Defined in: [packages/core/src/roles.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L111) +Defined in: [packages/core/src/roles.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L111) *** @@ -40,7 +32,7 @@ Defined in: [packages/core/src/roles.ts:111](https://github.com/AAStarCommunity/ > **minExitFee**: `bigint` -Defined in: [packages/core/src/roles.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L110) +Defined in: [packages/core/src/roles.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L110) *** @@ -48,7 +40,7 @@ Defined in: [packages/core/src/roles.ts:110](https://github.com/AAStarCommunity/ > **minStake**: `bigint` -Defined in: [packages/core/src/roles.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L103) +Defined in: [packages/core/src/roles.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L103) *** @@ -56,7 +48,7 @@ Defined in: [packages/core/src/roles.ts:103](https://github.com/AAStarCommunity/ > **slashBase**: `number` -Defined in: [packages/core/src/roles.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L106) +Defined in: [packages/core/src/roles.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L106) *** @@ -64,7 +56,7 @@ Defined in: [packages/core/src/roles.ts:106](https://github.com/AAStarCommunity/ > **slashIncrement**: `number` -Defined in: [packages/core/src/roles.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L107) +Defined in: [packages/core/src/roles.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L107) *** @@ -72,7 +64,7 @@ Defined in: [packages/core/src/roles.ts:107](https://github.com/AAStarCommunity/ > **slashMax**: `number` -Defined in: [packages/core/src/roles.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L108) +Defined in: [packages/core/src/roles.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L108) *** @@ -80,4 +72,12 @@ Defined in: [packages/core/src/roles.ts:108](https://github.com/AAStarCommunity/ > **slashThreshold**: `number` -Defined in: [packages/core/src/roles.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L105) +Defined in: [packages/core/src/roles.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L105) + +*** + +### ticketPrice + +> **ticketPrice**: `bigint` + +Defined in: [packages/core/src/roles.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L104) diff --git a/api/@aastar/core/interfaces/RoleRequirement.md b/api/@aastar/core/interfaces/RoleRequirement.md index 606e87b73..c0606e7ee 100644 --- a/api/@aastar/core/interfaces/RoleRequirement.md +++ b/api/@aastar/core/interfaces/RoleRequirement.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/roles.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L118) +Defined in: [packages/core/src/roles.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L118) Role requirement check result @@ -8,7 +8,7 @@ Role requirement check result > **hasEnoughAPNTs**: `boolean` -Defined in: [packages/core/src/roles.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L121) +Defined in: [packages/core/src/roles.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L121) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/roles.ts:121](https://github.com/AAStarCommunity/ > **hasEnoughGToken**: `boolean` -Defined in: [packages/core/src/roles.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L120) +Defined in: [packages/core/src/roles.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L120) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/roles.ts:120](https://github.com/AAStarCommunity/ > **hasRole**: `boolean` -Defined in: [packages/core/src/roles.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L119) +Defined in: [packages/core/src/roles.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L119) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/roles.ts:119](https://github.com/AAStarCommunity/ > **hasSBT**: `boolean` -Defined in: [packages/core/src/roles.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L122) +Defined in: [packages/core/src/roles.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L122) *** @@ -40,4 +40,4 @@ Defined in: [packages/core/src/roles.ts:122](https://github.com/AAStarCommunity/ > **missingRequirements**: `string`[] -Defined in: [packages/core/src/roles.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L123) +Defined in: [packages/core/src/roles.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L123) diff --git a/api/@aastar/core/interfaces/RoleValidationParams.md b/api/@aastar/core/interfaces/RoleValidationParams.md index 3c7e169b4..118fd92dd 100644 --- a/api/@aastar/core/interfaces/RoleValidationParams.md +++ b/api/@aastar/core/interfaces/RoleValidationParams.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L11) +Defined in: [packages/core/src/actions/StateValidator.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L11) Interface definitions @@ -12,7 +12,7 @@ Interface definitions > **chain**: [`Chain`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L8) +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) #### Inherited from @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/A > **registryAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L12) +Defined in: [packages/core/src/actions/StateValidator.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L12) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:12](https://github.com/ > **roleId**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L13) +Defined in: [packages/core/src/actions/StateValidator.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L13) *** @@ -40,7 +40,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:13](https://github.com/ > **rpcUrl**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L7) +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) #### Inherited from @@ -52,4 +52,4 @@ Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/A > **userAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L14) +Defined in: [packages/core/src/actions/StateValidator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L14) diff --git a/api/@aastar/core/interfaces/SuperPaymasterConfig.md b/api/@aastar/core/interfaces/SuperPaymasterConfig.md index d6b661c59..4ac5fc950 100644 --- a/api/@aastar/core/interfaces/SuperPaymasterConfig.md +++ b/api/@aastar/core/interfaces/SuperPaymasterConfig.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/config/ContractConfigManager.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L4) +Defined in: [packages/core/src/config/ContractConfigManager.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L4) ## Properties @@ -6,7 +6,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:4](https://github > **entryPoint**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L11) +Defined in: [packages/core/src/config/ContractConfigManager.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L11) *** @@ -14,7 +14,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:11](https://githu > **gToken**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L6) +Defined in: [packages/core/src/config/ContractConfigManager.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L6) *** @@ -22,7 +22,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:6](https://github > **gTokenStaking**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L7) +Defined in: [packages/core/src/config/ContractConfigManager.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L7) *** @@ -30,7 +30,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:7](https://github > **paymasterFactory**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L9) +Defined in: [packages/core/src/config/ContractConfigManager.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L9) *** @@ -38,7 +38,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:9](https://github > **paymasterV4**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L10) +Defined in: [packages/core/src/config/ContractConfigManager.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L10) *** @@ -46,7 +46,7 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:10](https://githu > **registry**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L5) +Defined in: [packages/core/src/config/ContractConfigManager.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L5) *** @@ -54,4 +54,4 @@ Defined in: [packages/core/src/config/ContractConfigManager.ts:5](https://github > **superPaymaster**: `` `0x${string}` `` -Defined in: [packages/core/src/config/ContractConfigManager.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/config/ContractConfigManager.ts#L8) +Defined in: [packages/core/src/config/ContractConfigManager.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L8) diff --git a/api/@aastar/core/interfaces/TokenBalanceValidationParams.md b/api/@aastar/core/interfaces/TokenBalanceValidationParams.md index ffee99cee..5d7317b76 100644 --- a/api/@aastar/core/interfaces/TokenBalanceValidationParams.md +++ b/api/@aastar/core/interfaces/TokenBalanceValidationParams.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L22) +Defined in: [packages/core/src/actions/StateValidator.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L22) Interface definitions @@ -12,7 +12,7 @@ Interface definitions > **address**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L18) +Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L18) #### Inherited from @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/ > **chain**: [`Chain`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L8) +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) #### Inherited from @@ -36,7 +36,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/A > `optional` **minBalance**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L19) +Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L19) #### Inherited from @@ -48,7 +48,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/ > **rpcUrl**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L7) +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) #### Inherited from @@ -60,4 +60,4 @@ Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/A > **tokenAddress**: `` `0x${string}` `` -Defined in: [packages/core/src/actions/StateValidator.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L23) +Defined in: [packages/core/src/actions/StateValidator.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L23) diff --git a/api/@aastar/core/interfaces/TransactionOptions.md b/api/@aastar/core/interfaces/TransactionOptions.md index 126cefdfa..1dab79ba6 100644 --- a/api/@aastar/core/interfaces/TransactionOptions.md +++ b/api/@aastar/core/interfaces/TransactionOptions.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/clients/types.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L53) +Defined in: [packages/core/src/clients/types.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L53) Common options for transaction methods @@ -8,7 +8,7 @@ Common options for transaction methods > `optional` **account**: `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/clients/types.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L58) +Defined in: [packages/core/src/clients/types.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L58) Override the account to use for the transaction. If not provided, uses the account from the WalletClient. @@ -19,6 +19,6 @@ If not provided, uses the account from the WalletClient. > `optional` **value**: `bigint` -Defined in: [packages/core/src/clients/types.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L63) +Defined in: [packages/core/src/clients/types.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L63) Optional value to send with the transaction (in wei) diff --git a/api/@aastar/core/interfaces/UserOperationV07.md b/api/@aastar/core/interfaces/UserOperationV07.md index 094300f3f..2d553e8c3 100644 --- a/api/@aastar/core/interfaces/UserOperationV07.md +++ b/api/@aastar/core/interfaces/UserOperationV07.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/clients/BundlerClient.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L4) +Defined in: [packages/core/src/clients/BundlerClient.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L4) ## Properties @@ -6,7 +6,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:4](https://github.com/AA > **accountGasLimits**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L9) +Defined in: [packages/core/src/clients/BundlerClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L9) *** @@ -14,7 +14,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:9](https://github.com/AA > **callData**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L8) +Defined in: [packages/core/src/clients/BundlerClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L8) *** @@ -22,7 +22,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:8](https://github.com/AA > **gasFees**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L11) +Defined in: [packages/core/src/clients/BundlerClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L11) *** @@ -30,7 +30,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:11](https://github.com/A > **initCode**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L7) +Defined in: [packages/core/src/clients/BundlerClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L7) *** @@ -38,7 +38,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:7](https://github.com/AA > **nonce**: `bigint` -Defined in: [packages/core/src/clients/BundlerClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L6) +Defined in: [packages/core/src/clients/BundlerClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L6) *** @@ -46,7 +46,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:6](https://github.com/AA > **paymasterAndData**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L12) +Defined in: [packages/core/src/clients/BundlerClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L12) *** @@ -54,7 +54,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:12](https://github.com/A > **preVerificationGas**: `bigint` -Defined in: [packages/core/src/clients/BundlerClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L10) +Defined in: [packages/core/src/clients/BundlerClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L10) *** @@ -62,7 +62,7 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:10](https://github.com/A > **sender**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L5) +Defined in: [packages/core/src/clients/BundlerClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L5) *** @@ -70,4 +70,4 @@ Defined in: [packages/core/src/clients/BundlerClient.ts:5](https://github.com/AA > **signature**: `` `0x${string}` `` -Defined in: [packages/core/src/clients/BundlerClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/BundlerClient.ts#L13) +Defined in: [packages/core/src/clients/BundlerClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L13) diff --git a/api/@aastar/core/interfaces/ValidationParams.md b/api/@aastar/core/interfaces/ValidationParams.md index b7f116436..83d1ca2f2 100644 --- a/api/@aastar/core/interfaces/ValidationParams.md +++ b/api/@aastar/core/interfaces/ValidationParams.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L6) +Defined in: [packages/core/src/actions/StateValidator.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L6) Interface definitions @@ -14,7 +14,7 @@ Interface definitions > **chain**: [`Chain`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L8) +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) *** @@ -22,4 +22,4 @@ Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/A > **rpcUrl**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L7) +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) diff --git a/api/@aastar/core/interfaces/ValidationResult.md b/api/@aastar/core/interfaces/ValidationResult.md index 45011b05f..d1c2c5b36 100644 --- a/api/@aastar/core/interfaces/ValidationResult.md +++ b/api/@aastar/core/interfaces/ValidationResult.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/actions/StateValidator.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L30) +Defined in: [packages/core/src/actions/StateValidator.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L30) ## Properties @@ -6,7 +6,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:30](https://github.com/ > `optional` **data**: `any` -Defined in: [packages/core/src/actions/StateValidator.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L33) +Defined in: [packages/core/src/actions/StateValidator.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L33) *** @@ -14,7 +14,7 @@ Defined in: [packages/core/src/actions/StateValidator.ts:33](https://github.com/ > `optional` **message**: `string` -Defined in: [packages/core/src/actions/StateValidator.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L32) +Defined in: [packages/core/src/actions/StateValidator.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L32) *** @@ -22,4 +22,4 @@ Defined in: [packages/core/src/actions/StateValidator.ts:32](https://github.com/ > **valid**: `boolean` -Defined in: [packages/core/src/actions/StateValidator.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/StateValidator.ts#L31) +Defined in: [packages/core/src/actions/StateValidator.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L31) diff --git a/api/@aastar/core/interfaces/WalletClient.md b/api/@aastar/core/interfaces/WalletClient.md index c8810c2b9..a03636c1f 100644 --- a/api/@aastar/core/interfaces/WalletClient.md +++ b/api/@aastar/core/interfaces/WalletClient.md @@ -1,4 +1,4 @@ -Defined in: [packages/core/src/clients/doc-types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/doc-types.ts#L13) +Defined in: [packages/core/src/clients/doc-types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/doc-types.ts#L13) Wallet Client Interface Standardized interface for interacting with Ethereum wallets and accounts. @@ -179,7 +179,7 @@ Deploys a contract to the network, given bytecode and constructor arguments. | Type Parameter | | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | +| `abi` *extends* readonly `unknown`[] \| `Abi` | | `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | #### Parameters @@ -394,7 +394,7 @@ const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) ### getCapabilities() -> **getCapabilities**: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ("address" \| "p256" \| "webcrypto-p256" \| "webauthn-p256")\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> +> **getCapabilities**: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ("address" \| "p256" \| "webcrypto-p256" \| "webauthn-p256")\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: (...) \| (...) \| (...) \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: (...)\[\]; supported: boolean \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:166 @@ -417,7 +417,7 @@ Extract capabilities that a connected wallet supports (e.g. paymasters, session #### Returns -`Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ("address" \| "p256" \| "webcrypto-p256" \| "webauthn-p256")\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> +`Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ("address" \| "p256" \| "webcrypto-p256" \| "webauthn-p256")\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: (...) \| (...) \| (...) \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: (...)\[\]; supported: boolean \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> The wallet's capabilities. [GetCapabilitiesReturnType](https://viem.sh/docs/index.html) @@ -624,7 +624,7 @@ const authorization = await client.prepareAuthorization({ ### prepareTransactionRequest() -> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\, "from"\> & (DeriveChain\<(...), (...)\> extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:286 @@ -648,7 +648,7 @@ Prepares a transaction request for signing. #### Returns -`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\, "from"\> & (DeriveChain\<(...), (...)\> extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) @@ -1422,7 +1422,7 @@ Signs typed data and calculates an Ethereum-specific signature in [EIP-191 forma | Type Parameter | | ------ | -| `typedData` *extends* \{\[`key`: `string`\]: readonly `TypedDataParameter`[]; \[`key`: `` `string[${string}]` ``\]: `undefined`; \[`key`: `` `function[${string}]` ``\]: `undefined`; \[`key`: `` `address[${string}]` ``\]: `undefined`; \[`key`: `` `bool[${string}]` ``\]: `undefined`; \[`key`: `` `bytes[${string}]` ``\]: `undefined`; \[`key`: `` `bytes10[${string}]` ``\]: `undefined`; \[`key`: `` `bytes1[${string}]` ``\]: `undefined`; \[`key`: `` `bytes2[${string}]` ``\]: `undefined`; \[`key`: `` `bytes3[${string}]` ``\]: `undefined`; \[`key`: `` `bytes4[${string}]` ``\]: `undefined`; \[`key`: `` `bytes5[${string}]` ``\]: `undefined`; \[`key`: `` `bytes6[${string}]` ``\]: `undefined`; \[`key`: `` `bytes7[${string}]` ``\]: `undefined`; \[`key`: `` `bytes8[${string}]` ``\]: `undefined`; \[`key`: `` `bytes9[${string}]` ``\]: `undefined`; \[`key`: `` `bytes11[${string}]` ``\]: `undefined`; \[`key`: `` `bytes12[${string}]` ``\]: `undefined`; \[`key`: `` `bytes13[${string}]` ``\]: `undefined`; \[`key`: `` `bytes14[${string}]` ``\]: `undefined`; \[`key`: `` `bytes15[${string}]` ``\]: `undefined`; \[`key`: `` `bytes16[${string}]` ``\]: `undefined`; \[`key`: `` `bytes17[${string}]` ``\]: `undefined`; \[`key`: `` `bytes18[${string}]` ``\]: `undefined`; \[`key`: `` `bytes19[${string}]` ``\]: `undefined`; \[`key`: `` `bytes20[${string}]` ``\]: `undefined`; \[`key`: `` `bytes21[${string}]` ``\]: `undefined`; \[`key`: `` `bytes22[${string}]` ``\]: `undefined`; \[`key`: `` `bytes23[${string}]` ``\]: `undefined`; \[`key`: `` `bytes24[${string}]` ``\]: `undefined`; \[`key`: `` `bytes25[${string}]` ``\]: `undefined`; \[`key`: `` `bytes26[${string}]` ``\]: `undefined`; \[`key`: `` `bytes27[${string}]` ``\]: `undefined`; \[`key`: `` `bytes28[${string}]` ``\]: `undefined`; \[`key`: `` `bytes29[${string}]` ``\]: `undefined`; \[`key`: `` `bytes30[${string}]` ``\]: `undefined`; \[`key`: `` `bytes31[${string}]` ``\]: `undefined`; \[`key`: `` `bytes32[${string}]` ``\]: `undefined`; \[`key`: `` `int[${string}]` ``\]: `undefined`; \[`key`: `` `int8[${string}]` ``\]: `undefined`; \[`key`: `` `int16[${string}]` ``\]: `undefined`; \[`key`: `` `int24[${string}]` ``\]: `undefined`; \[`key`: `` `int32[${string}]` ``\]: `undefined`; \[`key`: `` `int40[${string}]` ``\]: `undefined`; \[`key`: `` `int48[${string}]` ``\]: `undefined`; \[`key`: `` `int56[${string}]` ``\]: `undefined`; \[`key`: `` `int64[${string}]` ``\]: `undefined`; \[`key`: `` `int72[${string}]` ``\]: `undefined`; \[`key`: `` `int80[${string}]` ``\]: `undefined`; \[`key`: `` `int88[${string}]` ``\]: `undefined`; \[`key`: `` `int96[${string}]` ``\]: `undefined`; \[`key`: `` `int104[${string}]` ``\]: `undefined`; \[`key`: `` `int112[${string}]` ``\]: `undefined`; \[`key`: `` `int120[${string}]` ``\]: `undefined`; \[`key`: `` `int128[${string}]` ``\]: `undefined`; \[`key`: `` `int136[${string}]` ``\]: `undefined`; \[`key`: `` `int144[${string}]` ``\]: `undefined`; \[`key`: `` `int152[${string}]` ``\]: `undefined`; \[`key`: `` `int160[${string}]` ``\]: `undefined`; \[`key`: `` `int168[${string}]` ``\]: `undefined`; \[`key`: `` `int176[${string}]` ``\]: `undefined`; \[`key`: `` `int184[${string}]` ``\]: `undefined`; \[`key`: `` `int192[${string}]` ``\]: `undefined`; \[`key`: `` `int200[${string}]` ``\]: `undefined`; \[`key`: `` `int208[${string}]` ``\]: `undefined`; \[`key`: `` `int216[${string}]` ``\]: `undefined`; \[`key`: `` `int224[${string}]` ``\]: `undefined`; \[`key`: `` `int232[${string}]` ``\]: `undefined`; \[`key`: `` `int240[${string}]` ``\]: `undefined`; \[`key`: `` `int248[${string}]` ``\]: `undefined`; \[`key`: `` `int256[${string}]` ``\]: `undefined`; \[`key`: `` `uint[${string}]` ``\]: `undefined`; \[`key`: `` `uint8[${string}]` ``\]: `undefined`; \[`key`: `` `uint16[${string}]` ``\]: `undefined`; \[`key`: `` `uint24[${string}]` ``\]: `undefined`; \[`key`: `` `uint32[${string}]` ``\]: `undefined`; \[`key`: `` `uint40[${string}]` ``\]: `undefined`; \[`key`: `` `uint48[${string}]` ``\]: `undefined`; \[`key`: `` `uint56[${string}]` ``\]: `undefined`; \[`key`: `` `uint64[${string}]` ``\]: `undefined`; \[`key`: `` `uint72[${string}]` ``\]: `undefined`; \[`key`: `` `uint80[${string}]` ``\]: `undefined`; \[`key`: `` `uint88[${string}]` ``\]: `undefined`; \[`key`: `` `uint96[${string}]` ``\]: `undefined`; \[`key`: `` `uint104[${string}]` ``\]: `undefined`; \[`key`: `` `uint112[${string}]` ``\]: `undefined`; \[`key`: `` `uint120[${string}]` ``\]: `undefined`; \[`key`: `` `uint128[${string}]` ``\]: `undefined`; \[`key`: `` `uint136[${string}]` ``\]: `undefined`; \[`key`: `` `uint144[${string}]` ``\]: `undefined`; \[`key`: `` `uint152[${string}]` ``\]: `undefined`; \[`key`: `` `uint160[${string}]` ``\]: `undefined`; \[`key`: `` `uint168[${string}]` ``\]: `undefined`; \[`key`: `` `uint176[${string}]` ``\]: `undefined`; \[`key`: `` `uint184[${string}]` ``\]: `undefined`; \[`key`: `` `uint192[${string}]` ``\]: `undefined`; \[`key`: `` `uint200[${string}]` ``\]: `undefined`; \[`key`: `` `uint208[${string}]` ``\]: `undefined`; \[`key`: `` `uint216[${string}]` ``\]: `undefined`; \[`key`: `` `uint224[${string}]` ``\]: `undefined`; \[`key`: `` `uint232[${string}]` ``\]: `undefined`; \[`key`: `` `uint240[${string}]` ``\]: `undefined`; \[`key`: `` `uint248[${string}]` ``\]: `undefined`; \[`key`: `` `uint256[${string}]` ``\]: `undefined`; `address?`: `undefined`; `bool?`: `undefined`; `bytes?`: `undefined`; `bytes1?`: `undefined`; `bytes10?`: `undefined`; `bytes11?`: `undefined`; `bytes12?`: `undefined`; `bytes13?`: `undefined`; `bytes14?`: `undefined`; `bytes15?`: `undefined`; `bytes16?`: `undefined`; `bytes17?`: `undefined`; `bytes18?`: `undefined`; `bytes19?`: `undefined`; `bytes2?`: `undefined`; `bytes20?`: `undefined`; `bytes21?`: `undefined`; `bytes22?`: `undefined`; `bytes23?`: `undefined`; `bytes24?`: `undefined`; `bytes25?`: `undefined`; `bytes26?`: `undefined`; `bytes27?`: `undefined`; `bytes28?`: `undefined`; `bytes29?`: `undefined`; `bytes3?`: `undefined`; `bytes30?`: `undefined`; `bytes31?`: `undefined`; `bytes32?`: `undefined`; `bytes4?`: `undefined`; `bytes5?`: `undefined`; `bytes6?`: `undefined`; `bytes7?`: `undefined`; `bytes8?`: `undefined`; `bytes9?`: `undefined`; `int104?`: `undefined`; `int112?`: `undefined`; `int120?`: `undefined`; `int128?`: `undefined`; `int136?`: `undefined`; `int144?`: `undefined`; `int152?`: `undefined`; `int16?`: `undefined`; `int160?`: `undefined`; `int168?`: `undefined`; `int176?`: `undefined`; `int184?`: `undefined`; `int192?`: `undefined`; `int200?`: `undefined`; `int208?`: `undefined`; `int216?`: `undefined`; `int224?`: `undefined`; `int232?`: `undefined`; `int24?`: `undefined`; `int240?`: `undefined`; `int248?`: `undefined`; `int256?`: `undefined`; `int32?`: `undefined`; `int40?`: `undefined`; `int48?`: `undefined`; `int56?`: `undefined`; `int64?`: `undefined`; `int72?`: `undefined`; `int8?`: `undefined`; `int80?`: `undefined`; `int88?`: `undefined`; `int96?`: `undefined`; `string?`: `undefined`; `uint104?`: `undefined`; `uint112?`: `undefined`; `uint120?`: `undefined`; `uint128?`: `undefined`; `uint136?`: `undefined`; `uint144?`: `undefined`; `uint152?`: `undefined`; `uint16?`: `undefined`; `uint160?`: `undefined`; `uint168?`: `undefined`; `uint176?`: `undefined`; `uint184?`: `undefined`; `uint192?`: `undefined`; `uint200?`: `undefined`; `uint208?`: `undefined`; `uint216?`: `undefined`; `uint224?`: `undefined`; `uint232?`: `undefined`; `uint24?`: `undefined`; `uint240?`: `undefined`; `uint248?`: `undefined`; `uint256?`: `undefined`; `uint32?`: `undefined`; `uint40?`: `undefined`; `uint48?`: `undefined`; `uint56?`: `undefined`; `uint64?`: `undefined`; `uint72?`: `undefined`; `uint8?`: `undefined`; `uint80?`: `undefined`; `uint88?`: `undefined`; `uint96?`: `undefined`; \} \| \{\[`key`: `string`\]: `unknown`; \} | +| `typedData` *extends* \{\[`key`: `string`\]: readonly `TypedDataParameter`[]; \[`key`: `` `string[${string}]` ``\]: `undefined`; \[`key`: `` `function[${string}]` ``\]: `undefined`; \[`key`: `` `address[${string}]` ``\]: `undefined`; \[`key`: `` `bool[${string}]` ``\]: `undefined`; \[`key`: `` `bytes[${string}]` ``\]: `undefined`; \[`key`: `` `bytes2[${string}]` ``\]: `undefined`; \[`key`: `` `bytes1[${string}]` ``\]: `undefined`; \[`key`: `` `bytes10[${string}]` ``\]: `undefined`; \[`key`: `` `bytes32[${string}]` ``\]: `undefined`; \[`key`: `` `bytes16[${string}]` ``\]: `undefined`; \[`key`: `` `bytes8[${string}]` ``\]: `undefined`; \[`key`: `` `bytes4[${string}]` ``\]: `undefined`; \[`key`: `` `bytes3[${string}]` ``\]: `undefined`; \[`key`: `` `bytes15[${string}]` ``\]: `undefined`; \[`key`: `` `bytes26[${string}]` ``\]: `undefined`; \[`key`: `` `bytes18[${string}]` ``\]: `undefined`; \[`key`: `` `bytes27[${string}]` ``\]: `undefined`; \[`key`: `` `bytes28[${string}]` ``\]: `undefined`; \[`key`: `` `bytes12[${string}]` ``\]: `undefined`; \[`key`: `` `bytes6[${string}]` ``\]: `undefined`; \[`key`: `` `bytes5[${string}]` ``\]: `undefined`; \[`key`: `` `bytes31[${string}]` ``\]: `undefined`; \[`key`: `` `bytes7[${string}]` ``\]: `undefined`; \[`key`: `` `bytes22[${string}]` ``\]: `undefined`; \[`key`: `` `bytes9[${string}]` ``\]: `undefined`; \[`key`: `` `bytes11[${string}]` ``\]: `undefined`; \[`key`: `` `bytes13[${string}]` ``\]: `undefined`; \[`key`: `` `bytes14[${string}]` ``\]: `undefined`; \[`key`: `` `bytes17[${string}]` ``\]: `undefined`; \[`key`: `` `bytes19[${string}]` ``\]: `undefined`; \[`key`: `` `bytes20[${string}]` ``\]: `undefined`; \[`key`: `` `bytes21[${string}]` ``\]: `undefined`; \[`key`: `` `bytes23[${string}]` ``\]: `undefined`; \[`key`: `` `bytes24[${string}]` ``\]: `undefined`; \[`key`: `` `bytes25[${string}]` ``\]: `undefined`; \[`key`: `` `bytes29[${string}]` ``\]: `undefined`; \[`key`: `` `bytes30[${string}]` ``\]: `undefined`; \[`key`: `` `int[${string}]` ``\]: `undefined`; \[`key`: `` `int48[${string}]` ``\]: `undefined`; \[`key`: `` `int32[${string}]` ``\]: `undefined`; \[`key`: `` `int256[${string}]` ``\]: `undefined`; \[`key`: `` `int16[${string}]` ``\]: `undefined`; \[`key`: `` `int8[${string}]` ``\]: `undefined`; \[`key`: `` `int64[${string}]` ``\]: `undefined`; \[`key`: `` `int40[${string}]` ``\]: `undefined`; \[`key`: `` `int88[${string}]` ``\]: `undefined`; \[`key`: `` `int160[${string}]` ``\]: `undefined`; \[`key`: `` `int96[${string}]` ``\]: `undefined`; \[`key`: `` `int128[${string}]` ``\]: `undefined`; \[`key`: `` `int192[${string}]` ``\]: `undefined`; \[`key`: `` `int24[${string}]` ``\]: `undefined`; \[`key`: `` `int56[${string}]` ``\]: `undefined`; \[`key`: `` `int72[${string}]` ``\]: `undefined`; \[`key`: `` `int80[${string}]` ``\]: `undefined`; \[`key`: `` `int104[${string}]` ``\]: `undefined`; \[`key`: `` `int112[${string}]` ``\]: `undefined`; \[`key`: `` `int120[${string}]` ``\]: `undefined`; \[`key`: `` `int136[${string}]` ``\]: `undefined`; \[`key`: `` `int144[${string}]` ``\]: `undefined`; \[`key`: `` `int152[${string}]` ``\]: `undefined`; \[`key`: `` `int168[${string}]` ``\]: `undefined`; \[`key`: `` `int176[${string}]` ``\]: `undefined`; \[`key`: `` `int184[${string}]` ``\]: `undefined`; \[`key`: `` `int200[${string}]` ``\]: `undefined`; \[`key`: `` `int208[${string}]` ``\]: `undefined`; \[`key`: `` `int216[${string}]` ``\]: `undefined`; \[`key`: `` `int224[${string}]` ``\]: `undefined`; \[`key`: `` `int232[${string}]` ``\]: `undefined`; \[`key`: `` `int240[${string}]` ``\]: `undefined`; \[`key`: `` `int248[${string}]` ``\]: `undefined`; \[`key`: `` `uint[${string}]` ``\]: `undefined`; \[`key`: `` `uint48[${string}]` ``\]: `undefined`; \[`key`: `` `uint32[${string}]` ``\]: `undefined`; \[`key`: `` `uint256[${string}]` ``\]: `undefined`; \[`key`: `` `uint16[${string}]` ``\]: `undefined`; \[`key`: `` `uint8[${string}]` ``\]: `undefined`; \[`key`: `` `uint64[${string}]` ``\]: `undefined`; \[`key`: `` `uint40[${string}]` ``\]: `undefined`; \[`key`: `` `uint88[${string}]` ``\]: `undefined`; \[`key`: `` `uint160[${string}]` ``\]: `undefined`; \[`key`: `` `uint96[${string}]` ``\]: `undefined`; \[`key`: `` `uint128[${string}]` ``\]: `undefined`; \[`key`: `` `uint192[${string}]` ``\]: `undefined`; \[`key`: `` `uint24[${string}]` ``\]: `undefined`; \[`key`: `` `uint56[${string}]` ``\]: `undefined`; \[`key`: `` `uint72[${string}]` ``\]: `undefined`; \[`key`: `` `uint80[${string}]` ``\]: `undefined`; \[`key`: `` `uint104[${string}]` ``\]: `undefined`; \[`key`: `` `uint112[${string}]` ``\]: `undefined`; \[`key`: `` `uint120[${string}]` ``\]: `undefined`; \[`key`: `` `uint136[${string}]` ``\]: `undefined`; \[`key`: `` `uint144[${string}]` ``\]: `undefined`; \[`key`: `` `uint152[${string}]` ``\]: `undefined`; \[`key`: `` `uint168[${string}]` ``\]: `undefined`; \[`key`: `` `uint176[${string}]` ``\]: `undefined`; \[`key`: `` `uint184[${string}]` ``\]: `undefined`; \[`key`: `` `uint200[${string}]` ``\]: `undefined`; \[`key`: `` `uint208[${string}]` ``\]: `undefined`; \[`key`: `` `uint216[${string}]` ``\]: `undefined`; \[`key`: `` `uint224[${string}]` ``\]: `undefined`; \[`key`: `` `uint232[${string}]` ``\]: `undefined`; \[`key`: `` `uint240[${string}]` ``\]: `undefined`; \[`key`: `` `uint248[${string}]` ``\]: `undefined`; `address?`: `undefined`; `bool?`: `undefined`; `bytes?`: `undefined`; `bytes1?`: `undefined`; `bytes10?`: `undefined`; `bytes11?`: `undefined`; `bytes12?`: `undefined`; `bytes13?`: `undefined`; `bytes14?`: `undefined`; `bytes15?`: `undefined`; `bytes16?`: `undefined`; `bytes17?`: `undefined`; `bytes18?`: `undefined`; `bytes19?`: `undefined`; `bytes2?`: `undefined`; `bytes20?`: `undefined`; `bytes21?`: `undefined`; `bytes22?`: `undefined`; `bytes23?`: `undefined`; `bytes24?`: `undefined`; `bytes25?`: `undefined`; `bytes26?`: `undefined`; `bytes27?`: `undefined`; `bytes28?`: `undefined`; `bytes29?`: `undefined`; `bytes3?`: `undefined`; `bytes30?`: `undefined`; `bytes31?`: `undefined`; `bytes32?`: `undefined`; `bytes4?`: `undefined`; `bytes5?`: `undefined`; `bytes6?`: `undefined`; `bytes7?`: `undefined`; `bytes8?`: `undefined`; `bytes9?`: `undefined`; `int104?`: `undefined`; `int112?`: `undefined`; `int120?`: `undefined`; `int128?`: `undefined`; `int136?`: `undefined`; `int144?`: `undefined`; `int152?`: `undefined`; `int16?`: `undefined`; `int160?`: `undefined`; `int168?`: `undefined`; `int176?`: `undefined`; `int184?`: `undefined`; `int192?`: `undefined`; `int200?`: `undefined`; `int208?`: `undefined`; `int216?`: `undefined`; `int224?`: `undefined`; `int232?`: `undefined`; `int24?`: `undefined`; `int240?`: `undefined`; `int248?`: `undefined`; `int256?`: `undefined`; `int32?`: `undefined`; `int40?`: `undefined`; `int48?`: `undefined`; `int56?`: `undefined`; `int64?`: `undefined`; `int72?`: `undefined`; `int8?`: `undefined`; `int80?`: `undefined`; `int88?`: `undefined`; `int96?`: `undefined`; `string?`: `undefined`; `uint104?`: `undefined`; `uint112?`: `undefined`; `uint120?`: `undefined`; `uint128?`: `undefined`; `uint136?`: `undefined`; `uint144?`: `undefined`; `uint152?`: `undefined`; `uint16?`: `undefined`; `uint160?`: `undefined`; `uint168?`: `undefined`; `uint176?`: `undefined`; `uint184?`: `undefined`; `uint192?`: `undefined`; `uint200?`: `undefined`; `uint208?`: `undefined`; `uint216?`: `undefined`; `uint224?`: `undefined`; `uint232?`: `undefined`; `uint24?`: `undefined`; `uint240?`: `undefined`; `uint248?`: `undefined`; `uint256?`: `undefined`; `uint32?`: `undefined`; `uint40?`: `undefined`; `uint48?`: `undefined`; `uint56?`: `undefined`; `uint64?`: `undefined`; `uint72?`: `undefined`; `uint8?`: `undefined`; `uint80?`: `undefined`; `uint88?`: `undefined`; `uint96?`: `undefined`; \} \| \{\[`key`: `string`\]: `unknown`; \} | | `primaryType` *extends* `string` | #### Parameters @@ -1726,7 +1726,7 @@ __Warning: The `write` internally sends a transaction – it does not validate i | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | | `functionName` *extends* `string` | - | | `args` *extends* `unknown` | - | | `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | @@ -1806,7 +1806,7 @@ __Warning: The `write` internally sends a transaction – it does not validate i | Type Parameter | Default type | | ------ | ------ | -| `abi` *extends* `Abi` \| readonly `unknown`[] | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | | `functionName` *extends* `string` | - | | `args` *extends* `unknown` | - | | `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | diff --git a/api/@aastar/core/type-aliases/AccountActions.md b/api/@aastar/core/type-aliases/AccountActions.md index 79f996206..509b5047e 100644 --- a/api/@aastar/core/type-aliases/AccountActions.md +++ b/api/@aastar/core/type-aliases/AccountActions.md @@ -1,6 +1,6 @@ > **AccountActions** = `object` -Defined in: [packages/core/src/actions/account.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L7) +Defined in: [packages/core/src/actions/account.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L7) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/account.ts:7](https://github.com/AAStarCo > **addDeposit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/account.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L12) +Defined in: [packages/core/src/actions/account.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L12) #### Parameters @@ -27,7 +27,7 @@ Defined in: [packages/core/src/actions/account.ts:12](https://github.com/AAStarC > **entryPoint**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/account.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L11) +Defined in: [packages/core/src/actions/account.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L11) #### Returns @@ -39,7 +39,7 @@ Defined in: [packages/core/src/actions/account.ts:11](https://github.com/AAStarC > **execute**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/account.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L8) +Defined in: [packages/core/src/actions/account.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L8) #### Parameters @@ -61,7 +61,7 @@ Defined in: [packages/core/src/actions/account.ts:8](https://github.com/AAStarCo > **executeBatch**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/account.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L9) +Defined in: [packages/core/src/actions/account.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L9) #### Parameters @@ -83,7 +83,7 @@ Defined in: [packages/core/src/actions/account.ts:9](https://github.com/AAStarCo > **getDeposit**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/account.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L14) +Defined in: [packages/core/src/actions/account.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L14) #### Returns @@ -95,7 +95,7 @@ Defined in: [packages/core/src/actions/account.ts:14](https://github.com/AAStarC > **getNonce**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/account.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L10) +Defined in: [packages/core/src/actions/account.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L10) #### Returns @@ -107,7 +107,7 @@ Defined in: [packages/core/src/actions/account.ts:10](https://github.com/AAStarC > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/account.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L15) +Defined in: [packages/core/src/actions/account.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L15) #### Returns @@ -119,7 +119,7 @@ Defined in: [packages/core/src/actions/account.ts:15](https://github.com/AAStarC > **withdrawDepositTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/account.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L13) +Defined in: [packages/core/src/actions/account.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L13) #### Parameters diff --git a/api/@aastar/core/type-aliases/AccountFactoryActions.md b/api/@aastar/core/type-aliases/AccountFactoryActions.md index edc7fbfe5..53ffed702 100644 --- a/api/@aastar/core/type-aliases/AccountFactoryActions.md +++ b/api/@aastar/core/type-aliases/AccountFactoryActions.md @@ -1,6 +1,6 @@ > **AccountFactoryActions** = `object` -Defined in: [packages/core/src/actions/account.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L19) +Defined in: [packages/core/src/actions/account.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L19) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/account.ts:19](https://github.com/AAStarC > **createAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/account.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L20) +Defined in: [packages/core/src/actions/account.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L20) #### Parameters @@ -30,7 +30,7 @@ Defined in: [packages/core/src/actions/account.ts:20](https://github.com/AAStarC > **getAddress**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/account.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/account.ts#L21) +Defined in: [packages/core/src/actions/account.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L21) #### Parameters diff --git a/api/@aastar/core/type-aliases/AgentActions.md b/api/@aastar/core/type-aliases/AgentActions.md new file mode 100644 index 000000000..6ee6fa2ff --- /dev/null +++ b/api/@aastar/core/type-aliases/AgentActions.md @@ -0,0 +1,158 @@ +> **AgentActions** = `object` + +Defined in: [packages/core/src/actions/agent.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L12) + +## Properties + +### agentIdentityRegistry() + +> **agentIdentityRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agent.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L18) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~agentPolicies()~~ + +> **agentPolicies**: (`args`) => `Promise`\<[`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)\> + +Defined in: [packages/core/src/actions/agent.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `operator`: `Address`; \} | +| `args.index` | `bigint` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)\> + +#### Deprecated + +Removed in the v5.x contract refactor — per-operator agent policies are no longer stored on-chain (no `agentPolicies` in the SuperPaymaster ABI). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### agentReputationRegistry() + +> **agentReputationRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agent.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L19) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~getAgentSponsorshipRate()~~ + +> **getAgentSponsorshipRate**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/agent.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agent`: `Address`; `operator`: `Address`; \} | +| `args.agent` | `Address` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — the SuperPaymaster ABI has no per-agent sponsorship-rate getter; sponsorship is now a boolean eligibility check. Throws ErrorCode.NOT\_IMPLEMENTED; use [isEligibleForSponsorship](#iseligibleforsponsorship). + +*** + +### isEligibleForSponsorship() + +> **isEligibleForSponsorship**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agent.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isRegisteredAgent() + +> **isRegisteredAgent**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agent.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ~~setAgentPolicies()~~ + +> **setAgentPolicies**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agent.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `policies`: [`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.policies` | [`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — per-operator sponsorship policies are no longer configurable on-chain (no `setAgentPolicies`). Throws ErrorCode.NOT\_IMPLEMENTED; to wire up the agent identity/reputation registries use [setAgentRegistries](#setagentregistries). + +*** + +### setAgentRegistries() + +> **setAgentRegistries**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agent.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `identity`: `Address`; `reputation`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.identity` | `Address` | +| `args.reputation` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/type-aliases/AgentRegistryActions.md b/api/@aastar/core/type-aliases/AgentRegistryActions.md new file mode 100644 index 000000000..d3c867dec --- /dev/null +++ b/api/@aastar/core/type-aliases/AgentRegistryActions.md @@ -0,0 +1,303 @@ +> **AgentRegistryActions** = `object` + +Defined in: [packages/core/src/actions/agentRegistry.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L6) + +## Properties + +### agentWalletOwner() + +> **agentWalletOwner**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentWallet`: `Address`; \} | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### bindFactory() + +> **bindFactory**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `factory`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.factory` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### deployer() + +> **deployer**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L8) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### deregisterAgent() + +> **deregisterAgent**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L47) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentWallet`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### factory() + +> **factory**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L9) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAgentByIndex() + +> **getAgentByIndex**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `owner`: `Address`; \} | +| `args.index` | `bigint` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAgentCount() + +> **getAgentCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getAgents() + +> **getAgents**: (`args`) => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `humanOwner`: `Address`; \} | +| `args.humanOwner` | `Address` | + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getAgentsPage() + +> **getAgentsPage**: (`args`) => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `count`: `bigint`; `owner`: `Address`; `start`: `bigint`; \} | +| `args.count` | `bigint` | +| `args.owner` | `Address` | +| `args.start` | `bigint` | + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getHumanOwner() + +> **getHumanOwner**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentWallet`: `Address`; \} | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### isRegisteredAgent() + +> **isRegisteredAgent**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentWallet`: `Address`; \} | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isValidAccount() + +> **isValidAccount**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### markValid() + +> **markValid**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `signer?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account` | `Address` | +| `args.signer?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ownerAgents() + +> **ownerAgents**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L27) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `owner`: `Address`; \} | +| `args.index` | `bigint` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### registerAgent() + +> **registerAgent**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentWallet`: `Address`; `agentWalletSig`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentWallet` | `Address` | +| `args.agentWalletSig` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### revokeAgent() + +> **revokeAgent**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentWallet`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/type-aliases/AgentSponsorshipPolicy.md b/api/@aastar/core/type-aliases/AgentSponsorshipPolicy.md new file mode 100644 index 000000000..364085dbf --- /dev/null +++ b/api/@aastar/core/type-aliases/AgentSponsorshipPolicy.md @@ -0,0 +1,27 @@ +> **AgentSponsorshipPolicy** = `object` + +Defined in: [packages/core/src/actions/agent.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L6) + +## Properties + +### maxDailyUSD + +> **maxDailyUSD**: `bigint` + +Defined in: [packages/core/src/actions/agent.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L9) + +*** + +### minReputationScore + +> **minReputationScore**: `bigint` + +Defined in: [packages/core/src/actions/agent.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L7) + +*** + +### sponsorshipBPS + +> **sponsorshipBPS**: `bigint` + +Defined in: [packages/core/src/actions/agent.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L8) diff --git a/api/@aastar/core/type-aliases/AggregatorActions.md b/api/@aastar/core/type-aliases/AggregatorActions.md index 71dbcb63e..a90b94704 100644 --- a/api/@aastar/core/type-aliases/AggregatorActions.md +++ b/api/@aastar/core/type-aliases/AggregatorActions.md @@ -1,6 +1,6 @@ > **AggregatorActions** = `object` -Defined in: [packages/core/src/actions/aggregator.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L6) +Defined in: [packages/core/src/actions/aggregator.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L10) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:6](https://github.com/AASta > **aggregatedSignatures**: (`args`) => `Promise`\<\{ `aggregatedSig`: [`Hex`](https://viem.sh/docs/index.html); `messageHash`: [`Hex`](https://viem.sh/docs/index.html); `timestamp`: `bigint`; `verified`: `boolean`; \}\> -Defined in: [packages/core/src/actions/aggregator.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L24) +Defined in: [packages/core/src/actions/aggregator.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L51) #### Parameters @@ -23,11 +23,11 @@ Defined in: [packages/core/src/actions/aggregator.ts:24](https://github.com/AASt *** -### blsPublicKeys() +### ~~blsPublicKeys()~~ > **blsPublicKeys**: (`args`) => `Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`Hex`](https://viem.sh/docs/index.html); \}\> -Defined in: [packages/core/src/actions/aggregator.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L9) +Defined in: [packages/core/src/actions/aggregator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L14) #### Parameters @@ -40,13 +40,41 @@ Defined in: [packages/core/src/actions/aggregator.ts:9](https://github.com/AASta `Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`Hex`](https://viem.sh/docs/index.html); \}\> +#### Deprecated + +The deployed BLSAggregator ABI has no `blsPublicKeys` mapping getter — this wrapper now reads the ABI-confirmed `getBLSPublicKey` and projects out the slot. Prefer [getBLSPublicKey](#getblspublickey). + +*** + +### buildSignerMask() + +> **buildSignerMask**: (`args`) => `Promise`\<\{ `signerMask`: `bigint`; `slots`: `number`[]; \}\> + +Defined in: [packages/core/src/actions/aggregator.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L33) + +Build the DVT `signerMask` for a set of signer addresses by reading each +signer's on-chain registration slot. bit `s-1` is set for a validator at slot +`s` (see [BLSHelpers.slotsToSignerMask](../variables/BLSHelpers.md#slotstosignermask)). Throws if any signer is not a +registered, active validator, or if two signers map to the same slot. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `signers`: `Address`[]; \} | +| `args.signers` | `Address`[] | + +#### Returns + +`Promise`\<\{ `signerMask`: `bigint`; `slots`: `number`[]; \}\> + *** ### defaultThreshold() > **defaultThreshold**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/aggregator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L14) +Defined in: [packages/core/src/actions/aggregator.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L41) #### Returns @@ -58,7 +86,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:14](https://github.com/AASt > **DVT\_VALIDATOR**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/aggregator.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L29) +Defined in: [packages/core/src/actions/aggregator.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L56) #### Returns @@ -70,7 +98,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:29](https://github.com/AASt > **executedProposals**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/aggregator.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L20) +Defined in: [packages/core/src/actions/aggregator.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L47) #### Parameters @@ -89,7 +117,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:20](https://github.com/AASt > **executeProposal**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L18) +Defined in: [packages/core/src/actions/aggregator.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L45) #### Parameters @@ -109,11 +137,32 @@ Defined in: [packages/core/src/actions/aggregator.ts:18](https://github.com/AASt *** +### getBLSPublicKey() + +> **getBLSPublicKey**: (`args`) => `Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`BLSG1Point`](BLSG1Point.md); `slot`: `number`; \}\> + +Defined in: [packages/core/src/actions/aggregator.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L16) + +Read a validator's registered G1 key + its registration SLOT (1-indexed) + active flag. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `validator`: `Address`; \} | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`BLSG1Point`](BLSG1Point.md); `slot`: `number`; \}\> + +*** + ### MAX\_VALIDATORS() > **MAX\_VALIDATORS**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/aggregator.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L34) +Defined in: [packages/core/src/actions/aggregator.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L61) #### Returns @@ -125,7 +174,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:34](https://github.com/AASt > **minThreshold**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/aggregator.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L15) +Defined in: [packages/core/src/actions/aggregator.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L42) #### Returns @@ -137,7 +186,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:15](https://github.com/AASt > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/aggregator.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L37) +Defined in: [packages/core/src/actions/aggregator.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L64) #### Returns @@ -145,11 +194,25 @@ Defined in: [packages/core/src/actions/aggregator.ts:37](https://github.com/AASt *** +### permissionlessBLSRegistration() + +> **permissionlessBLSRegistration**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/aggregator.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L24) + +Whether permissionless BLS key registration is currently enabled (view). + +#### Returns + +`Promise`\<`boolean`\> + +*** + ### proposalNonces() > **proposalNonces**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/aggregator.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L21) +Defined in: [packages/core/src/actions/aggregator.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L48) #### Parameters @@ -168,7 +231,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:21](https://github.com/AASt > **registerBLSPublicKey**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L8) +Defined in: [packages/core/src/actions/aggregator.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L12) #### Parameters @@ -189,7 +252,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AASta > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/aggregator.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L31) +Defined in: [packages/core/src/actions/aggregator.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L58) #### Returns @@ -201,7 +264,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:31](https://github.com/AASt > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L39) +Defined in: [packages/core/src/actions/aggregator.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L66) #### Parameters @@ -216,11 +279,33 @@ Defined in: [packages/core/src/actions/aggregator.ts:39](https://github.com/AASt *** +### revokeBLSPublicKey() + +> **revokeBLSPublicKey**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L20) + +Revoke a validator's registered BLS public key (owner-gated). ABI: revokeBLSPublicKey(address validator). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `validator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### setDefaultThreshold() > **setDefaultThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L12) +Defined in: [packages/core/src/actions/aggregator.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L39) #### Parameters @@ -240,7 +325,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:12](https://github.com/AASt > **setDVTValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L27) +Defined in: [packages/core/src/actions/aggregator.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L54) #### Parameters @@ -260,7 +345,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:27](https://github.com/AASt > **setMinThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L13) +Defined in: [packages/core/src/actions/aggregator.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L40) #### Parameters @@ -276,11 +361,33 @@ Defined in: [packages/core/src/actions/aggregator.ts:13](https://github.com/AASt *** +### setPermissionlessBLSRegistration() + +> **setPermissionlessBLSRegistration**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L22) + +Toggle permissionless (self-service) BLS key registration. ABI: setPermissionlessBLSRegistration(bool enabled). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `enabled`: `boolean`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.enabled` | `boolean` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### setSuperPaymaster() > **setSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L28) +Defined in: [packages/core/src/actions/aggregator.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L55) #### Parameters @@ -300,7 +407,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:28](https://github.com/AASt > **SUPERPAYMASTER**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/aggregator.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L30) +Defined in: [packages/core/src/actions/aggregator.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L57) #### Returns @@ -312,7 +419,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:30](https://github.com/AASt > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L38) +Defined in: [packages/core/src/actions/aggregator.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L65) #### Parameters @@ -328,11 +435,56 @@ Defined in: [packages/core/src/actions/aggregator.ts:38](https://github.com/AASt *** +### validatorAtSlot() + +> **validatorAtSlot**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/aggregator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L18) + +Reverse of [getBLSPublicKey](#getblspublickey): the validator address registered at a given slot. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `slot`: `number`; \} | +| `args.slot` | `number` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### verify() + +> **verify**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/aggregator.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L35) + +On-chain aggregate-signature verification (view). `sigBytes` = aggregated sigG2. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `expectedMessageHash`: [`Hex`](https://viem.sh/docs/index.html); `requiredThreshold`: `bigint`; `sigBytes`: [`Hex`](https://viem.sh/docs/index.html); `signerMask`: `bigint`; \} | +| `args.expectedMessageHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.requiredThreshold` | `bigint` | +| `args.sigBytes` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.signerMask` | `bigint` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + ### verifyAndExecute() > **verifyAndExecute**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/aggregator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L19) +Defined in: [packages/core/src/actions/aggregator.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L46) #### Parameters @@ -358,7 +510,7 @@ Defined in: [packages/core/src/actions/aggregator.ts:19](https://github.com/AASt > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/aggregator.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/aggregator.ts#L42) +Defined in: [packages/core/src/actions/aggregator.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L69) #### Returns diff --git a/api/@aastar/core/type-aliases/AirAccountActions.md b/api/@aastar/core/type-aliases/AirAccountActions.md new file mode 100644 index 000000000..b65e15fff --- /dev/null +++ b/api/@aastar/core/type-aliases/AirAccountActions.md @@ -0,0 +1,525 @@ +> **AirAccountActions** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L37) + +## Properties + +### accountId() + +> **accountId**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/airAccount.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L42) + +#### Returns + +`Promise`\<`string`\> + +*** + +### cancelModuleInstall() + +> **cancelModuleInstall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L81) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeFromExecutor() + +> **executeFromExecutor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L66) + +Execute calls via an installed executor module (ERC-7579 `executeFromExecutor`). +NOTE: this is a state-changing tx, so it resolves to the transaction `Hash` — the +on-chain `bytes[] returnData` is NOT recoverable from a write. If you need the +decoded return data, `simulateContract`/`call` the same function separately. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `executionCalldata`: [`Hex`](https://viem.sh/docs/index.html); `mode`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.executionCalldata` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.mode` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeModuleInstall() + +> **executeModuleInstall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L80) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `moduleInitData`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.moduleInitData` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardAddTokenConfig() + +> **guardAddTokenConfig**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L71) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`TokenConfig`](TokenConfig.md); `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`TokenConfig`](TokenConfig.md) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardApproveAlgorithm() + +> **guardApproveAlgorithm**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L72) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `algId`: `number`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.algId` | `number` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardDecreaseDailyLimit() + +> **guardDecreaseDailyLimit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L73) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newLimit`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newLimit` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardDecreaseTokenDailyLimit() + +> **guardDecreaseTokenDailyLimit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L74) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newLimit`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newLimit` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardianCount() + +> **guardianCount**: () => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/airAccount.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L40) + +#### Returns + +`Promise`\<`number`\> + +*** + +### guardians() + +> **guardians**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccount.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L41) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint` \| `number`; \} | +| `args.index` | `bigint` \| `number` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### guardSetStrictMode() + +> **guardSetStrictMode**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `enabled`: `boolean`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.enabled` | `boolean` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### initializeAgentAccount() + +> **initializeAgentAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`InitConfig`](InitConfig.md); `entryPoint`: `Address`; `guardAddr`: `Address`; `owner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.entryPoint` | `Address` | +| `args.guardAddr` | `Address` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### isValidSignature() + +> **isValidSignature**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `hash`: [`Hex`](https://viem.sh/docs/index.html); `sig`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.hash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sig` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### moduleInstallTimelock() + +> **moduleInstallTimelock**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/airAccount.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L50) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### moduleManagementNonce() + +> **moduleManagementNonce**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/airAccount.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L49) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccount.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L39) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### p256KeyX() + +> **p256KeyX**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L46) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### p256KeyY() + +> **p256KeyY**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L47) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### parserRegistry() + +> **parserRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccount.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L48) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pendingModuleInstall() + +> **pendingModuleInstall**: () => `Promise`\<[`PendingModuleInstall`](PendingModuleInstall.md)\> + +Defined in: [packages/core/src/actions/airAccount.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L51) + +#### Returns + +`Promise`\<[`PendingModuleInstall`](PendingModuleInstall.md)\> + +*** + +### proposeModuleInstall() + +> **proposeModuleInstall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L79) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `initData`: [`Hex`](https://viem.sh/docs/index.html); `module`: `Address`; `moduleTypeId`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.initData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.module` | `Address` | +| `args.moduleTypeId` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### requiredTier() + +> **requiredTier**: (`args`) => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/airAccount.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L44) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `txValue`: `bigint`; \} | +| `args.txValue` | `bigint` | + +#### Returns + +`Promise`\<`number`\> + +*** + +### setModuleInstallTimelock() + +> **setModuleInstallTimelock**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L82) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `guardianSigs`: [`Hex`](https://viem.sh/docs/index.html); `newTimelock`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.guardianSigs` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.newTimelock` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setP256Key() + +> **setP256Key**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `x`: [`Hex`](https://viem.sh/docs/index.html); `y`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.x` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.y` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setParserRegistry() + +> **setParserRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L57) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setTierLimits() + +> **setTierLimits**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `tier1`: `bigint`; `tier2`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.tier1` | `bigint` | +| `args.tier2` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setValidator() + +> **setValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L56) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `validator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### supportsModule() + +> **supportsModule**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/airAccount.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `moduleTypeId`: `bigint`; \} | +| `args.moduleTypeId` | `bigint` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### validateUserOp() + +> **validateUserOp**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `missingAccountFunds`: `bigint`; `userOp`: [`PackedUserOperation`](PackedUserOperation.md); `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.missingAccountFunds` | `bigint` | +| `args.userOp` | [`PackedUserOperation`](PackedUserOperation.md) | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/type-aliases/AirAccountFactoryActions.md b/api/@aastar/core/type-aliases/AirAccountFactoryActions.md new file mode 100644 index 000000000..91a8c006d --- /dev/null +++ b/api/@aastar/core/type-aliases/AirAccountFactoryActions.md @@ -0,0 +1,228 @@ +> **AirAccountFactoryActions** = `object` + +Defined in: [packages/core/src/actions/airAccountFactory.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L7) + +## Properties + +### agentRegistry() + +> **agentRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L28) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### createAccount() + +> **createAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`InitConfig`](InitConfig.md); `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `owner`: `Address`; `salt`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.maxFeePerGas?` | `bigint` | +| `args.maxPriorityFeePerGas?` | `bigint` | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### createAgentAccount() + +> **createAgentAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L36) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentId`: [`Hex`](https://viem.sh/docs/index.html); `agentKey`: `Address`; `agentKeySig`: [`Hex`](https://viem.sh/docs/index.html); `dailyLimit`: `bigint`; `deadline`: `bigint` \| `number`; `guardian2`: `Address`; `guardian2Sig`: [`Hex`](https://viem.sh/docs/index.html); `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.agentKey` | `Address` | +| `args.agentKeySig` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.dailyLimit` | `bigint` | +| `args.deadline` | `bigint` \| `number` | +| `args.guardian2` | `Address` | +| `args.guardian2Sig` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.maxFeePerGas?` | `bigint` | +| `args.maxPriorityFeePerGas?` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### defaultCommunityGuardian() + +> **defaultCommunityGuardian**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L24) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### factoryAdmin() + +> **factoryAdmin**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L22) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAddress() + +> **getAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `config`: [`InitConfig`](InitConfig.md); `owner`: `Address`; `salt`: `bigint`; \} | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAddressWithChainId() + +> **getAddressWithChainId**: (`args`) => `Promise`\<\{ `account`: `Address`; `chainQualified`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `config`: [`InitConfig`](InitConfig.md); `owner`: `Address`; `salt`: `bigint`; \} | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<\{ `account`: `Address`; `chainQualified`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +*** + +### getAddressWithDefaults() + +> **getAddressWithDefaults**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `dailyLimit`: `bigint`; `guard`: `Address`; `owner`: `Address`; `salt`: `bigint`; `validator`: `Address`; \} | +| `args.dailyLimit` | `bigint` | +| `args.guard` | `Address` | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAgentAddress() + +> **getAgentAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentId`: [`Hex`](https://viem.sh/docs/index.html); `agentKey`: `Address`; `humanOwner`: `Address`; \} | +| `args.agentId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.agentKey` | `Address` | +| `args.humanOwner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getChainQualifiedAddress() + +> **getChainQualifiedAddress**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### implementation() + +> **implementation**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L20) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### setAgentRegistry() + +> **setAgentRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L49) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentRegistry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentRegistry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/type-aliases/AssetPolicy.md b/api/@aastar/core/type-aliases/AssetPolicy.md new file mode 100644 index 000000000..d6b759830 --- /dev/null +++ b/api/@aastar/core/type-aliases/AssetPolicy.md @@ -0,0 +1,55 @@ +> **AssetPolicy** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L21) + +Per-(sender, asset) amount policy. Native-unit amounts (no USD oracle). + +## Properties + +### configured + +> **configured**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L31) + +false => no policy for this (sender, asset) => UNRESTRICTED (opt-in). + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L27) + +Cumulative spend over `windowSeconds` => REJECT when exceeded. + +*** + +### dvtTriggerAmount + +> **dvtTriggerAmount**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L23) + +Single-tx amount >= this => REQUIRE_DVT; 0 => amount-based trigger DISABLED. + +*** + +### perTxHardCap + +> **perTxHardCap**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L25) + +Single-tx amount > this => REJECT (enforced only when configured). + +*** + +### windowSeconds + +> **windowSeconds**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L29) + +Daily-limit window length in seconds; 0 => DEFAULT_WINDOW (1 day). diff --git a/api/@aastar/core/type-aliases/AssetPolicyInput.md b/api/@aastar/core/type-aliases/AssetPolicyInput.md new file mode 100644 index 000000000..a308e0e0b --- /dev/null +++ b/api/@aastar/core/type-aliases/AssetPolicyInput.md @@ -0,0 +1,39 @@ +> **AssetPolicyInput** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L35) + +Input form of [AssetPolicy](AssetPolicy.md) for governance setters (no `configured` flag). + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L38) + +*** + +### dvtTriggerAmount + +> **dvtTriggerAmount**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L36) + +*** + +### perTxHardCap + +> **perTxHardCap**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L37) + +*** + +### windowSeconds + +> **windowSeconds**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L40) + +0 => DEFAULT_WINDOW (1 day). diff --git a/api/@aastar/core/type-aliases/BLSAlgorithmActions.md b/api/@aastar/core/type-aliases/BLSAlgorithmActions.md new file mode 100644 index 000000000..ae3c0d37f --- /dev/null +++ b/api/@aastar/core/type-aliases/BLSAlgorithmActions.md @@ -0,0 +1,23 @@ +> **BLSAlgorithmActions** = `object` + +Defined in: [packages/core/src/actions/blsAlgorithm.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/blsAlgorithm.ts#L6) + +## Properties + +### validate() + +> **validate**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/blsAlgorithm.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/blsAlgorithm.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `proof`: [`Hex`](https://viem.sh/docs/index.html); `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> diff --git a/api/@aastar/core/type-aliases/BLSG1Point.md b/api/@aastar/core/type-aliases/BLSG1Point.md new file mode 100644 index 000000000..21f99605c --- /dev/null +++ b/api/@aastar/core/type-aliases/BLSG1Point.md @@ -0,0 +1,37 @@ +> **BLSG1Point** = `object` + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +A registered validator's on-chain BLS G1 public key point. + +## Properties + +### x\_a + +> **x\_a**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +*** + +### x\_b + +> **x\_b**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +*** + +### y\_a + +> **y\_a**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +*** + +### y\_b + +> **y\_b**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) diff --git a/api/@aastar/core/type-aliases/BatchMintResult.md b/api/@aastar/core/type-aliases/BatchMintResult.md new file mode 100644 index 000000000..cb970ee72 --- /dev/null +++ b/api/@aastar/core/type-aliases/BatchMintResult.md @@ -0,0 +1,37 @@ +> **BatchMintResult** = `object` + +Defined in: [packages/core/src/actions/sbt.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L22) + +Per-item outcome of a sequential batch mint. + +## Properties + +### error? + +> `optional` **error**: `string` + +Defined in: [packages/core/src/actions/sbt.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L26) + +*** + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/actions/sbt.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L24) + +*** + +### txHash? + +> `optional` **txHash**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/sbt.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L25) + +*** + +### user + +> **user**: `Address` + +Defined in: [packages/core/src/actions/sbt.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L23) diff --git a/api/@aastar/core/type-aliases/BusinessResult.md b/api/@aastar/core/type-aliases/BusinessResult.md index 9eb56692a..523bab794 100644 --- a/api/@aastar/core/type-aliases/BusinessResult.md +++ b/api/@aastar/core/type-aliases/BusinessResult.md @@ -1,6 +1,6 @@ > **BusinessResult**\<`T`\> = `Promise`\<`T`\> -Defined in: [packages/core/src/clients/types.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/clients/types.ts#L70) +Defined in: [packages/core/src/clients/types.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L70) Generic result wrapper for business operations Currently just returns the type directly, but can be expanded for metadata. diff --git a/api/@aastar/core/type-aliases/CanonicalAddresses.md b/api/@aastar/core/type-aliases/CanonicalAddresses.md new file mode 100644 index 000000000..3cf307381 --- /dev/null +++ b/api/@aastar/core/type-aliases/CanonicalAddresses.md @@ -0,0 +1,3 @@ +> **CanonicalAddresses** = *typeof* [`CANONICAL_ADDRESSES`](../variables/CANONICAL_ADDRESSES.md)\[keyof *typeof* [`CANONICAL_ADDRESSES`](../variables/CANONICAL_ADDRESSES.md)\] + +Defined in: [packages/core/src/addresses.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L184) diff --git a/api/@aastar/core/type-aliases/ChannelActions.md b/api/@aastar/core/type-aliases/ChannelActions.md new file mode 100644 index 000000000..34bf78826 --- /dev/null +++ b/api/@aastar/core/type-aliases/ChannelActions.md @@ -0,0 +1,279 @@ +> **ChannelActions** = `object` + +Defined in: [packages/core/src/actions/channel.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L17) + +## Properties + +### ~~CLOSE\_TIMEOUT()~~ + +> **CLOSE\_TIMEOUT**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L49) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +The deployed MicroPaymentChannel ABI no longer exposes a `CLOSE_TIMEOUT` +constant — it was replaced by the configurable [closeTimeout](#closetimeout) getter plus the +[MIN\_CLOSE\_TIMEOUT](#min_close_timeout)/[MAX\_CLOSE\_TIMEOUT](#max_close_timeout) bounds. This wrapper now delegates +to the on-chain `closeTimeout()` getter so it no longer reverts; use [closeTimeout](#closetimeout). + +*** + +### closeChannel() + +> **closeChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L27) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); `cumulativeAmount`: `bigint`; `signature`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.cumulativeAmount` | `bigint` | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### closedChannels() + +> **closedChannels**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/channel.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L55) + +Whether a given channelId has already been closed (view). ABI: closedChannels(bytes32) -> bool. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### closeTimeout() + +> **closeTimeout**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L51) + +Current configurable close-timeout (seconds, view). ABI: closeTimeout() -> uint64. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getChannel() + +> **getChannel**: (`args`) => `Promise`\<[`ChannelState`](ChannelState.md)\> + +Defined in: [packages/core/src/actions/channel.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L42) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ChannelState`](ChannelState.md)\> + +*** + +### MAX\_CLOSE\_TIMEOUT() + +> **MAX\_CLOSE\_TIMEOUT**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L57) + +Upper bound for [setCloseTimeout](#setclosetimeout) (view). ABI: MAX_CLOSE_TIMEOUT() -> uint64. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MIN\_CLOSE\_TIMEOUT() + +> **MIN\_CLOSE\_TIMEOUT**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L59) + +Lower bound for [setCloseTimeout](#setclosetimeout) (view). ABI: MIN_CLOSE_TIMEOUT() -> uint64. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### openChannel() + +> **openChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorizedSigner`: `Address`; `deposit`: `bigint`; `payee`: `Address`; `salt`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorizedSigner` | `Address` | +| `args.deposit` | `bigint` | +| `args.payee` | `Address` | +| `args.salt` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### requestCloseChannel() + +> **requestCloseChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L34) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setCloseTimeout() + +> **setCloseTimeout**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L53) + +Set the configurable close-timeout window (owner-gated). ABI: setCloseTimeout(uint64 _timeout). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `timeout`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.timeout` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### settleChannel() + +> **settleChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); `cumulativeAmount`: `bigint`; `signature`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.cumulativeAmount` | `bigint` | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### topUpChannel() + +> **topUpChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/channel.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L61) + +#### Returns + +`Promise`\<`string`\> + +*** + +### VOUCHER\_TYPEHASH() + +> **VOUCHER\_TYPEHASH**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L60) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawChannel() + +> **withdrawChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L37) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/type-aliases/ChannelState.md b/api/@aastar/core/type-aliases/ChannelState.md new file mode 100644 index 000000000..0314d1a2c --- /dev/null +++ b/api/@aastar/core/type-aliases/ChannelState.md @@ -0,0 +1,67 @@ +> **ChannelState** = `object` + +Defined in: [packages/core/src/actions/channel.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L6) + +## Properties + +### authorizedSigner + +> **authorizedSigner**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L10) + +*** + +### closeRequestedAt + +> **closeRequestedAt**: `bigint` + +Defined in: [packages/core/src/actions/channel.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L13) + +*** + +### deposit + +> **deposit**: `bigint` + +Defined in: [packages/core/src/actions/channel.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L11) + +*** + +### finalized + +> **finalized**: `boolean` + +Defined in: [packages/core/src/actions/channel.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L14) + +*** + +### payee + +> **payee**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L8) + +*** + +### payer + +> **payer**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L7) + +*** + +### settled + +> **settled**: `bigint` + +Defined in: [packages/core/src/actions/channel.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L12) + +*** + +### token + +> **token**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L9) diff --git a/api/@aastar/core/type-aliases/CommunityProfile.md b/api/@aastar/core/type-aliases/CommunityProfile.md new file mode 100644 index 000000000..020fa5f29 --- /dev/null +++ b/api/@aastar/core/type-aliases/CommunityProfile.md @@ -0,0 +1,99 @@ +> **CommunityProfile** = `object` + +Defined in: [packages/core/src/actions/registry.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L123) + +Rich community metadata reconstructed from on-chain data. + +The deployed v5 Registry stores community `roleData` only in an internal mapping +with NO public getter, so this profile is recovered via the event->calldata +back-trace pattern: locate the `RoleRegistered(ROLE_COMMUNITY, community)` log, +fetch the originating transaction, then decode its `registerRole` calldata to +extract the submitted `roleData` struct. + +## Properties + +### burnAmount + +> **burnAmount**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L131) + +burnAmount from the RoleRegistered event. + +*** + +### description + +> **description**: `string` + +Defined in: [packages/core/src/actions/registry.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L127) + +*** + +### ensName + +> **ensName**: `string` + +Defined in: [packages/core/src/actions/registry.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L125) + +*** + +### logoURI + +> **logoURI**: `string` + +Defined in: [packages/core/src/actions/registry.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L128) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/core/src/actions/registry.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L124) + +*** + +### rawRoleData + +> **rawRoleData**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/registry.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L137) + +Raw ABI-encoded roleData bytes from the registration calldata. + +*** + +### registeredAt + +> **registeredAt**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L133) + +Block timestamp recorded in the RoleRegistered event. + +*** + +### stakeAmount + +> **stakeAmount**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L129) + +*** + +### txHash + +> **txHash**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/registry.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L135) + +Transaction hash that registered the community (calldata source). + +*** + +### website + +> **website**: `string` + +Defined in: [packages/core/src/actions/registry.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L126) diff --git a/api/@aastar/core/type-aliases/ContractCategory.md b/api/@aastar/core/type-aliases/ContractCategory.md index ed8b0f875..2ff416108 100644 --- a/api/@aastar/core/type-aliases/ContractCategory.md +++ b/api/@aastar/core/type-aliases/ContractCategory.md @@ -1,5 +1,5 @@ > **ContractCategory** = `"core"` \| `"tokens"` \| `"testTokens"` \| `"testAccounts"` \| `"paymaster"` \| `"monitoring"` \| `"official"` \| `"communities"` -Defined in: [packages/core/src/contracts.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L25) +Defined in: [packages/core/src/contracts.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L25) Contract category types diff --git a/api/@aastar/core/type-aliases/ContractNetwork.md b/api/@aastar/core/type-aliases/ContractNetwork.md index d00d24f44..e9855001b 100644 --- a/api/@aastar/core/type-aliases/ContractNetwork.md +++ b/api/@aastar/core/type-aliases/ContractNetwork.md @@ -1,5 +1,5 @@ > **ContractNetwork** = keyof *typeof* [`CONTRACTS`](../variables/CONTRACTS.md) -Defined in: [packages/core/src/contracts.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L111) +Defined in: [packages/core/src/contracts.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L111) Supported network types for contracts diff --git a/api/@aastar/core/type-aliases/ContractScope.md b/api/@aastar/core/type-aliases/ContractScope.md new file mode 100644 index 000000000..30438c094 --- /dev/null +++ b/api/@aastar/core/type-aliases/ContractScope.md @@ -0,0 +1,55 @@ +> **ContractScope** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L44) + +Per-(sender, target) scope. Selectors are queried via isSelectorAllowed. + +## Properties + +### allowed + +> **allowed**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L46) + +target on this sender's call-target allowlist. + +*** + +### configured + +> **configured**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L54) + +false => no scope set for this (sender, target). + +*** + +### requireDVTAlways + +> **requireDVTAlways**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L48) + +this target always requires DVT co-sign regardless of amount. + +*** + +### velocityLimit + +> **velocityLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L50) + +max cumulative amount routed to this target per window. + +*** + +### velocityWindow + +> **velocityWindow**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L52) + +velocity window length, seconds (0 => no velocity limit). diff --git a/api/@aastar/core/type-aliases/ContractScopeInput.md b/api/@aastar/core/type-aliases/ContractScopeInput.md new file mode 100644 index 000000000..9887b3c1c --- /dev/null +++ b/api/@aastar/core/type-aliases/ContractScopeInput.md @@ -0,0 +1,47 @@ +> **ContractScopeInput** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L58) + +Input form of [ContractScope](ContractScope.md) for governance setters; selectors set as a batch. + +## Properties + +### allowed + +> **allowed**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L59) + +*** + +### requireDVTAlways + +> **requireDVTAlways**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L60) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: [`Hex`](https://viem.sh/docs/index.html)[] + +Defined in: [packages/core/src/actions/policyRegistry.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L64) + +selectors to mark allowed for this target (ADDITIVE on `setContractScope`). + +*** + +### velocityLimit + +> **velocityLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L61) + +*** + +### velocityWindow + +> **velocityWindow**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L62) diff --git a/api/@aastar/core/type-aliases/DVTActions.md b/api/@aastar/core/type-aliases/DVTActions.md index 278101838..2a512fd4c 100644 --- a/api/@aastar/core/type-aliases/DVTActions.md +++ b/api/@aastar/core/type-aliases/DVTActions.md @@ -1,6 +1,6 @@ > **DVTActions** = `object` -Defined in: [packages/core/src/actions/dvt.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L6) +Defined in: [packages/core/src/actions/dvt.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L6) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/dvt.ts:6](https://github.com/AAStarCommun > **addValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L17) +Defined in: [packages/core/src/actions/dvt.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L18) #### Parameters @@ -28,7 +28,7 @@ Defined in: [packages/core/src/actions/dvt.ts:17](https://github.com/AAStarCommu > **BLS\_AGGREGATOR**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/dvt.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L21) +Defined in: [packages/core/src/actions/dvt.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L26) #### Returns @@ -40,7 +40,7 @@ Defined in: [packages/core/src/actions/dvt.ts:21](https://github.com/AAStarCommu > **createSlashProposal**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L8) +Defined in: [packages/core/src/actions/dvt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L8) #### Parameters @@ -62,7 +62,7 @@ Defined in: [packages/core/src/actions/dvt.ts:8](https://github.com/AAStarCommun > **executeSlashWithProof**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L10) +Defined in: [packages/core/src/actions/dvt.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L11) #### Parameters @@ -86,7 +86,7 @@ Defined in: [packages/core/src/actions/dvt.ts:10](https://github.com/AAStarCommu > **isValidator**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/dvt.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L16) +Defined in: [packages/core/src/actions/dvt.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L17) #### Parameters @@ -105,7 +105,7 @@ Defined in: [packages/core/src/actions/dvt.ts:16](https://github.com/AAStarCommu > **markProposalExecuted**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L11) +Defined in: [packages/core/src/actions/dvt.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L12) #### Parameters @@ -125,7 +125,7 @@ Defined in: [packages/core/src/actions/dvt.ts:11](https://github.com/AAStarCommu > **nextProposalId**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/dvt.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L13) +Defined in: [packages/core/src/actions/dvt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L14) #### Returns @@ -137,7 +137,7 @@ Defined in: [packages/core/src/actions/dvt.ts:13](https://github.com/AAStarCommu > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/dvt.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L25) +Defined in: [packages/core/src/actions/dvt.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L30) #### Returns @@ -149,7 +149,7 @@ Defined in: [packages/core/src/actions/dvt.ts:25](https://github.com/AAStarCommu > **proposals**: (`args`) => `Promise`\<\{ `executed`: `boolean`; `operator`: `Address`; `reason`: `string`; `slashLevel`: `number`; \}\> -Defined in: [packages/core/src/actions/dvt.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L12) +Defined in: [packages/core/src/actions/dvt.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L13) #### Parameters @@ -164,11 +164,33 @@ Defined in: [packages/core/src/actions/dvt.ts:12](https://github.com/AAStarCommu *** +### pruneValidator() + +> **pruneValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L22) + +Prune a validator entry (cleanup of a removed/stale validator). ABI: pruneValidator(address v). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `v`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.v` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### REGISTRY() > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/dvt.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L22) +Defined in: [packages/core/src/actions/dvt.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L27) #### Returns @@ -176,11 +198,33 @@ Defined in: [packages/core/src/actions/dvt.ts:22](https://github.com/AAStarCommu *** +### removeValidator() + +> **removeValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L20) + +Remove a validator from the active set (owner-gated). ABI: removeValidator(address v). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `v`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.v` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### renounceOwnership() > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L27) +Defined in: [packages/core/src/actions/dvt.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L32) #### Parameters @@ -199,7 +243,7 @@ Defined in: [packages/core/src/actions/dvt.ts:27](https://github.com/AAStarCommu > **setBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L20) +Defined in: [packages/core/src/actions/dvt.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L25) #### Parameters @@ -215,11 +259,11 @@ Defined in: [packages/core/src/actions/dvt.ts:20](https://github.com/AAStarCommu *** -### signSlashProposal() +### ~~signSlashProposal()~~ > **signSlashProposal**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L9) +Defined in: [packages/core/src/actions/dvt.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L10) #### Parameters @@ -234,13 +278,17 @@ Defined in: [packages/core/src/actions/dvt.ts:9](https://github.com/AAStarCommun `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — DVT slash signing is off-chain (BLS), there is no `signSlashProposal` in the DVTValidator ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### transferOwnership() > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/dvt.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L26) +Defined in: [packages/core/src/actions/dvt.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L31) #### Parameters @@ -260,7 +308,7 @@ Defined in: [packages/core/src/actions/dvt.ts:26](https://github.com/AAStarCommu > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/dvt.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/dvt.ts#L30) +Defined in: [packages/core/src/actions/dvt.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L35) #### Returns diff --git a/api/@aastar/core/type-aliases/DVTTier.md b/api/@aastar/core/type-aliases/DVTTier.md new file mode 100644 index 000000000..8110e569f --- /dev/null +++ b/api/@aastar/core/type-aliases/DVTTier.md @@ -0,0 +1,5 @@ +> **DVTTier** = *typeof* [`DVT_TIER_T2`](../variables/DVT_TIER_T2.md) \| *typeof* [`DVT_TIER_T3`](../variables/DVT_TIER_T3.md) + +Defined in: [packages/core/src/crypto/dvtWire.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L47) + +A DVT account-signature tier byte. diff --git a/api/@aastar/core/type-aliases/DryRunValidationResult.md b/api/@aastar/core/type-aliases/DryRunValidationResult.md new file mode 100644 index 000000000..b64a6fc15 --- /dev/null +++ b/api/@aastar/core/type-aliases/DryRunValidationResult.md @@ -0,0 +1,23 @@ +> **DryRunValidationResult** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L28) + +Result of an off-chain `dryRunValidation` pre-flight check. +`ok` mirrors whether the paymaster would accept the UserOp; `reasonCode` is a +bytes32 machine-readable rejection code (zero when `ok` is true). + +## Properties + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/actions/superPaymaster.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L29) + +*** + +### reasonCode + +> **reasonCode**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L30) diff --git a/api/@aastar/core/type-aliases/ERC20Actions.md b/api/@aastar/core/type-aliases/ERC20Actions.md index cccbb123a..3d23c6356 100644 --- a/api/@aastar/core/type-aliases/ERC20Actions.md +++ b/api/@aastar/core/type-aliases/ERC20Actions.md @@ -1,6 +1,6 @@ > **ERC20Actions** = `object` -Defined in: [packages/core/src/actions/tokens.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L7) +Defined in: [packages/core/src/actions/tokens.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L7) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/tokens.ts:7](https://github.com/AAStarCom > **allowance**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/tokens.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L13) +Defined in: [packages/core/src/actions/tokens.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L13) #### Parameters @@ -29,7 +29,7 @@ Defined in: [packages/core/src/actions/tokens.ts:13](https://github.com/AAStarCo > **approve**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/tokens.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L12) +Defined in: [packages/core/src/actions/tokens.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L12) #### Parameters @@ -51,7 +51,7 @@ Defined in: [packages/core/src/actions/tokens.ts:12](https://github.com/AAStarCo > **balanceOf**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/tokens.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L9) +Defined in: [packages/core/src/actions/tokens.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L9) #### Parameters @@ -71,7 +71,7 @@ Defined in: [packages/core/src/actions/tokens.ts:9](https://github.com/AAStarCom > **decimals**: (`args`) => `Promise`\<`number`\> -Defined in: [packages/core/src/actions/tokens.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L16) +Defined in: [packages/core/src/actions/tokens.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L16) #### Parameters @@ -90,7 +90,7 @@ Defined in: [packages/core/src/actions/tokens.ts:16](https://github.com/AAStarCo > **name**: (`args`) => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/tokens.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L14) +Defined in: [packages/core/src/actions/tokens.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L14) #### Parameters @@ -109,7 +109,7 @@ Defined in: [packages/core/src/actions/tokens.ts:14](https://github.com/AAStarCo > **symbol**: (`args`) => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/tokens.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L15) +Defined in: [packages/core/src/actions/tokens.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L15) #### Parameters @@ -128,7 +128,7 @@ Defined in: [packages/core/src/actions/tokens.ts:15](https://github.com/AAStarCo > **totalSupply**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/tokens.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L8) +Defined in: [packages/core/src/actions/tokens.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L8) #### Parameters @@ -147,7 +147,7 @@ Defined in: [packages/core/src/actions/tokens.ts:8](https://github.com/AAStarCom > **transfer**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/tokens.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L10) +Defined in: [packages/core/src/actions/tokens.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L10) #### Parameters @@ -169,7 +169,7 @@ Defined in: [packages/core/src/actions/tokens.ts:10](https://github.com/AAStarCo > **transferFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/tokens.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L11) +Defined in: [packages/core/src/actions/tokens.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L11) #### Parameters diff --git a/api/@aastar/core/type-aliases/EntryPointActions.md b/api/@aastar/core/type-aliases/EntryPointActions.md index bb580e67b..d24caadf6 100644 --- a/api/@aastar/core/type-aliases/EntryPointActions.md +++ b/api/@aastar/core/type-aliases/EntryPointActions.md @@ -1,6 +1,6 @@ > **EntryPointActions** = `object` -Defined in: [packages/core/src/actions/entryPoint.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L11) +Defined in: [packages/core/src/actions/entryPoint.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L11) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:11](https://github.com/AASt > **balanceOf**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/entryPoint.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L12) +Defined in: [packages/core/src/actions/entryPoint.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L12) #### Parameters @@ -27,7 +27,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:12](https://github.com/AASt > **depositTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/entryPoint.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L13) +Defined in: [packages/core/src/actions/entryPoint.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L13) #### Parameters @@ -48,7 +48,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:13](https://github.com/AASt > **entryPointAddress**: `Address` -Defined in: [packages/core/src/actions/entryPoint.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L16) +Defined in: [packages/core/src/actions/entryPoint.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L16) *** @@ -56,7 +56,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:16](https://github.com/AASt > **getDepositInfo**: (`args`) => `Promise`\<\{ `deposit`: `bigint`; `stake`: `bigint`; `staked`: `boolean`; `unstakeDelaySec`: `number`; `withdrawTime`: `number`; \}\> -Defined in: [packages/core/src/actions/entryPoint.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L15) +Defined in: [packages/core/src/actions/entryPoint.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L15) #### Parameters @@ -75,7 +75,7 @@ Defined in: [packages/core/src/actions/entryPoint.ts:15](https://github.com/AASt > **getNonce**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/entryPoint.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/entryPoint.ts#L14) +Defined in: [packages/core/src/actions/entryPoint.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L14) #### Parameters diff --git a/api/@aastar/core/type-aliases/FaucetConfig.md b/api/@aastar/core/type-aliases/FaucetConfig.md index 98567973c..5988c320a 100644 --- a/api/@aastar/core/type-aliases/FaucetConfig.md +++ b/api/@aastar/core/type-aliases/FaucetConfig.md @@ -1,6 +1,6 @@ > **FaucetConfig** = `object` -Defined in: [packages/core/src/actions/faucet.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L24) +Defined in: [packages/core/src/actions/faucet.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L24) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/faucet.ts:24](https://github.com/AAStarCo > `optional` **ethAmount**: `bigint` -Defined in: [packages/core/src/actions/faucet.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L29) +Defined in: [packages/core/src/actions/faucet.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L29) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/faucet.ts:29](https://github.com/AAStarCo > `optional` **paymasterV4**: `Address` -Defined in: [packages/core/src/actions/faucet.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L28) +Defined in: [packages/core/src/actions/faucet.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L28) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/faucet.ts:28](https://github.com/AAStarCo > **registry**: `Address` -Defined in: [packages/core/src/actions/faucet.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L27) +Defined in: [packages/core/src/actions/faucet.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L27) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/actions/faucet.ts:27](https://github.com/AAStarCo > **targetAA**: `Address` -Defined in: [packages/core/src/actions/faucet.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L25) +Defined in: [packages/core/src/actions/faucet.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L25) *** @@ -40,7 +40,7 @@ Defined in: [packages/core/src/actions/faucet.ts:25](https://github.com/AAStarCo > **token**: `Address` -Defined in: [packages/core/src/actions/faucet.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L26) +Defined in: [packages/core/src/actions/faucet.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L26) *** @@ -48,4 +48,4 @@ Defined in: [packages/core/src/actions/faucet.ts:26](https://github.com/AAStarCo > `optional` **tokenAmount**: `bigint` -Defined in: [packages/core/src/actions/faucet.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L30) +Defined in: [packages/core/src/actions/faucet.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L30) diff --git a/api/@aastar/core/type-aliases/FaucetPreparationResult.md b/api/@aastar/core/type-aliases/FaucetPreparationResult.md index 1b8795269..63121b346 100644 --- a/api/@aastar/core/type-aliases/FaucetPreparationResult.md +++ b/api/@aastar/core/type-aliases/FaucetPreparationResult.md @@ -1,6 +1,6 @@ > **FaucetPreparationResult** = `object` -Defined in: [packages/core/src/actions/faucet.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L17) +Defined in: [packages/core/src/actions/faucet.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L17) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/faucet.ts:17](https://github.com/AAStarCo > **ethFunded**: `boolean` -Defined in: [packages/core/src/actions/faucet.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L18) +Defined in: [packages/core/src/actions/faucet.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L18) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/faucet.ts:18](https://github.com/AAStarCo > **paymasterDeposited**: `boolean` -Defined in: [packages/core/src/actions/faucet.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L21) +Defined in: [packages/core/src/actions/faucet.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L21) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/faucet.ts:21](https://github.com/AAStarCo > **roleRegistered**: `boolean` -Defined in: [packages/core/src/actions/faucet.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L19) +Defined in: [packages/core/src/actions/faucet.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L19) *** @@ -32,4 +32,4 @@ Defined in: [packages/core/src/actions/faucet.ts:19](https://github.com/AAStarCo > **tokenMinted**: `boolean` -Defined in: [packages/core/src/actions/faucet.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/faucet.ts#L20) +Defined in: [packages/core/src/actions/faucet.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L20) diff --git a/api/@aastar/core/type-aliases/ForceExitActions.md b/api/@aastar/core/type-aliases/ForceExitActions.md new file mode 100644 index 000000000..9e1971e18 --- /dev/null +++ b/api/@aastar/core/type-aliases/ForceExitActions.md @@ -0,0 +1,22 @@ +> **ForceExitActions** = `object` + +Defined in: [packages/core/src/actions/forceExit.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L15) + +## Properties + +### pendingExit() + +> **pendingExit**: (`args`) => `Promise`\<[`PendingExit`](PendingExit.md)\> + +Defined in: [packages/core/src/actions/forceExit.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<[`PendingExit`](PendingExit.md)\> diff --git a/api/@aastar/core/type-aliases/GTokenActions.md b/api/@aastar/core/type-aliases/GTokenActions.md index 8502ff5a2..0d290bf75 100644 --- a/api/@aastar/core/type-aliases/GTokenActions.md +++ b/api/@aastar/core/type-aliases/GTokenActions.md @@ -1,6 +1,6 @@ > **GTokenActions** = [`ERC20Actions`](ERC20Actions.md) & `object` -Defined in: [packages/core/src/actions/tokens.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L20) +Defined in: [packages/core/src/actions/tokens.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L20) ## Type Declaration diff --git a/api/@aastar/core/type-aliases/GTokenAuthorizationActions.md b/api/@aastar/core/type-aliases/GTokenAuthorizationActions.md new file mode 100644 index 000000000..0508eda3d --- /dev/null +++ b/api/@aastar/core/type-aliases/GTokenAuthorizationActions.md @@ -0,0 +1,211 @@ +> **GTokenAuthorizationActions** = [`GTokenActions`](GTokenActions.md) & `object` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L12) + +## Type Declaration + +### authorizationState() + +> **authorizationState**: (`args`) => `Promise`\<[`AuthorizationState`](../enumerations/AuthorizationState.md)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `authorizer`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.authorizer` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`AuthorizationState`](../enumerations/AuthorizationState.md)\> + +### CANCEL\_AUTHORIZATION\_TYPEHASH() + +> **CANCEL\_AUTHORIZATION\_TYPEHASH**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### cancelAuthorization() + +> **cancelAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorizer`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorizer` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### DOMAIN\_SEPARATOR() + +> **DOMAIN\_SEPARATOR**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### factory() + +> **factory**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### MAX\_AUTH\_VALIDITY() + +> **MAX\_AUTH\_VALIDITY**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### mySBT() + +> **mySBT**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### RECEIVE\_WITH\_AUTHORIZATION\_TYPEHASH() + +> **RECEIVE\_WITH\_AUTHORIZATION\_TYPEHASH**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### receiveWithAuthorization() + +> **receiveWithAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `token`: `Address`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `xPNTsToken`: `Address`; \} | - | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | - | +| `args.from` | `Address` | - | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.to` | `Address` | - | +| `args.token` | `Address` | - | +| `args.validAfter` | `bigint` | - | +| `args.validBefore` | `bigint` | - | +| `args.value` | `bigint` | - | +| `args.xPNTsToken` | `Address` | RC-2 access hint — NOT signed; pass address(0) to use SBT path only. See trust model above. | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setMySBT() + +> **setMySBT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `mySBT`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.mySBT` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### TRANSFER\_WITH\_AUTHORIZATION\_TYPEHASH() + +> **TRANSFER\_WITH\_AUTHORIZATION\_TYPEHASH**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### transferWithAuthorization() + +> **transferWithAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `token`: `Address`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `xPNTsToken`: `Address`; \} | - | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | - | +| `args.from` | `Address` | - | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.to` | `Address` | - | +| `args.token` | `Address` | - | +| `args.validAfter` | `bigint` | - | +| `args.validBefore` | `bigint` | - | +| `args.value` | `bigint` | - | +| `args.xPNTsToken` | `Address` | RC-2 access hint — NOT signed; pass address(0) to use SBT path only. See trust model above. | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/core/type-aliases/InitConfig.md b/api/@aastar/core/type-aliases/InitConfig.md new file mode 100644 index 000000000..253a0a26d --- /dev/null +++ b/api/@aastar/core/type-aliases/InitConfig.md @@ -0,0 +1,51 @@ +> **InitConfig** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L19) + +## Properties + +### approvedAlgIds + +> **approvedAlgIds**: readonly `number`[] + +Defined in: [packages/core/src/actions/airAccount.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L22) + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L21) + +*** + +### guardians + +> **guardians**: readonly \[`Address`, `Address`, `Address`\] + +Defined in: [packages/core/src/actions/airAccount.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L20) + +*** + +### initialTokenConfigs + +> **initialTokenConfigs**: readonly [`TokenConfig`](TokenConfig.md)[] + +Defined in: [packages/core/src/actions/airAccount.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L25) + +*** + +### initialTokens + +> **initialTokens**: readonly `Address`[] + +Defined in: [packages/core/src/actions/airAccount.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L24) + +*** + +### minDailyLimit + +> **minDailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L23) diff --git a/api/@aastar/core/type-aliases/NetworkContracts.md b/api/@aastar/core/type-aliases/NetworkContracts.md index fb7d27fcf..a6b930a03 100644 --- a/api/@aastar/core/type-aliases/NetworkContracts.md +++ b/api/@aastar/core/type-aliases/NetworkContracts.md @@ -1,5 +1,5 @@ > **NetworkContracts** = *typeof* [`SEPOLIA_CONTRACTS`](../variables/SEPOLIA_CONTRACTS.md) -Defined in: [packages/core/src/contracts.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L116) +Defined in: [packages/core/src/contracts.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L116) Contract addresses for a specific network diff --git a/api/@aastar/core/type-aliases/OperatorConfig.md b/api/@aastar/core/type-aliases/OperatorConfig.md index 9fb84dd13..af48b5d7e 100644 --- a/api/@aastar/core/type-aliases/OperatorConfig.md +++ b/api/@aastar/core/type-aliases/OperatorConfig.md @@ -1,6 +1,6 @@ > **OperatorConfig** = `object` -Defined in: [packages/core/src/actions/superPaymaster.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L14) +Defined in: [packages/core/src/actions/superPaymaster.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L41) ## Properties @@ -8,15 +8,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:14](https://github.com/ > **aPNTsBalance**: `bigint` -Defined in: [packages/core/src/actions/superPaymaster.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L15) - -*** - -### exchangeRate - -> **exchangeRate**: `bigint` - -Defined in: [packages/core/src/actions/superPaymaster.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L16) +Defined in: [packages/core/src/actions/superPaymaster.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L42) *** @@ -24,7 +16,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:16](https://github.com/ > **isConfigured**: `boolean` -Defined in: [packages/core/src/actions/superPaymaster.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L17) +Defined in: [packages/core/src/actions/superPaymaster.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L44) *** @@ -32,7 +24,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:17](https://github.com/ > **isPaused**: `boolean` -Defined in: [packages/core/src/actions/superPaymaster.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L18) +Defined in: [packages/core/src/actions/superPaymaster.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L45) *** @@ -40,7 +32,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:18](https://github.com/ > **minTxInterval**: `number` -Defined in: [packages/core/src/actions/superPaymaster.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L21) +Defined in: [packages/core/src/actions/superPaymaster.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L48) *** @@ -48,7 +40,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:21](https://github.com/ > **reputation**: `number` -Defined in: [packages/core/src/actions/superPaymaster.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L20) +Defined in: [packages/core/src/actions/superPaymaster.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L47) *** @@ -56,7 +48,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:20](https://github.com/ > **totalSpent**: `bigint` -Defined in: [packages/core/src/actions/superPaymaster.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L23) +Defined in: [packages/core/src/actions/superPaymaster.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L50) *** @@ -64,7 +56,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:23](https://github.com/ > **totalTxSponsored**: `bigint` -Defined in: [packages/core/src/actions/superPaymaster.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L24) +Defined in: [packages/core/src/actions/superPaymaster.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L51) *** @@ -72,7 +64,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:24](https://github.com/ > **treasury**: `Address` -Defined in: [packages/core/src/actions/superPaymaster.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L22) +Defined in: [packages/core/src/actions/superPaymaster.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L49) *** @@ -80,4 +72,4 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:22](https://github.com/ > **xPNTsToken**: `Address` -Defined in: [packages/core/src/actions/superPaymaster.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L19) +Defined in: [packages/core/src/actions/superPaymaster.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L46) diff --git a/api/@aastar/core/type-aliases/OperatorMode.md b/api/@aastar/core/type-aliases/OperatorMode.md new file mode 100644 index 000000000..0ab8d1a90 --- /dev/null +++ b/api/@aastar/core/type-aliases/OperatorMode.md @@ -0,0 +1,12 @@ +> **OperatorMode** = `"AOA"` \| `"AOA+"` + +Defined in: [packages/core/src/requirementChecker.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L20) + +Operator onboarding mode (matches the codebase's paymaster model). +- `AOA` — an INDEPENDENT paymaster operator running their own PaymasterV4 + (role `ROLE_PAYMASTER_AOA`). Readiness = that role + a GToken role stake. +- `AOA+` — a SHARED SuperPaymaster operator (role `ROLE_PAYMASTER_SUPER`). + Readiness = that role + a GToken role stake + a community-issued SBT. + +In both modes the "stake" is the on-chain `getRoleStake(roleId, operator)` +recorded by the Registry — NOT the operator's plain GToken wallet balance. diff --git a/api/@aastar/core/type-aliases/P256SessionState.md b/api/@aastar/core/type-aliases/P256SessionState.md new file mode 100644 index 000000000..49910e1ed --- /dev/null +++ b/api/@aastar/core/type-aliases/P256SessionState.md @@ -0,0 +1,27 @@ +> **P256SessionState** = `object` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L7) + +## Properties + +### callCount + +> **callCount**: `number` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L9) + +*** + +### prevCount + +> **prevCount**: `number` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L10) + +*** + +### windowStart + +> **windowStart**: `number` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L8) diff --git a/api/@aastar/core/type-aliases/PackedUserOperation.md b/api/@aastar/core/type-aliases/PackedUserOperation.md new file mode 100644 index 000000000..2aa4116c4 --- /dev/null +++ b/api/@aastar/core/type-aliases/PackedUserOperation.md @@ -0,0 +1,79 @@ +> **PackedUserOperation** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L11) + +ERC-4337 v0.7 PackedUserOperation tuple, matching the `struct PackedUserOperation` +input of `dryRunValidation` / `validatePaymasterUserOp` in the SuperPaymaster ABI. +Field order is load-bearing: viem encodes the tuple positionally from this shape. + +## Properties + +### accountGasLimits + +> **accountGasLimits**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L16) + +*** + +### callData + +> **callData**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L15) + +*** + +### gasFees + +> **gasFees**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L18) + +*** + +### initCode + +> **initCode**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L14) + +*** + +### nonce + +> **nonce**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L13) + +*** + +### paymasterAndData + +> **paymasterAndData**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L19) + +*** + +### preVerificationGas + +> **preVerificationGas**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L17) + +*** + +### sender + +> **sender**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L12) + +*** + +### signature + +> **signature**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L20) diff --git a/api/@aastar/core/type-aliases/PaymasterActions.md b/api/@aastar/core/type-aliases/PaymasterActions.md index 2b1a81235..235948a6f 100644 --- a/api/@aastar/core/type-aliases/PaymasterActions.md +++ b/api/@aastar/core/type-aliases/PaymasterActions.md @@ -1,6 +1,6 @@ > **PaymasterActions** = `object` -Defined in: [packages/core/src/actions/paymaster.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L6) +Defined in: [packages/core/src/actions/paymaster.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L6) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:6](https://github.com/AAStar > **addDeposit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L62) +Defined in: [packages/core/src/actions/paymaster.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L63) #### Parameters @@ -28,7 +28,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:62](https://github.com/AASta > **addStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L64) +Defined in: [packages/core/src/actions/paymaster.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L65) #### Parameters @@ -49,7 +49,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:64](https://github.com/AASta > **balances**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L10) +Defined in: [packages/core/src/actions/paymaster.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L10) #### Parameters @@ -69,7 +69,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:10](https://github.com/AASta > **cachedPrice**: () => `Promise`\<\{ `price`: `bigint`; `updatedAt`: `number`; \}\> -Defined in: [packages/core/src/actions/paymaster.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L34) +Defined in: [packages/core/src/actions/paymaster.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L34) #### Returns @@ -81,7 +81,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:34](https://github.com/AASta > **calculateCost**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L37) +Defined in: [packages/core/src/actions/paymaster.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L38) #### Parameters @@ -102,7 +102,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:37](https://github.com/AASta > **deactivateFromRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L42) +Defined in: [packages/core/src/actions/paymaster.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L43) #### Parameters @@ -121,7 +121,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:42](https://github.com/AASta > **depositFor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L8) +Defined in: [packages/core/src/actions/paymaster.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L8) #### Parameters @@ -143,7 +143,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:8](https://github.com/AAStar > **entryPoint**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/paymaster.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L69) +Defined in: [packages/core/src/actions/paymaster.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L70) #### Returns @@ -155,7 +155,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:69](https://github.com/AASta > **ethUsdPriceFeed**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/paymaster.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L46) +Defined in: [packages/core/src/actions/paymaster.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L47) #### Returns @@ -163,11 +163,11 @@ Defined in: [packages/core/src/actions/paymaster.ts:46](https://github.com/AASta *** -### getRealtimeTokenCost() +### ~~getRealtimeTokenCost()~~ > **getRealtimeTokenCost**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L36) +Defined in: [packages/core/src/actions/paymaster.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L37) #### Parameters @@ -181,13 +181,17 @@ Defined in: [packages/core/src/actions/paymaster.ts:36](https://github.com/AASta `Promise`\<`bigint`\> +#### Deprecated + +The deployed Paymaster ABI has no `getRealtimeTokenCost` — this wrapper now calls `calculateCost(gasCost, token, true)` (realtime mode). Prefer [calculateCost](#calculatecost). + *** ### initialize() > **initialize**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L22) +Defined in: [packages/core/src/actions/paymaster.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L22) #### Parameters @@ -213,7 +217,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:22](https://github.com/AASta > **isActiveInRegistry**: () => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/paymaster.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L40) +Defined in: [packages/core/src/actions/paymaster.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L41) #### Returns @@ -225,7 +229,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:40](https://github.com/AASta > **isRegistrySet**: () => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/paymaster.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L41) +Defined in: [packages/core/src/actions/paymaster.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L42) #### Returns @@ -237,7 +241,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:41](https://github.com/AASta > **MAX\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L55) +Defined in: [packages/core/src/actions/paymaster.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L56) #### Returns @@ -249,7 +253,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:55](https://github.com/AASta > **MAX\_GAS\_TOKENS**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L57) +Defined in: [packages/core/src/actions/paymaster.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L58) #### Returns @@ -261,7 +265,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:57](https://github.com/AASta > **MAX\_SBTS**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L58) +Defined in: [packages/core/src/actions/paymaster.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L59) #### Returns @@ -273,7 +277,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:58](https://github.com/AASta > **MAX\_SERVICE\_FEE**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L59) +Defined in: [packages/core/src/actions/paymaster.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L60) #### Returns @@ -285,7 +289,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:59](https://github.com/AASta > **maxGasCostCap**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L48) +Defined in: [packages/core/src/actions/paymaster.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L49) #### Returns @@ -297,7 +301,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:48](https://github.com/AASta > **MIN\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L56) +Defined in: [packages/core/src/actions/paymaster.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L57) #### Returns @@ -309,7 +313,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:56](https://github.com/AASta > **oracleDecimals**: () => `Promise`\<`number`\> -Defined in: [packages/core/src/actions/paymaster.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L51) +Defined in: [packages/core/src/actions/paymaster.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L52) #### Returns @@ -321,7 +325,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:51](https://github.com/AASta > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/paymaster.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L72) +Defined in: [packages/core/src/actions/paymaster.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L73) #### Returns @@ -333,7 +337,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:72](https://github.com/AASta > **pause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L29) +Defined in: [packages/core/src/actions/paymaster.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L29) #### Parameters @@ -352,7 +356,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:29](https://github.com/AASta > **paused**: () => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/paymaster.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L31) +Defined in: [packages/core/src/actions/paymaster.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L31) #### Returns @@ -364,7 +368,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:31](https://github.com/AASta > **postOp**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L19) +Defined in: [packages/core/src/actions/paymaster.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L19) #### Parameters @@ -387,7 +391,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:19](https://github.com/AASta > **priceStalenessThreshold**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L49) +Defined in: [packages/core/src/actions/paymaster.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L50) #### Returns @@ -399,7 +403,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:49](https://github.com/AASta > **registry**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/paymaster.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L43) +Defined in: [packages/core/src/actions/paymaster.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L44) #### Returns @@ -411,7 +415,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:43](https://github.com/AASta > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L74) +Defined in: [packages/core/src/actions/paymaster.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L75) #### Parameters @@ -430,7 +434,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:74](https://github.com/AASta > **serviceFeeRate**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L47) +Defined in: [packages/core/src/actions/paymaster.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L48) #### Returns @@ -442,7 +446,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:47](https://github.com/AASta > **setCachedPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L14) +Defined in: [packages/core/src/actions/paymaster.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L14) #### Parameters @@ -463,7 +467,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:14](https://github.com/AASta > **setMaxGasCostCap**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L25) +Defined in: [packages/core/src/actions/paymaster.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L25) #### Parameters @@ -483,7 +487,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:25](https://github.com/AASta > **setPriceStalenessThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L26) +Defined in: [packages/core/src/actions/paymaster.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L26) #### Parameters @@ -503,7 +507,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:26](https://github.com/AASta > **setServiceFeeRate**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L24) +Defined in: [packages/core/src/actions/paymaster.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L24) #### Parameters @@ -523,7 +527,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:24](https://github.com/AASta > **setTokenPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L13) +Defined in: [packages/core/src/actions/paymaster.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L13) #### Parameters @@ -544,7 +548,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:13](https://github.com/AASta > **setTreasury**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L23) +Defined in: [packages/core/src/actions/paymaster.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L23) #### Parameters @@ -564,7 +568,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:23](https://github.com/AASta > **tokenDecimals**: (`args`) => `Promise`\<`number`\> -Defined in: [packages/core/src/actions/paymaster.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L52) +Defined in: [packages/core/src/actions/paymaster.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L53) #### Parameters @@ -583,7 +587,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:52](https://github.com/AASta > **tokenPrices**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/paymaster.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L15) +Defined in: [packages/core/src/actions/paymaster.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L15) #### Parameters @@ -602,7 +606,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:15](https://github.com/AASta > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L73) +Defined in: [packages/core/src/actions/paymaster.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L74) #### Parameters @@ -622,7 +626,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:73](https://github.com/AASta > **treasury**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/paymaster.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L50) +Defined in: [packages/core/src/actions/paymaster.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L51) #### Returns @@ -634,7 +638,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:50](https://github.com/AASta > **unlockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L65) +Defined in: [packages/core/src/actions/paymaster.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L66) #### Parameters @@ -653,7 +657,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:65](https://github.com/AASta > **unpause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L30) +Defined in: [packages/core/src/actions/paymaster.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L30) #### Parameters @@ -672,7 +676,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:30](https://github.com/AASta > **updatePrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L35) +Defined in: [packages/core/src/actions/paymaster.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L35) #### Parameters @@ -691,7 +695,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:35](https://github.com/AASta > **validatePaymasterUserOp**: (`args`) => `Promise`\<\{ `context`: [`Hex`](https://viem.sh/docs/index.html); `validationData`: `bigint`; \}\> -Defined in: [packages/core/src/actions/paymaster.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L18) +Defined in: [packages/core/src/actions/paymaster.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L18) #### Parameters @@ -712,7 +716,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:18](https://github.com/AASta > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/paymaster.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L75) +Defined in: [packages/core/src/actions/paymaster.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L76) #### Returns @@ -724,7 +728,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:75](https://github.com/AASta > **withdraw**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L9) +Defined in: [packages/core/src/actions/paymaster.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L9) #### Parameters @@ -745,7 +749,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:9](https://github.com/AAStar > **withdrawStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L66) +Defined in: [packages/core/src/actions/paymaster.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L67) #### Parameters @@ -765,7 +769,7 @@ Defined in: [packages/core/src/actions/paymaster.ts:66](https://github.com/AASta > **withdrawTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/paymaster.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/paymaster.ts#L63) +Defined in: [packages/core/src/actions/paymaster.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L64) #### Parameters diff --git a/api/@aastar/core/type-aliases/PaymasterFactoryActions.md b/api/@aastar/core/type-aliases/PaymasterFactoryActions.md index a11526f13..f20608821 100644 --- a/api/@aastar/core/type-aliases/PaymasterFactoryActions.md +++ b/api/@aastar/core/type-aliases/PaymasterFactoryActions.md @@ -1,6 +1,6 @@ > **PaymasterFactoryActions** = `object` -Defined in: [packages/core/src/actions/factory.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L48) +Defined in: [packages/core/src/actions/factory.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L55) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/factory.ts:48](https://github.com/AAStarC > **addImplementation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L64) +Defined in: [packages/core/src/actions/factory.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L71) #### Parameters @@ -29,7 +29,7 @@ Defined in: [packages/core/src/actions/factory.ts:64](https://github.com/AAStarC > **calculateAddress**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L54) +Defined in: [packages/core/src/actions/factory.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L61) #### Parameters @@ -48,7 +48,7 @@ Defined in: [packages/core/src/actions/factory.ts:54](https://github.com/AAStarC > **defaultVersion**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/factory.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L81) +Defined in: [packages/core/src/actions/factory.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L89) #### Returns @@ -60,7 +60,7 @@ Defined in: [packages/core/src/actions/factory.ts:81](https://github.com/AAStarC > **deployPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L50) +Defined in: [packages/core/src/actions/factory.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L57) #### Parameters @@ -81,7 +81,7 @@ Defined in: [packages/core/src/actions/factory.ts:50](https://github.com/AAStarC > **deployPaymasterDeterministic**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L51) +Defined in: [packages/core/src/actions/factory.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L58) #### Parameters @@ -99,23 +99,27 @@ Defined in: [packages/core/src/actions/factory.ts:51](https://github.com/AAStarC *** -### ENTRY\_POINT() +### ~~ENTRY\_POINT()~~ > **ENTRY\_POINT**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L74) +Defined in: [packages/core/src/actions/factory.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L82) #### Returns `Promise`\<`Address`\> +#### Deprecated + +Removed in the v5.x contract refactor — PaymasterFactory has no `ENTRY_POINT` constant. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### getAllPaymasters() > **getAllPaymasters**: () => `Promise`\<`Address`[]\> -Defined in: [packages/core/src/actions/factory.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L59) +Defined in: [packages/core/src/actions/factory.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L66) #### Returns @@ -127,7 +131,7 @@ Defined in: [packages/core/src/actions/factory.ts:59](https://github.com/AAStarC > **getImplementation**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L68) +Defined in: [packages/core/src/actions/factory.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L75) #### Parameters @@ -146,7 +150,7 @@ Defined in: [packages/core/src/actions/factory.ts:68](https://github.com/AAStarC > **getImplementationV4**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L69) +Defined in: [packages/core/src/actions/factory.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L76) #### Returns @@ -158,7 +162,7 @@ Defined in: [packages/core/src/actions/factory.ts:69](https://github.com/AAStarC > **getOperatorByPaymaster**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L57) +Defined in: [packages/core/src/actions/factory.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L64) #### Parameters @@ -177,7 +181,7 @@ Defined in: [packages/core/src/actions/factory.ts:57](https://github.com/AAStarC > **getPaymaster**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L55) +Defined in: [packages/core/src/actions/factory.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L62) #### Parameters @@ -196,7 +200,7 @@ Defined in: [packages/core/src/actions/factory.ts:55](https://github.com/AAStarC > **getPaymasterByOperator**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L56) +Defined in: [packages/core/src/actions/factory.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L63) #### Parameters @@ -215,7 +219,7 @@ Defined in: [packages/core/src/actions/factory.ts:56](https://github.com/AAStarC > **getPaymasterCount**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/factory.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L58) +Defined in: [packages/core/src/actions/factory.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L65) #### Returns @@ -227,7 +231,7 @@ Defined in: [packages/core/src/actions/factory.ts:58](https://github.com/AAStarC > **hasPaymaster**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/factory.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L60) +Defined in: [packages/core/src/actions/factory.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L67) #### Parameters @@ -246,7 +250,7 @@ Defined in: [packages/core/src/actions/factory.ts:60](https://github.com/AAStarC > **isPaymasterDeployed**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/factory.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L61) +Defined in: [packages/core/src/actions/factory.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L68) #### Parameters @@ -265,7 +269,7 @@ Defined in: [packages/core/src/actions/factory.ts:61](https://github.com/AAStarC > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L77) +Defined in: [packages/core/src/actions/factory.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L85) #### Returns @@ -277,7 +281,7 @@ Defined in: [packages/core/src/actions/factory.ts:77](https://github.com/AAStarC > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L73) +Defined in: [packages/core/src/actions/factory.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L80) #### Returns @@ -289,7 +293,7 @@ Defined in: [packages/core/src/actions/factory.ts:73](https://github.com/AAStarC > **setDefaultVersion**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L66) +Defined in: [packages/core/src/actions/factory.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L73) #### Parameters @@ -309,7 +313,7 @@ Defined in: [packages/core/src/actions/factory.ts:66](https://github.com/AAStarC > **setImplementationV4**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L67) +Defined in: [packages/core/src/actions/factory.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L74) #### Parameters @@ -329,7 +333,7 @@ Defined in: [packages/core/src/actions/factory.ts:67](https://github.com/AAStarC > **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L70) +Defined in: [packages/core/src/actions/factory.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L77) #### Parameters @@ -349,7 +353,7 @@ Defined in: [packages/core/src/actions/factory.ts:70](https://github.com/AAStarC > **totalDeployed**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/factory.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L82) +Defined in: [packages/core/src/actions/factory.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L90) #### Returns @@ -361,7 +365,7 @@ Defined in: [packages/core/src/actions/factory.ts:82](https://github.com/AAStarC > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L78) +Defined in: [packages/core/src/actions/factory.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L86) #### Parameters @@ -381,7 +385,7 @@ Defined in: [packages/core/src/actions/factory.ts:78](https://github.com/AAStarC > **upgradeImplementation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L65) +Defined in: [packages/core/src/actions/factory.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L72) #### Parameters @@ -402,7 +406,7 @@ Defined in: [packages/core/src/actions/factory.ts:65](https://github.com/AAStarC > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/factory.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L83) +Defined in: [packages/core/src/actions/factory.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L91) #### Returns diff --git a/api/@aastar/core/type-aliases/PendingExit.md b/api/@aastar/core/type-aliases/PendingExit.md new file mode 100644 index 000000000..fa592cf85 --- /dev/null +++ b/api/@aastar/core/type-aliases/PendingExit.md @@ -0,0 +1,43 @@ +> **PendingExit** = `object` + +Defined in: [packages/core/src/actions/forceExit.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L7) + +## Properties + +### approvalBitmap + +> **approvalBitmap**: `bigint` + +Defined in: [packages/core/src/actions/forceExit.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L12) + +*** + +### data + +> **data**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/forceExit.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L10) + +*** + +### proposedAt + +> **proposedAt**: `bigint` + +Defined in: [packages/core/src/actions/forceExit.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L11) + +*** + +### target + +> **target**: `Address` + +Defined in: [packages/core/src/actions/forceExit.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L8) + +*** + +### value + +> **value**: `bigint` + +Defined in: [packages/core/src/actions/forceExit.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L9) diff --git a/api/@aastar/core/type-aliases/PendingModuleInstall.md b/api/@aastar/core/type-aliases/PendingModuleInstall.md new file mode 100644 index 000000000..6b8a88e56 --- /dev/null +++ b/api/@aastar/core/type-aliases/PendingModuleInstall.md @@ -0,0 +1,43 @@ +> **PendingModuleInstall** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L29) + +## Properties + +### executeAfter + +> **executeAfter**: `number` + +Defined in: [packages/core/src/actions/airAccount.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L33) + +*** + +### initDataHash + +> **initDataHash**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/airAccount.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L34) + +*** + +### module + +> **module**: `Address` + +Defined in: [packages/core/src/actions/airAccount.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L30) + +*** + +### moduleTypeId + +> **moduleTypeId**: `number` + +Defined in: [packages/core/src/actions/airAccount.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L31) + +*** + +### proposedAt + +> **proposedAt**: `number` + +Defined in: [packages/core/src/actions/airAccount.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L32) diff --git a/api/@aastar/core/type-aliases/PolicyRegistryActions.md b/api/@aastar/core/type-aliases/PolicyRegistryActions.md new file mode 100644 index 000000000..7e46c8ccd --- /dev/null +++ b/api/@aastar/core/type-aliases/PolicyRegistryActions.md @@ -0,0 +1,428 @@ +> **PolicyRegistryActions** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L75) + +## Properties + +### checkPolicy() + +> **checkPolicy**: (`args`) => `Promise`\<\{ `decision`: [`PolicyDecision`](../enumerations/PolicyDecision.md); `remainingDaily`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L83) + +Validation-time policy decision for one intended action. OPT-IN, default-ALLOW: +a sender with nothing configured for (asset, target) is UNRESTRICTED. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `amount`: `bigint`; `asset`: `Address`; `selector`: [`Hex`](https://viem.sh/docs/index.html); `sender`: `Address`; `target`: `Address`; \} | +| `args.amount` | `bigint` | +| `args.asset` | `Address` | +| `args.selector` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<\{ `decision`: [`PolicyDecision`](../enumerations/PolicyDecision.md); `remainingDaily`: `bigint`; \}\> + +decision (see [PolicyDecision](../enumerations/PolicyDecision.md)) + `remainingDaily` headroom in the + current window AFTER `amount` would post (`type(uint256).max` when unrestricted). + +*** + +### DEFAULT\_WINDOW() + +> **DEFAULT\_WINDOW**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L106) + +Default daily-limit window length (seconds) used when `windowSeconds == 0`. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### ETH\_SENTINEL() + +> **ETH\_SENTINEL**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L108) + +The ETH sentinel address used as `asset` for native ETH (address(0) is invalid). + +#### Returns + +`Promise`\<`Address`\> + +*** + +### freezeSender() + +> **freezeSender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L129) + +Immediately freeze `sender`: [checkPolicy](#checkpolicy) returns REJECT for all ops. +`onlyGuardianOrTimelock` (guardian = AirAccount 2-of-3 RecoveryService). Lifting +the freeze is a loosening → [unfreezeSender](#unfreezesender) (timelocked). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getAssetPolicy() + +> **getAssetPolicy**: (`args`) => `Promise`\<[`AssetPolicy`](AssetPolicy.md)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L86) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `asset`: `Address`; `sender`: `Address`; \} | +| `args.asset` | `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`AssetPolicy`](AssetPolicy.md)\> + +*** + +### getAssetSpend() + +> **getAssetSpend**: (`args`) => `Promise`\<[`SpendCounter`](SpendCounter.md)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L90) + +Cumulative native-unit spend + window start for this (sender, asset). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `asset`: `Address`; `sender`: `Address`; \} | +| `args.asset` | `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`SpendCounter`](SpendCounter.md)\> + +*** + +### getContractScope() + +> **getContractScope**: (`args`) => `Promise`\<[`ContractScope`](ContractScope.md)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L87) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `sender`: `Address`; `target`: `Address`; \} | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`ContractScope`](ContractScope.md)\> + +*** + +### guardian() + +> **guardian**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L96) + +AirAccount 2-of-3 RecoveryService allowed to freeze/tighten immediately. + +#### Returns + +`Promise`\<`Address`\> + +*** + +### isAuthorizedConsumer() + +> **isAuthorizedConsumer**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L92) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `consumer`: `Address`; \} | +| `args.consumer` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isFrozen() + +> **isFrozen**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L91) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `sender`: `Address`; \} | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isSelectorAllowed() + +> **isSelectorAllowed**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L88) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `selector`: [`Hex`](https://viem.sh/docs/index.html); `sender`: `Address`; `target`: `Address`; \} | +| `args.selector` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### setAssetPolicy() + +> **setAssetPolicy**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:141](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L141) + +Set a (sender, asset) policy. `onlyTimelock` — reverts unless `msg.sender ==` +[timelock](#timelock)`()`. There is NO registry-level pending store: the 2-day delay is +the EXTERNAL OZ {TimelockController}'s own `minDelay`. To loosen, governance must +`schedule()` this call on the timelock, wait out the delay, then `execute()` it +(which makes the timelock call back here). Calling this directly with an EOA/owner +key will revert `NotTimelock`. Read [timelock](#timelock) for the controller address and +surface its scheduled-operation ETA (TimelockController.getTimestamp) to callers. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `asset`: `Address`; `params`: [`AssetPolicyInput`](AssetPolicyInput.md); `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.asset` | `Address` | +| `args.params` | [`AssetPolicyInput`](AssetPolicyInput.md) | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setConsumerAuthorization() + +> **setConsumerAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L161) + +Authorize / revoke a staked consumer permitted to call `recordSpend`. +`onlyTimelock` — route through [timelock](#timelock). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorized`: `boolean`; `consumer`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorized` | `boolean` | +| `args.consumer` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setContractScope() + +> **setContractScope**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L148) + +Set a (sender, target) scope and ADD the listed selectors (additive union, NOT +replace; remove via [tightenContractScope](#tightencontractscope)). `onlyTimelock` — same external +TimelockController gating as [setAssetPolicy](#setassetpolicy); calling directly reverts +`NotTimelock`. Schedule + execute through [timelock](#timelock). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `params`: [`ContractScopeInput`](ContractScopeInput.md); `sender`: `Address`; `target`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.params` | [`ContractScopeInput`](ContractScopeInput.md) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setGuardian() + +> **setGuardian**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:156](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L156) + +Set the guardian. `onlyTimelock` — route through [timelock](#timelock). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newGuardian`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newGuardian` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### tightenAssetPolicy() + +> **tightenAssetPolicy**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L117) + +Immediately tighten a (sender, asset) policy. Reverts `NotStrictlyTighter` +unless the new params are <= current on every dimension. Callable by the +guardian or the timelock (`onlyGuardianOrTimelock`) — NO timelock delay. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `asset`: `Address`; `params`: [`AssetPolicyInput`](AssetPolicyInput.md); `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.asset` | `Address` | +| `args.params` | [`AssetPolicyInput`](AssetPolicyInput.md) | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### tightenContractScope() + +> **tightenContractScope**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L123) + +Immediately tighten a (sender, target) scope (disallow target, remove selectors, +lower velocity, set requireDVTAlways). Reverts unless strictly tighter. +`onlyGuardianOrTimelock` — NO timelock delay. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `params`: [`ContractScopeInput`](ContractScopeInput.md); `sender`: `Address`; `target`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.params` | [`ContractScopeInput`](ContractScopeInput.md) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### timelock() + +> **timelock**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L104) + +The OZ {TimelockController} whose `minDelay` (2 days) gates every loosening. +It is the ONLY address allowed to call the `onlyTimelock` loosen/admin setters +([setAssetPolicy](#setassetpolicy) / [setContractScope](#setcontractscope) / [unfreezeSender](#unfreezesender) / +[setGuardian](#setguardian) / [setConsumerAuthorization](#setconsumerauthorization)). Read this to find the +controller through which loosen calls must be scheduled + executed. + +#### Returns + +`Promise`\<`Address`\> + +*** + +### unfreezeSender() + +> **unfreezeSender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L154) + +Lift a freeze on `sender`. Unfreeze is a loosening → `onlyTimelock`; must be +scheduled + executed through the external [timelock](#timelock) controller (2-day delay). +Calling directly reverts `NotTimelock`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L109) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/core/type-aliases/RegistryActions.md b/api/@aastar/core/type-aliases/RegistryActions.md index d9b4f1467..98287eaf5 100644 --- a/api/@aastar/core/type-aliases/RegistryActions.md +++ b/api/@aastar/core/type-aliases/RegistryActions.md @@ -1,33 +1,14 @@ > **RegistryActions** = `object` -Defined in: [packages/core/src/actions/registry.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L21) +Defined in: [packages/core/src/actions/registry.ts:140](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L140) ## Properties -### accountToUser() - -> **accountToUser**: (`args`) => `Promise`\<`Address`\> - -Defined in: [packages/core/src/actions/registry.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L74) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `args` | \{ `account`: `Address`; \} | -| `args.account` | `Address` | - -#### Returns - -`Promise`\<`Address`\> - -*** - -### addLevelThreshold() +### ~~addLevelThreshold()~~ > **addLevelThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L43) +Defined in: [packages/core/src/actions/registry.ts:178](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L178) #### Parameters @@ -41,29 +22,9 @@ Defined in: [packages/core/src/actions/registry.ts:43](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -*** - -### adminConfigureRole() - -> **adminConfigureRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated -Defined in: [packages/core/src/actions/registry.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L24) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `entryBurn`: `bigint`; `exitFeePercent`: `bigint`; `minExitFee`: `bigint`; `minStake`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | -| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | -| `args.entryBurn` | `bigint` | -| `args.exitFeePercent` | `bigint` | -| `args.minExitFee` | `bigint` | -| `args.minStake` | `bigint` | -| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | - -#### Returns - -`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +Removed in the v5.x contract refactor — there is no append-one `addLevelThreshold` (only the replace-all [setLevelThresholds](#setlevelthresholds)). Throws ErrorCode.NOT\_IMPLEMENTED; read [levelThresholds](#levelthresholds), append, and call [setLevelThresholds](#setlevelthresholds). *** @@ -71,7 +32,7 @@ Defined in: [packages/core/src/actions/registry.ts:24](https://github.com/AAStar > **batchUpdateGlobalReputation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L44) +Defined in: [packages/core/src/actions/registry.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L179) #### Parameters @@ -91,23 +52,25 @@ Defined in: [packages/core/src/actions/registry.ts:44](https://github.com/AAStar *** -### blsAggregator() +### blacklistNonce() -> **blsAggregator**: () => `Promise`\<`Address`\> +> **blacklistNonce**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:192](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L192) -Defined in: [packages/core/src/actions/registry.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L55) +Monotonic nonce bumped on each operator-blacklist update (view). ABI: blacklistNonce() -> uint256. #### Returns -`Promise`\<`Address`\> +`Promise`\<`bigint`\> *** -### blsValidator() +### blsAggregator() -> **blsValidator**: () => `Promise`\<`Address`\> +> **blsAggregator**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L54) +Defined in: [packages/core/src/actions/registry.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L201) #### Returns @@ -115,11 +78,11 @@ Defined in: [packages/core/src/actions/registry.ts:54](https://github.com/AAStar *** -### calculateExitFee() +### ~~calculateExitFee()~~ > **calculateExitFee**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L73) +Defined in: [packages/core/src/actions/registry.ts:254](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L254) #### Parameters @@ -133,13 +96,17 @@ Defined in: [packages/core/src/actions/registry.ts:73](https://github.com/AAStar `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — Registry has no exit-fee calculator. Throws ErrorCode.NOT\_IMPLEMENTED; use the GTokenStaking `previewExitFee({ user, roleId })` action instead. + *** -### communityByENS() +### ~~communityByENS()~~ > **communityByENS**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L38) +Defined in: [packages/core/src/actions/registry.ts:164](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L164) #### Parameters @@ -152,13 +119,17 @@ Defined in: [packages/core/src/actions/registry.ts:38](https://github.com/AAStar `Promise`\<`Address`\> +#### Deprecated + +The deployed v5 Registry ABI has no `communityByENS` function — use [getCommunityByENS](#getcommunitybyens). This wrapper now delegates to `getCommunityByENS` so it no longer reverts on-chain. + *** -### communityByName() +### ~~communityByName()~~ > **communityByName**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L37) +Defined in: [packages/core/src/actions/registry.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L162) #### Parameters @@ -171,13 +142,17 @@ Defined in: [packages/core/src/actions/registry.ts:37](https://github.com/AAStar `Promise`\<`Address`\> +#### Deprecated + +The deployed v5 Registry ABI has no `communityByName` function — use [getCommunityByName](#getcommunitybyname). This wrapper now delegates to `getCommunityByName` so it no longer reverts on-chain. + *** ### configureRole() > **configureRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L23) +Defined in: [packages/core/src/actions/registry.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L142) #### Parameters @@ -194,11 +169,11 @@ Defined in: [packages/core/src/actions/registry.ts:23](https://github.com/AAStar *** -### createNewRole() +### ~~createNewRole()~~ > **createNewRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L25) +Defined in: [packages/core/src/actions/registry.ts:145](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L145) #### Parameters @@ -214,13 +189,17 @@ Defined in: [packages/core/src/actions/registry.ts:25](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +The deployed Registry ABI has no `createNewRole` — this wrapper now calls `configureRole(roleId, config)` with `roleOwner` merged into `config.owner`. Prefer [configureRole](#configurerole). + *** ### creditTierConfig() > **creditTierConfig**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L71) +Defined in: [packages/core/src/actions/registry.ts:251](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L251) #### Parameters @@ -239,7 +218,7 @@ Defined in: [packages/core/src/actions/registry.ts:71](https://github.com/AAStar > **exitRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L33) +Defined in: [packages/core/src/actions/registry.ts:156](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L156) #### Parameters @@ -255,11 +234,70 @@ Defined in: [packages/core/src/actions/registry.ts:33](https://github.com/AAStar *** +### getCommunityByENS() + +> **getCommunityByENS**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L167) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `ensName`: `string`; \} | +| `args.ensName` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getCommunityByName() + +> **getCommunityByName**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:166](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L166) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `name`: `string`; \} | +| `args.name` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getCommunityProfile() + +> **getCommunityProfile**: (`args`) => `Promise`\<[`CommunityProfile`](CommunityProfile.md) \| `null`\> + +Defined in: [packages/core/src/actions/registry.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L172) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `fromBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); `toBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); \} | +| `args.community` | `Address` | +| `args.fromBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | +| `args.toBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`CommunityProfile`](CommunityProfile.md) \| `null`\> + +*** + ### getCreditLimit() > **getCreditLimit**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L41) +Defined in: [packages/core/src/actions/registry.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L175) #### Parameters @@ -274,11 +312,31 @@ Defined in: [packages/core/src/actions/registry.ts:41](https://github.com/AAStar *** +### getEffectiveStake() + +> **getEffectiveStake**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L170) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + ### getRoleConfig() > **getRoleConfig**: (`args`) => `Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> -Defined in: [packages/core/src/actions/registry.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L30) +Defined in: [packages/core/src/actions/registry.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L151) #### Parameters @@ -293,18 +351,66 @@ Defined in: [packages/core/src/actions/registry.ts:30](https://github.com/AAStar *** +### getRoleMemberCount() + +> **getRoleMemberCount**: (`args`) => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/registry.ts:243](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L243) + +Count of active members for a role, derived from the same event indexing as +[getRoleMembers](#getrolemembers) (i.e. `getRoleMembers(...).length`). + +NOTE: this differs from [getRoleUserCount](#getroleusercount), which reads the on-chain +`roleMembers[roleId].length` counter directly. Prefer `getRoleUserCount` when you +only need a count and an authoritative on-chain value is acceptable; use this when +you also need the member addresses or want a count consistent with `getRoleMembers` +over a specific block range. Subject to the same `getLogs` truncation caveat as +[getRoleMembers](#getrolemembers) — prefer `getRoleUserCount` for an authoritative count. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `fromBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `toBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); \} | +| `args.fromBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.toBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`number`\> + +*** + ### getRoleMembers() > **getRoleMembers**: (`args`) => `Promise`\<`Address`[]\> -Defined in: [packages/core/src/actions/registry.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L66) +Defined in: [packages/core/src/actions/registry.ts:231](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L231) + +Active members of a role, derived by event indexing. + +The deployed v5 Registry slimmed its storage: there is NO `getRoleMembers` +getter in the ABI (members are not enumerable on-chain), so this is reconstructed +from the membership-lifecycle events — `RoleRegistered` (join, emitted by both +`registerRole` and `safeMintForRole`) minus `RoleExited` (exit). For each user we +keep their LATEST lifecycle event (by block number, then log index) so a user who +exited and later re-registered is correctly counted as active. + +⚠️ The result is only as complete as the underlying `getLogs` response. Many RPC +providers cap the block range or the number of logs returned and may SILENTLY +truncate — in which case the member list will be incomplete with no error. This +helper does NOT paginate. For large histories, pass a bounded `fromBlock`/`toBlock` +window (and page yourself), or use an indexed data source (subgraph/indexer). #### Parameters | Parameter | Type | | ------ | ------ | -| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args` | \{ `fromBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `toBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); \} | +| `args.fromBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | | `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.toBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | #### Returns @@ -312,11 +418,31 @@ Defined in: [packages/core/src/actions/registry.ts:66](https://github.com/AAStar *** +### getRoleStake() + +> **getRoleStake**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L169) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + ### getRoleUserCount() > **getRoleUserCount**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L65) +Defined in: [packages/core/src/actions/registry.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L214) #### Parameters @@ -335,7 +461,7 @@ Defined in: [packages/core/src/actions/registry.ts:65](https://github.com/AAStar > **getUserRoles**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)[]\> -Defined in: [packages/core/src/actions/registry.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L67) +Defined in: [packages/core/src/actions/registry.ts:244](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L244) #### Parameters @@ -354,7 +480,7 @@ Defined in: [packages/core/src/actions/registry.ts:67](https://github.com/AAStar > **globalReputation**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L42) +Defined in: [packages/core/src/actions/registry.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L176) #### Parameters @@ -369,11 +495,11 @@ Defined in: [packages/core/src/actions/registry.ts:42](https://github.com/AAStar *** -### grantRole() +### ~~grantRole()~~ > **grantRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L94) +Defined in: [packages/core/src/actions/registry.ts:274](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L274) #### Parameters @@ -388,13 +514,17 @@ Defined in: [packages/core/src/actions/registry.ts:94](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — the Registry dropped the OZ AccessControl surface (no `grantRole`). Throws ErrorCode.NOT\_IMPLEMENTED; use [registerRole](#registerrole) to add a user to a role. + *** ### GTOKEN\_STAKING() > **GTOKEN\_STAKING**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L58) +Defined in: [packages/core/src/actions/registry.ts:204](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L204) #### Returns @@ -406,7 +536,7 @@ Defined in: [packages/core/src/actions/registry.ts:58](https://github.com/AAStar > **hasRole**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/registry.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L29) +Defined in: [packages/core/src/actions/registry.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L150) #### Parameters @@ -426,7 +556,7 @@ Defined in: [packages/core/src/actions/registry.ts:29](https://github.com/AAStar > **isReputationSource**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/registry.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L60) +Defined in: [packages/core/src/actions/registry.ts:207](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L207) #### Parameters @@ -441,11 +571,11 @@ Defined in: [packages/core/src/actions/registry.ts:60](https://github.com/AAStar *** -### lastReputationEpoch() +### ~~lastReputationEpoch()~~ > **lastReputationEpoch**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L61) +Defined in: [packages/core/src/actions/registry.ts:209](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L209) #### Parameters @@ -458,13 +588,17 @@ Defined in: [packages/core/src/actions/registry.ts:61](https://github.com/AAStar `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed Registry ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### levelThresholds() > **levelThresholds**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L72) +Defined in: [packages/core/src/actions/registry.ts:252](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L252) #### Parameters @@ -483,7 +617,7 @@ Defined in: [packages/core/src/actions/registry.ts:72](https://github.com/AAStar > **MYSBT**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L56) +Defined in: [packages/core/src/actions/registry.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L202) #### Returns @@ -495,7 +629,7 @@ Defined in: [packages/core/src/actions/registry.ts:56](https://github.com/AAStar > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L89) +Defined in: [packages/core/src/actions/registry.ts:268](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L268) #### Returns @@ -507,7 +641,7 @@ Defined in: [packages/core/src/actions/registry.ts:89](https://github.com/AAStar > **registerRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L26) +Defined in: [packages/core/src/actions/registry.ts:146](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L146) #### Parameters @@ -525,11 +659,11 @@ Defined in: [packages/core/src/actions/registry.ts:26](https://github.com/AAStar *** -### registerRoleSelf() +### ~~registerRoleSelf()~~ > **registerRoleSelf**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L27) +Defined in: [packages/core/src/actions/registry.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L148) #### Parameters @@ -544,13 +678,17 @@ Defined in: [packages/core/src/actions/registry.ts:27](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +The deployed Registry ABI has no `registerRoleSelf` — this wrapper now calls `registerRole(roleId, , data)` deriving the caller from `account`. Prefer [registerRole](#registerrole). + *** ### renounceOwnership() > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L91) +Defined in: [packages/core/src/actions/registry.ts:270](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L270) #### Parameters @@ -565,23 +703,27 @@ Defined in: [packages/core/src/actions/registry.ts:91](https://github.com/AAStar *** -### reputationSource() +### ~~reputationSource()~~ > **reputationSource**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L59) +Defined in: [packages/core/src/actions/registry.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L206) #### Returns `Promise`\<`Address`\> +#### Deprecated + +Removed in the v5.x contract refactor — there is no single-address `reputationSource` getter (sources are now a set). Throws ErrorCode.NOT\_IMPLEMENTED; use [isReputationSource](#isreputationsource)({ source }) to test membership. + *** -### revokeRole() +### ~~revokeRole()~~ > **revokeRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L95) +Defined in: [packages/core/src/actions/registry.ts:276](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L276) #### Parameters @@ -596,13 +738,17 @@ Defined in: [packages/core/src/actions/registry.ts:95](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — the Registry has no admin `revokeRole` (only the caller can self-exit). Throws ErrorCode.NOT\_IMPLEMENTED; a user removes their own role via [exitRole](#exitrole). + *** ### ROLE\_ANODE() > **ROLE\_ANODE**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L86) +Defined in: [packages/core/src/actions/registry.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L265) #### Returns @@ -614,7 +760,7 @@ Defined in: [packages/core/src/actions/registry.ts:86](https://github.com/AAStar > **ROLE\_COMMUNITY**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L80) +Defined in: [packages/core/src/actions/registry.ts:259](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L259) #### Returns @@ -626,7 +772,7 @@ Defined in: [packages/core/src/actions/registry.ts:80](https://github.com/AAStar > **ROLE\_DVT**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L84) +Defined in: [packages/core/src/actions/registry.ts:263](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L263) #### Returns @@ -638,7 +784,7 @@ Defined in: [packages/core/src/actions/registry.ts:84](https://github.com/AAStar > **ROLE\_ENDUSER**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L81) +Defined in: [packages/core/src/actions/registry.ts:260](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L260) #### Returns @@ -650,7 +796,7 @@ Defined in: [packages/core/src/actions/registry.ts:81](https://github.com/AAStar > **ROLE\_KMS**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L85) +Defined in: [packages/core/src/actions/registry.ts:264](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L264) #### Returns @@ -662,7 +808,7 @@ Defined in: [packages/core/src/actions/registry.ts:85](https://github.com/AAStar > **ROLE\_PAYMASTER\_AOA**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L83) +Defined in: [packages/core/src/actions/registry.ts:262](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L262) #### Returns @@ -674,7 +820,7 @@ Defined in: [packages/core/src/actions/registry.ts:83](https://github.com/AAStar > **ROLE\_PAYMASTER\_SUPER**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L82) +Defined in: [packages/core/src/actions/registry.ts:261](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L261) #### Returns @@ -682,11 +828,11 @@ Defined in: [packages/core/src/actions/registry.ts:82](https://github.com/AAStar *** -### roleConfigs() +### ~~roleConfigs()~~ > **roleConfigs**: (`args`) => `Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> -Defined in: [packages/core/src/actions/registry.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L64) +Defined in: [packages/core/src/actions/registry.ts:213](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L213) #### Parameters @@ -699,32 +845,17 @@ Defined in: [packages/core/src/actions/registry.ts:64](https://github.com/AAStar `Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> -*** - -### roleLockDurations() - -> **roleLockDurations**: (`args`) => `Promise`\<`bigint`\> +#### Deprecated -Defined in: [packages/core/src/actions/registry.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L77) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | -| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | - -#### Returns - -`Promise`\<`bigint`\> +The deployed Registry ABI has no `roleConfigs` mapping getter — this wrapper now reads the ABI-confirmed `getRoleConfig(roleId)`. Prefer [getRoleConfig](#getroleconfig). *** -### roleMembers() +### ~~roleMembers()~~ > **roleMembers**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L68) +Defined in: [packages/core/src/actions/registry.ts:246](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L246) #### Parameters @@ -738,13 +869,17 @@ Defined in: [packages/core/src/actions/registry.ts:68](https://github.com/AAStar `Promise`\<`Address`\> +#### Deprecated + +Removed in the v5.x contract refactor — Registry storage was slimmed and members are not enumerable by index (no `roleMembers(roleId,index)` getter). Throws ErrorCode.NOT\_IMPLEMENTED; use [getRoleMembers](#getrolemembers) (event-derived) instead. + *** -### roleMetadata() +### ~~roleMetadata()~~ > **roleMetadata**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L34) +Defined in: [packages/core/src/actions/registry.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L158) #### Parameters @@ -758,32 +893,17 @@ Defined in: [packages/core/src/actions/registry.ts:34](https://github.com/AAStar `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -*** - -### roleOwners() - -> **roleOwners**: (`args`) => `Promise`\<`Address`\> - -Defined in: [packages/core/src/actions/registry.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L75) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | -| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | - -#### Returns +#### Deprecated -`Promise`\<`Address`\> +Removed in the v5.x contract refactor — there is no per-user role-metadata getter. Throws ErrorCode.NOT\_IMPLEMENTED; use [getCommunityProfile](#getcommunityprofile) (event back-trace) for a community's roleData or [getRoleConfig](#getroleconfig) for role config. *** -### roleStakes() +### ~~roleStakes()~~ > **roleStakes**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L76) +Defined in: [packages/core/src/actions/registry.ts:256](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L256) #### Parameters @@ -797,13 +917,17 @@ Defined in: [packages/core/src/actions/registry.ts:76](https://github.com/AAStar `Promise`\<`bigint`\> +#### Deprecated + +The deployed Registry ABI has no `roleStakes` mapping getter — this wrapper now reads the ABI-confirmed `getRoleStake(roleId, user)`. Prefer [getRoleStake](#getrolestake). + *** ### safeMintForRole() > **safeMintForRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L28) +Defined in: [packages/core/src/actions/registry.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L149) #### Parameters @@ -825,7 +949,7 @@ Defined in: [packages/core/src/actions/registry.ts:28](https://github.com/AAStar > **setBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L48) +Defined in: [packages/core/src/actions/registry.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L195) #### Parameters @@ -841,19 +965,44 @@ Defined in: [packages/core/src/actions/registry.ts:48](https://github.com/AAStar *** -### setBLSValidator() +### setCreditTier() + +> **setCreditTier**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L181) + +Set the credit limit for a reputation level/tier (owner-gated). ABI: setCreditTier(uint256 level, uint256 limit). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `level`: `bigint`; `limit`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.level` | `bigint` | +| `args.limit` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setLevelThresholds() -> **setBLSValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +> **setLevelThresholds**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L47) +Defined in: [packages/core/src/actions/registry.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L183) + +Replace the full reputation level-threshold array (owner-gated). ABI: setLevelThresholds(uint256[] thresholds). #### Parameters | Parameter | Type | | ------ | ------ | -| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `validator`: `Address`; \} | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `thresholds`: `bigint`[]; \} | | `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | -| `args.validator` | `Address` | +| `args.thresholds` | `bigint`[] | #### Returns @@ -865,7 +1014,7 @@ Defined in: [packages/core/src/actions/registry.ts:47](https://github.com/AAStar > **setMySBT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L49) +Defined in: [packages/core/src/actions/registry.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L196) #### Parameters @@ -885,7 +1034,7 @@ Defined in: [packages/core/src/actions/registry.ts:49](https://github.com/AAStar > **setReputationSource**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L52) +Defined in: [packages/core/src/actions/registry.ts:199](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L199) #### Parameters @@ -901,11 +1050,11 @@ Defined in: [packages/core/src/actions/registry.ts:52](https://github.com/AAStar *** -### setRoleLockDuration() +### ~~setRoleLockDuration()~~ > **setRoleLockDuration**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L31) +Defined in: [packages/core/src/actions/registry.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L153) #### Parameters @@ -920,13 +1069,17 @@ Defined in: [packages/core/src/actions/registry.ts:31](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — `roleLockDuration` is now a field of the role config. Throws ErrorCode.NOT\_IMPLEMENTED; set it via [configureRole](#configurerole) (config.roleLockDuration). + *** -### setRoleOwner() +### ~~setRoleOwner()~~ > **setRoleOwner**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L32) +Defined in: [packages/core/src/actions/registry.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L155) #### Parameters @@ -941,13 +1094,17 @@ Defined in: [packages/core/src/actions/registry.ts:32](https://github.com/AAStar `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — the role owner is now a field of the role config. Throws ErrorCode.NOT\_IMPLEMENTED; set it via [configureRole](#configurerole) (config.owner). + *** ### setStaking() > **setStaking**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L51) +Defined in: [packages/core/src/actions/registry.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L198) #### Parameters @@ -967,7 +1124,7 @@ Defined in: [packages/core/src/actions/registry.ts:51](https://github.com/AAStar > **setSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L50) +Defined in: [packages/core/src/actions/registry.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L197) #### Parameters @@ -987,7 +1144,7 @@ Defined in: [packages/core/src/actions/registry.ts:50](https://github.com/AAStar > **SUPER\_PAYMASTER**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/registry.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L57) +Defined in: [packages/core/src/actions/registry.ts:203](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L203) #### Returns @@ -995,11 +1152,55 @@ Defined in: [packages/core/src/actions/registry.ts:57](https://github.com/AAStar *** +### syncExitFees() + +> **syncExitFees**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L143) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roles`: [`Hex`](https://viem.sh/docs/index.html)[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roles` | [`Hex`](https://viem.sh/docs/index.html)[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### syncStakeFromStaking() + +> **syncStakeFromStaking**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:190](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L190) + +Sync a user's role stake from the GTokenStaking contract (staking-gated). ABI: syncStakeFromStaking(address user, bytes32 roleId, uint256 newAmount). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newAmount`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newAmount` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### transferOwnership() > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L90) +Defined in: [packages/core/src/actions/registry.ts:269](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L269) #### Parameters @@ -1015,11 +1216,37 @@ Defined in: [packages/core/src/actions/registry.ts:90](https://github.com/AAStar *** -### userRoleCount() +### updateOperatorBlacklist() + +> **updateOperatorBlacklist**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:188](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L188) + +Update an operator's per-user blacklist in batch with a proof. +ABI: updateOperatorBlacklist(address operator, address[] users, bool[] statuses, bytes proof). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `operator`: `Address`; `proof`: [`Hex`](https://viem.sh/docs/index.html); `statuses`: `boolean`[]; `users`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.operator` | `Address` | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.statuses` | `boolean`[] | +| `args.users` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~userRoleCount()~~ > **userRoleCount**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/registry.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L70) +Defined in: [packages/core/src/actions/registry.ts:250](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L250) #### Parameters @@ -1032,13 +1259,17 @@ Defined in: [packages/core/src/actions/registry.ts:70](https://github.com/AAStar `Promise`\<`bigint`\> +#### Deprecated + +The deployed Registry ABI has no `userRoleCount` — this wrapper now returns `getUserRoles(user).length`. Prefer [getUserRoles](#getuserroles). (NOTE: distinct from [getRoleUserCount](#getroleusercount), which counts users of a role.) + *** -### userRoles() +### ~~userRoles()~~ > **userRoles**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/registry.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L69) +Defined in: [packages/core/src/actions/registry.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L248) #### Parameters @@ -1052,13 +1283,17 @@ Defined in: [packages/core/src/actions/registry.ts:69](https://github.com/AAStar `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> +#### Deprecated + +The deployed Registry ABI has no `userRoles(user,index)` indexed getter — this wrapper now reads `getUserRoles(user)` and returns the entry at `index`. Prefer [getUserRoles](#getuserroles). + *** ### version() > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/registry.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L98) +Defined in: [packages/core/src/actions/registry.ts:279](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L279) #### Returns diff --git a/api/@aastar/core/type-aliases/ReputationActions.md b/api/@aastar/core/type-aliases/ReputationActions.md index 140723519..b871e6435 100644 --- a/api/@aastar/core/type-aliases/ReputationActions.md +++ b/api/@aastar/core/type-aliases/ReputationActions.md @@ -1,14 +1,14 @@ > **ReputationActions** = `object` -Defined in: [packages/core/src/actions/reputation.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L20) +Defined in: [packages/core/src/actions/reputation.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L20) ## Properties -### batchSyncToRegistry() +### ~~batchSyncToRegistry()~~ > **batchSyncToRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L53) +Defined in: [packages/core/src/actions/reputation.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L75) #### Parameters @@ -22,13 +22,17 @@ Defined in: [packages/core/src/actions/reputation.ts:53](https://github.com/AASt `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — no batch sync variant. Throws ErrorCode.NOT\_IMPLEMENTED; use [syncToRegistry](#synctoregistry) (per-user, with proof). + *** -### batchUpdateScores() +### ~~batchUpdateScores()~~ > **batchUpdateScores**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L52) +Defined in: [packages/core/src/actions/reputation.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L73) #### Parameters @@ -43,13 +47,17 @@ Defined in: [packages/core/src/actions/reputation.ts:52](https://github.com/AASt `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — no `batchUpdateScores`. Throws ErrorCode.NOT\_IMPLEMENTED; use [setCommunityReputation](#setcommunityreputation) per user or [syncToRegistry](#synctoregistry). + *** ### boostedCollections() > **boostedCollections**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/reputation.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L48) +Defined in: [packages/core/src/actions/reputation.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L68) #### Parameters @@ -68,7 +76,7 @@ Defined in: [packages/core/src/actions/reputation.ts:48](https://github.com/AASt > **calculateReputation**: (`args`) => `Promise`\<\{ `communityScore`: `bigint`; `globalScore`: `bigint`; \}\> -Defined in: [packages/core/src/actions/reputation.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L36) +Defined in: [packages/core/src/actions/reputation.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L42) #### Parameters @@ -89,7 +97,7 @@ Defined in: [packages/core/src/actions/reputation.ts:36](https://github.com/AASt > **communityActiveRules**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L31) +Defined in: [packages/core/src/actions/reputation.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L37) #### Parameters @@ -109,7 +117,7 @@ Defined in: [packages/core/src/actions/reputation.ts:31](https://github.com/AASt > **communityReputations**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L40) +Defined in: [packages/core/src/actions/reputation.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L60) #### Parameters @@ -129,7 +137,7 @@ Defined in: [packages/core/src/actions/reputation.ts:40](https://github.com/AASt > **communityRules**: (`args`) => `Promise`\<[`ReputationRule`](ReputationRule.md)\> -Defined in: [packages/core/src/actions/reputation.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L30) +Defined in: [packages/core/src/actions/reputation.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L36) #### Parameters @@ -149,7 +157,7 @@ Defined in: [packages/core/src/actions/reputation.ts:30](https://github.com/AASt > **computeScore**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L35) +Defined in: [packages/core/src/actions/reputation.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L41) #### Parameters @@ -171,7 +179,7 @@ Defined in: [packages/core/src/actions/reputation.ts:35](https://github.com/AASt > **defaultRule**: () => `Promise`\<[`ReputationRule`](ReputationRule.md)\> -Defined in: [packages/core/src/actions/reputation.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L32) +Defined in: [packages/core/src/actions/reputation.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L38) #### Returns @@ -179,11 +187,11 @@ Defined in: [packages/core/src/actions/reputation.ts:32](https://github.com/AASt *** -### disableRule() +### ~~disableRule()~~ > **disableRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L25) +Defined in: [packages/core/src/actions/reputation.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L29) #### Parameters @@ -197,13 +205,17 @@ Defined in: [packages/core/src/actions/reputation.ts:25](https://github.com/AASt `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — rules have no enable/disable toggle. Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### enableRule() +### ~~enableRule()~~ > **enableRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L24) +Defined in: [packages/core/src/actions/reputation.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L27) #### Parameters @@ -217,13 +229,17 @@ Defined in: [packages/core/src/actions/reputation.ts:24](https://github.com/AASt `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — rules have no enable/disable toggle. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### entropyFactors() > **entropyFactors**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L49) +Defined in: [packages/core/src/actions/reputation.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L69) #### Parameters @@ -242,7 +258,7 @@ Defined in: [packages/core/src/actions/reputation.ts:49](https://github.com/AASt > **getActiveRules**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)[]\> -Defined in: [packages/core/src/actions/reputation.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L27) +Defined in: [packages/core/src/actions/reputation.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L32) #### Parameters @@ -257,11 +273,11 @@ Defined in: [packages/core/src/actions/reputation.ts:27](https://github.com/AASt *** -### getCommunityScore() +### ~~getCommunityScore()~~ > **getCommunityScore**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L39) +Defined in: [packages/core/src/actions/reputation.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L59) #### Parameters @@ -274,25 +290,37 @@ Defined in: [packages/core/src/actions/reputation.ts:39](https://github.com/AASt `Promise`\<`bigint`\> +#### Deprecated + +NOT available on-chain. `getCommunityScore` does not exist in the deployed +ReputationSystem ABI (calling it reverts). There is no aggregate per-community score +getter — use [communityReputations](#communityreputations) (per-user community score) or +[calculateReputation](#calculatereputation) (returns `communityScore` for a given user) instead. +This method now throws a descriptive error rather than reverting on-chain. + *** -### getEntropyFactor() +### ~~getEntropyFactor()~~ > **getEntropyFactor**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L67) +Defined in: [packages/core/src/actions/reputation.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L91) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — no no-arg `getEntropyFactor`. Throws ErrorCode.NOT\_IMPLEMENTED; use [entropyFactors](#entropyfactors)({ community }). + *** ### getReputationBreakdown() > **getReputationBreakdown**: (`args`) => `Promise`\<[`ReputationBreakdown`](ReputationBreakdown.md)\> -Defined in: [packages/core/src/actions/reputation.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L37) +Defined in: [packages/core/src/actions/reputation.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L43) #### Parameters @@ -309,11 +337,11 @@ Defined in: [packages/core/src/actions/reputation.ts:37](https://github.com/AASt *** -### getReputationRule() +### ~~getReputationRule()~~ > **getReputationRule**: (`args`) => `Promise`\<[`ReputationRule`](ReputationRule.md)\> -Defined in: [packages/core/src/actions/reputation.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L23) +Defined in: [packages/core/src/actions/reputation.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L25) #### Parameters @@ -326,25 +354,33 @@ Defined in: [packages/core/src/actions/reputation.ts:23](https://github.com/AASt `Promise`\<[`ReputationRule`](ReputationRule.md)\> +#### Deprecated + +Removed in the v5.x contract refactor — no single-rule getter by ruleId. Throws ErrorCode.NOT\_IMPLEMENTED; use [communityRules](#communityrules) (per-community) or [defaultRule](#defaultrule). + *** -### getRuleCount() +### ~~getRuleCount()~~ > **getRuleCount**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L28) +Defined in: [packages/core/src/actions/reputation.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L34) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — no global rule counter. Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### getUserScore() +### ~~getUserScore()~~ > **getUserScore**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L38) +Defined in: [packages/core/src/actions/reputation.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L51) #### Parameters @@ -357,13 +393,21 @@ Defined in: [packages/core/src/actions/reputation.ts:38](https://github.com/AASt `Promise`\<`bigint`\> +#### Deprecated + +NOT available on-chain. `getUserScore` does not exist in the deployed +ReputationSystem ABI (calling it reverts). There is no single-argument global score +getter — use [calculateReputation](#calculatereputation) (returns `globalScore`, requires a community ++ timestamp) or read `globalReputation(user)` from the Registry contract instead. +This method now throws a descriptive error rather than reverting on-chain. + *** -### isRuleActive() +### ~~isRuleActive()~~ > **isRuleActive**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/reputation.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L26) +Defined in: [packages/core/src/actions/reputation.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L31) #### Parameters @@ -376,13 +420,31 @@ Defined in: [packages/core/src/actions/reputation.ts:26](https://github.com/AASt `Promise`\<`boolean`\> +#### Deprecated + +Removed in the v5.x contract refactor — no `isRuleActive(ruleId)` getter (rule activity is per-community). Throws ErrorCode.NOT\_IMPLEMENTED; use [getActiveRules](#getactiverules)({ community }) and test membership. + +*** + +### MAX\_BOOSTED\_COLLECTIONS() + +> **MAX\_BOOSTED\_COLLECTIONS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L96) + +Max number of NFT collections that can grant a reputation boost (view). ABI: MAX_BOOSTED_COLLECTIONS() -> uint256. + +#### Returns + +`Promise`\<`bigint`\> + *** ### nftCollectionBoost() > **nftCollectionBoost**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L45) +Defined in: [packages/core/src/actions/reputation.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L65) #### Parameters @@ -401,7 +463,7 @@ Defined in: [packages/core/src/actions/reputation.ts:45](https://github.com/AASt > **nftHoldStart**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/reputation.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L46) +Defined in: [packages/core/src/actions/reputation.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L66) #### Parameters @@ -421,7 +483,7 @@ Defined in: [packages/core/src/actions/reputation.ts:46](https://github.com/AASt > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/reputation.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L73) +Defined in: [packages/core/src/actions/reputation.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L99) #### Returns @@ -433,7 +495,7 @@ Defined in: [packages/core/src/actions/reputation.ts:73](https://github.com/AASt > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/reputation.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L70) +Defined in: [packages/core/src/actions/reputation.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L94) #### Returns @@ -445,7 +507,7 @@ Defined in: [packages/core/src/actions/reputation.ts:70](https://github.com/AASt > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L75) +Defined in: [packages/core/src/actions/reputation.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L101) #### Parameters @@ -464,7 +526,7 @@ Defined in: [packages/core/src/actions/reputation.ts:75](https://github.com/AASt > **setCommunityReputation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L41) +Defined in: [packages/core/src/actions/reputation.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L61) #### Parameters @@ -486,7 +548,7 @@ Defined in: [packages/core/src/actions/reputation.ts:41](https://github.com/AASt > **setEntropyFactor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L66) +Defined in: [packages/core/src/actions/reputation.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L89) #### Parameters @@ -507,7 +569,7 @@ Defined in: [packages/core/src/actions/reputation.ts:66](https://github.com/AASt > **setNFTBoost**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L44) +Defined in: [packages/core/src/actions/reputation.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L64) #### Parameters @@ -524,11 +586,11 @@ Defined in: [packages/core/src/actions/reputation.ts:44](https://github.com/AASt *** -### setRegistry() +### ~~setRegistry()~~ > **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L65) +Defined in: [packages/core/src/actions/reputation.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L88) #### Parameters @@ -542,13 +604,17 @@ Defined in: [packages/core/src/actions/reputation.ts:65](https://github.com/AASt `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — REGISTRY is immutable (no `setRegistry`). Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### setReputationRule() +### ~~setReputationRule()~~ > **setReputationRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L22) +Defined in: [packages/core/src/actions/reputation.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L23) #### Parameters @@ -563,13 +629,17 @@ Defined in: [packages/core/src/actions/reputation.ts:22](https://github.com/AASt `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +The deployed ReputationSystem ABI has no `setReputationRule` — this wrapper now calls the ABI-confirmed `setRule(ruleId, base, bonus, max, desc)` (the [ReputationRule](ReputationRule.md) struct is flattened). Prefer [setRule](#setrule). + *** ### setRule() > **setRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L29) +Defined in: [packages/core/src/actions/reputation.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L35) #### Parameters @@ -593,7 +663,7 @@ Defined in: [packages/core/src/actions/reputation.ts:29](https://github.com/AASt > **syncToRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L54) +Defined in: [packages/core/src/actions/reputation.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L76) #### Parameters @@ -618,7 +688,7 @@ Defined in: [packages/core/src/actions/reputation.ts:54](https://github.com/AASt > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L74) +Defined in: [packages/core/src/actions/reputation.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L100) #### Parameters @@ -638,7 +708,7 @@ Defined in: [packages/core/src/actions/reputation.ts:74](https://github.com/AASt > **updateNFTHoldStart**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/reputation.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L47) +Defined in: [packages/core/src/actions/reputation.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L67) #### Parameters @@ -658,7 +728,7 @@ Defined in: [packages/core/src/actions/reputation.ts:47](https://github.com/AASt > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/reputation.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L78) +Defined in: [packages/core/src/actions/reputation.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L104) #### Returns diff --git a/api/@aastar/core/type-aliases/ReputationBreakdown.md b/api/@aastar/core/type-aliases/ReputationBreakdown.md index 966c4afd6..7e84d85b6 100644 --- a/api/@aastar/core/type-aliases/ReputationBreakdown.md +++ b/api/@aastar/core/type-aliases/ReputationBreakdown.md @@ -1,6 +1,6 @@ > **ReputationBreakdown** = `object` -Defined in: [packages/core/src/actions/reputation.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L13) +Defined in: [packages/core/src/actions/reputation.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L13) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/reputation.ts:13](https://github.com/AASt > **activityBonus**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L16) +Defined in: [packages/core/src/actions/reputation.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L16) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/reputation.ts:16](https://github.com/AASt > **baseScore**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L14) +Defined in: [packages/core/src/actions/reputation.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L14) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/reputation.ts:14](https://github.com/AASt > **multiplier**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L17) +Defined in: [packages/core/src/actions/reputation.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L17) *** @@ -32,4 +32,4 @@ Defined in: [packages/core/src/actions/reputation.ts:17](https://github.com/AASt > **nftBonus**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L15) +Defined in: [packages/core/src/actions/reputation.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L15) diff --git a/api/@aastar/core/type-aliases/ReputationRule.md b/api/@aastar/core/type-aliases/ReputationRule.md index a0f6bf1d3..db9fe44dc 100644 --- a/api/@aastar/core/type-aliases/ReputationRule.md +++ b/api/@aastar/core/type-aliases/ReputationRule.md @@ -1,6 +1,6 @@ > **ReputationRule** = `object` -Defined in: [packages/core/src/actions/reputation.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L6) +Defined in: [packages/core/src/actions/reputation.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L6) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/reputation.ts:6](https://github.com/AASta > **activityBonus**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L8) +Defined in: [packages/core/src/actions/reputation.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L8) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/reputation.ts:8](https://github.com/AASta > **baseScore**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L7) +Defined in: [packages/core/src/actions/reputation.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L7) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/reputation.ts:7](https://github.com/AASta > **description**: `string` -Defined in: [packages/core/src/actions/reputation.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L10) +Defined in: [packages/core/src/actions/reputation.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L10) *** @@ -32,4 +32,4 @@ Defined in: [packages/core/src/actions/reputation.ts:10](https://github.com/AASt > **maxBonus**: `bigint` -Defined in: [packages/core/src/actions/reputation.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/reputation.ts#L9) +Defined in: [packages/core/src/actions/reputation.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L9) diff --git a/api/@aastar/core/type-aliases/ResolvedAPNTsToken.md b/api/@aastar/core/type-aliases/ResolvedAPNTsToken.md new file mode 100644 index 000000000..119d8b1d9 --- /dev/null +++ b/api/@aastar/core/type-aliases/ResolvedAPNTsToken.md @@ -0,0 +1,50 @@ +> **ResolvedAPNTsToken** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L62) + +Runtime-resolved aPNTs token state read live from the SuperPaymaster contract. + +The contract exposes the currently active token via `APNTS_TOKEN()` and an +upcoming (timelocked) token via `pendingAPNTsToken()` / `pendingAPNTsTokenEta()`. +Consumers should prefer `active` and may surface `pending` to warn about an +upcoming migration. + +## Properties + +### active + +> **active**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L64) + +Currently active aPNTs token address, read from `APNTS_TOKEN()`. + +*** + +### fallbackUsed + +> **fallbackUsed**: `boolean` + +Defined in: [packages/core/src/actions/superPaymaster.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L70) + +True only when `active` came from the explicit `fallback` option after a failed chain read. + +*** + +### pending + +> **pending**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L66) + +aPNTs token queued for migration; `zeroAddress` when none is queued. + +*** + +### pendingEta + +> **pendingEta**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L68) + +Unix-second ETA when the pending change becomes executable; `0n` when none is queued. diff --git a/api/@aastar/core/type-aliases/RoleConfigDetailed.md b/api/@aastar/core/type-aliases/RoleConfigDetailed.md index 5a504d970..dd3c88066 100644 --- a/api/@aastar/core/type-aliases/RoleConfigDetailed.md +++ b/api/@aastar/core/type-aliases/RoleConfigDetailed.md @@ -1,6 +1,6 @@ > **RoleConfigDetailed** = `object` -Defined in: [packages/core/src/actions/registry.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L6) +Defined in: [packages/core/src/actions/registry.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L99) ## Properties @@ -8,15 +8,7 @@ Defined in: [packages/core/src/actions/registry.ts:6](https://github.com/AAStarC > **description**: `string` -Defined in: [packages/core/src/actions/registry.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L16) - -*** - -### entryBurn - -> **entryBurn**: `bigint` - -Defined in: [packages/core/src/actions/registry.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L8) +Defined in: [packages/core/src/actions/registry.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L109) *** @@ -24,7 +16,7 @@ Defined in: [packages/core/src/actions/registry.ts:8](https://github.com/AAStarC > **exitFeePercent**: `number` -Defined in: [packages/core/src/actions/registry.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L13) +Defined in: [packages/core/src/actions/registry.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L106) *** @@ -32,7 +24,7 @@ Defined in: [packages/core/src/actions/registry.ts:13](https://github.com/AAStar > **isActive**: `boolean` -Defined in: [packages/core/src/actions/registry.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L14) +Defined in: [packages/core/src/actions/registry.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L107) *** @@ -40,7 +32,7 @@ Defined in: [packages/core/src/actions/registry.ts:14](https://github.com/AAStar > **minExitFee**: `bigint` -Defined in: [packages/core/src/actions/registry.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L15) +Defined in: [packages/core/src/actions/registry.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L108) *** @@ -48,7 +40,7 @@ Defined in: [packages/core/src/actions/registry.ts:15](https://github.com/AAStar > **minStake**: `bigint` -Defined in: [packages/core/src/actions/registry.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L7) +Defined in: [packages/core/src/actions/registry.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L100) *** @@ -56,7 +48,7 @@ Defined in: [packages/core/src/actions/registry.ts:7](https://github.com/AAStarC > **owner**: `Address` -Defined in: [packages/core/src/actions/registry.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L17) +Defined in: [packages/core/src/actions/registry.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L110) *** @@ -64,7 +56,7 @@ Defined in: [packages/core/src/actions/registry.ts:17](https://github.com/AAStar > **roleLockDuration**: `bigint` -Defined in: [packages/core/src/actions/registry.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L18) +Defined in: [packages/core/src/actions/registry.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L111) *** @@ -72,7 +64,7 @@ Defined in: [packages/core/src/actions/registry.ts:18](https://github.com/AAStar > **slashBase**: `number` -Defined in: [packages/core/src/actions/registry.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L10) +Defined in: [packages/core/src/actions/registry.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L103) *** @@ -80,7 +72,7 @@ Defined in: [packages/core/src/actions/registry.ts:10](https://github.com/AAStar > **slashInc**: `number` -Defined in: [packages/core/src/actions/registry.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L11) +Defined in: [packages/core/src/actions/registry.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L104) *** @@ -88,7 +80,7 @@ Defined in: [packages/core/src/actions/registry.ts:11](https://github.com/AAStar > **slashMax**: `number` -Defined in: [packages/core/src/actions/registry.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L12) +Defined in: [packages/core/src/actions/registry.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L105) *** @@ -96,4 +88,12 @@ Defined in: [packages/core/src/actions/registry.ts:12](https://github.com/AAStar > **slashThreshold**: `number` -Defined in: [packages/core/src/actions/registry.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/registry.ts#L9) +Defined in: [packages/core/src/actions/registry.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L102) + +*** + +### ticketPrice + +> **ticketPrice**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L101) diff --git a/api/@aastar/core/type-aliases/SBTActions.md b/api/@aastar/core/type-aliases/SBTActions.md index b7ad8383d..c76685772 100644 --- a/api/@aastar/core/type-aliases/SBTActions.md +++ b/api/@aastar/core/type-aliases/SBTActions.md @@ -1,6 +1,6 @@ > **SBTActions** = `object` -Defined in: [packages/core/src/actions/sbt.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L22) +Defined in: [packages/core/src/actions/sbt.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L30) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/sbt.ts:22](https://github.com/AAStarCommu > **airdropMint**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L24) +Defined in: [packages/core/src/actions/sbt.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L32) #### Parameters @@ -30,7 +30,7 @@ Defined in: [packages/core/src/actions/sbt.ts:24](https://github.com/AAStarCommu > **approve**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L41) +Defined in: [packages/core/src/actions/sbt.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L56) #### Parameters @@ -51,7 +51,7 @@ Defined in: [packages/core/src/actions/sbt.ts:41](https://github.com/AAStarCommu > **balanceOf**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L37) +Defined in: [packages/core/src/actions/sbt.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L52) #### Parameters @@ -66,11 +66,33 @@ Defined in: [packages/core/src/actions/sbt.ts:37](https://github.com/AAStarCommu *** +### batchAirdropMint() + +> **batchAirdropMint**: (`args`) => `Promise`\<[`BatchMintResult`](BatchMintResult.md)[]\> + +Defined in: [packages/core/src/actions/sbt.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L34) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `continueOnError?`: `boolean`; `items`: `object`[]; `onProgress?`: (`done`, `total`, `lastResult`) => `void`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.continueOnError?` | `boolean` | +| `args.items` | `object`[] | +| `args.onProgress?` | (`done`, `total`, `lastResult`) => `void` | + +#### Returns + +`Promise`\<[`BatchMintResult`](BatchMintResult.md)[]\> + +*** + ### burnSBT() > **burnSBT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L56) +Defined in: [packages/core/src/actions/sbt.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L71) #### Parameters @@ -90,7 +112,7 @@ Defined in: [packages/core/src/actions/sbt.ts:56](https://github.com/AAStarCommu > **daoMultisig**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L83) +Defined in: [packages/core/src/actions/sbt.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L99) #### Returns @@ -102,7 +124,7 @@ Defined in: [packages/core/src/actions/sbt.ts:83](https://github.com/AAStarCommu > **deactivateAllMemberships**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L62) +Defined in: [packages/core/src/actions/sbt.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L77) #### Parameters @@ -122,7 +144,7 @@ Defined in: [packages/core/src/actions/sbt.ts:62](https://github.com/AAStarCommu > **deactivateMembership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L61) +Defined in: [packages/core/src/actions/sbt.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L76) #### Parameters @@ -143,7 +165,7 @@ Defined in: [packages/core/src/actions/sbt.ts:61](https://github.com/AAStarCommu > **getActiveMemberships**: (`args`) => `Promise`\<`Address`[]\> -Defined in: [packages/core/src/actions/sbt.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L30) +Defined in: [packages/core/src/actions/sbt.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L45) #### Parameters @@ -162,7 +184,7 @@ Defined in: [packages/core/src/actions/sbt.ts:30](https://github.com/AAStarCommu > **getApproved**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L43) +Defined in: [packages/core/src/actions/sbt.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L58) #### Parameters @@ -181,7 +203,7 @@ Defined in: [packages/core/src/actions/sbt.ts:43](https://github.com/AAStarCommu > **getCommunityMembership**: (`args`) => `Promise`\<[`SBTMembership`](SBTMembership.md)\> -Defined in: [packages/core/src/actions/sbt.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L28) +Defined in: [packages/core/src/actions/sbt.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L43) #### Parameters @@ -201,7 +223,7 @@ Defined in: [packages/core/src/actions/sbt.ts:28](https://github.com/AAStarCommu > **getMemberships**: (`args`) => `Promise`\<[`SBTMembership`](SBTMembership.md)[]\> -Defined in: [packages/core/src/actions/sbt.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L29) +Defined in: [packages/core/src/actions/sbt.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L44) #### Parameters @@ -220,7 +242,7 @@ Defined in: [packages/core/src/actions/sbt.ts:29](https://github.com/AAStarCommu > **getSBTData**: (`args`) => `Promise`\<[`SBTData`](SBTData.md)\> -Defined in: [packages/core/src/actions/sbt.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L27) +Defined in: [packages/core/src/actions/sbt.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L42) #### Parameters @@ -239,7 +261,7 @@ Defined in: [packages/core/src/actions/sbt.ts:27](https://github.com/AAStarCommu > **getUserSBT**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L26) +Defined in: [packages/core/src/actions/sbt.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L41) #### Parameters @@ -258,7 +280,7 @@ Defined in: [packages/core/src/actions/sbt.ts:26](https://github.com/AAStarCommu > **GTOKEN**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L93) +Defined in: [packages/core/src/actions/sbt.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L110) #### Returns @@ -270,7 +292,7 @@ Defined in: [packages/core/src/actions/sbt.ts:93](https://github.com/AAStarCommu > **GTOKEN\_STAKING**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L92) +Defined in: [packages/core/src/actions/sbt.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L109) #### Returns @@ -282,7 +304,7 @@ Defined in: [packages/core/src/actions/sbt.ts:92](https://github.com/AAStarCommu > **isApprovedForAll**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/sbt.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L44) +Defined in: [packages/core/src/actions/sbt.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L59) #### Parameters @@ -302,7 +324,7 @@ Defined in: [packages/core/src/actions/sbt.ts:44](https://github.com/AAStarCommu > **lastActivityTime**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L66) +Defined in: [packages/core/src/actions/sbt.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L81) #### Parameters @@ -322,7 +344,7 @@ Defined in: [packages/core/src/actions/sbt.ts:66](https://github.com/AAStarCommu > **leaveCommunity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L60) +Defined in: [packages/core/src/actions/sbt.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L75) #### Parameters @@ -342,7 +364,7 @@ Defined in: [packages/core/src/actions/sbt.ts:60](https://github.com/AAStarCommu > **membershipIndex**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L34) +Defined in: [packages/core/src/actions/sbt.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L49) #### Parameters @@ -362,7 +384,7 @@ Defined in: [packages/core/src/actions/sbt.ts:34](https://github.com/AAStarCommu > **minLockAmount**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L74) +Defined in: [packages/core/src/actions/sbt.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L90) #### Returns @@ -374,7 +396,7 @@ Defined in: [packages/core/src/actions/sbt.ts:74](https://github.com/AAStarCommu > **mintFee**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L72) +Defined in: [packages/core/src/actions/sbt.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L88) #### Returns @@ -386,7 +408,29 @@ Defined in: [packages/core/src/actions/sbt.ts:72](https://github.com/AAStarCommu > **mintForRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L25) +Defined in: [packages/core/src/actions/sbt.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L33) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleData`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### mintOrAddMembership() + +> **mintOrAddMembership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L40) #### Parameters @@ -408,7 +452,7 @@ Defined in: [packages/core/src/actions/sbt.ts:25](https://github.com/AAStarCommu > **name**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/sbt.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L47) +Defined in: [packages/core/src/actions/sbt.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L62) #### Returns @@ -420,7 +464,7 @@ Defined in: [packages/core/src/actions/sbt.ts:47](https://github.com/AAStarCommu > **nextTokenId**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L52) +Defined in: [packages/core/src/actions/sbt.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L67) #### Returns @@ -428,23 +472,27 @@ Defined in: [packages/core/src/actions/sbt.ts:52](https://github.com/AAStarCommu *** -### owner() +### ~~owner()~~ > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L96) +Defined in: [packages/core/src/actions/sbt.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L114) #### Returns `Promise`\<`Address`\> +#### Deprecated + +MySBT is not Ownable — it is governed by `daoMultisig`. The deployed ABI has no `owner`. Throws ErrorCode.NOT\_IMPLEMENTED; use [daoMultisig](#daomultisig). + *** ### ownerOf() > **ownerOf**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L38) +Defined in: [packages/core/src/actions/sbt.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L53) #### Parameters @@ -463,7 +511,7 @@ Defined in: [packages/core/src/actions/sbt.ts:38](https://github.com/AAStarCommu > **pause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L78) +Defined in: [packages/core/src/actions/sbt.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L94) #### Parameters @@ -482,7 +530,7 @@ Defined in: [packages/core/src/actions/sbt.ts:78](https://github.com/AAStarCommu > **paused**: () => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/sbt.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L80) +Defined in: [packages/core/src/actions/sbt.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L96) #### Returns @@ -494,7 +542,7 @@ Defined in: [packages/core/src/actions/sbt.ts:80](https://github.com/AAStarCommu > **recordActivity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L65) +Defined in: [packages/core/src/actions/sbt.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L80) #### Parameters @@ -514,7 +562,7 @@ Defined in: [packages/core/src/actions/sbt.ts:65](https://github.com/AAStarCommu > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L91) +Defined in: [packages/core/src/actions/sbt.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L108) #### Returns @@ -522,11 +570,11 @@ Defined in: [packages/core/src/actions/sbt.ts:91](https://github.com/AAStarCommu *** -### renounceOwnership() +### ~~renounceOwnership()~~ > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L98) +Defined in: [packages/core/src/actions/sbt.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L118) #### Parameters @@ -539,13 +587,17 @@ Defined in: [packages/core/src/actions/sbt.ts:98](https://github.com/AAStarCommu `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +MySBT is not Ownable — there is no `renounceOwnership`. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### reputationCalculator() > **reputationCalculator**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/sbt.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L68) +Defined in: [packages/core/src/actions/sbt.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L84) #### Returns @@ -557,7 +609,7 @@ Defined in: [packages/core/src/actions/sbt.ts:68](https://github.com/AAStarCommu > **safeTransferFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L39) +Defined in: [packages/core/src/actions/sbt.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L54) #### Parameters @@ -580,7 +632,7 @@ Defined in: [packages/core/src/actions/sbt.ts:39](https://github.com/AAStarCommu > **sbtData**: (`args`) => `Promise`\<[`SBTData`](SBTData.md)\> -Defined in: [packages/core/src/actions/sbt.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L33) +Defined in: [packages/core/src/actions/sbt.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L48) #### Parameters @@ -599,7 +651,7 @@ Defined in: [packages/core/src/actions/sbt.ts:33](https://github.com/AAStarCommu > **setApprovalForAll**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L42) +Defined in: [packages/core/src/actions/sbt.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L57) #### Parameters @@ -620,7 +672,7 @@ Defined in: [packages/core/src/actions/sbt.ts:42](https://github.com/AAStarCommu > **setBaseURI**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L57) +Defined in: [packages/core/src/actions/sbt.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L72) #### Parameters @@ -640,7 +692,7 @@ Defined in: [packages/core/src/actions/sbt.ts:57](https://github.com/AAStarCommu > **setDAOMultisig**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L84) +Defined in: [packages/core/src/actions/sbt.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L100) #### Parameters @@ -660,7 +712,7 @@ Defined in: [packages/core/src/actions/sbt.ts:84](https://github.com/AAStarCommu > **setMinLockAmount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L75) +Defined in: [packages/core/src/actions/sbt.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L91) #### Parameters @@ -680,7 +732,7 @@ Defined in: [packages/core/src/actions/sbt.ts:75](https://github.com/AAStarCommu > **setMintFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L73) +Defined in: [packages/core/src/actions/sbt.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L89) #### Parameters @@ -696,11 +748,11 @@ Defined in: [packages/core/src/actions/sbt.ts:73](https://github.com/AAStarCommu *** -### setRegistry() +### ~~setRegistry()~~ > **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L85) +Defined in: [packages/core/src/actions/sbt.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L102) #### Parameters @@ -714,13 +766,17 @@ Defined in: [packages/core/src/actions/sbt.ts:85](https://github.com/AAStarCommu `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — MySBT has no `setRegistry` (REGISTRY is immutable). Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### setReputationCalculator() > **setReputationCalculator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L69) +Defined in: [packages/core/src/actions/sbt.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L85) #### Parameters @@ -740,7 +796,7 @@ Defined in: [packages/core/src/actions/sbt.ts:69](https://github.com/AAStarCommu > **supportsInterface**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/sbt.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L53) +Defined in: [packages/core/src/actions/sbt.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L68) #### Parameters @@ -759,7 +815,7 @@ Defined in: [packages/core/src/actions/sbt.ts:53](https://github.com/AAStarCommu > **symbol**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/sbt.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L48) +Defined in: [packages/core/src/actions/sbt.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L63) #### Returns @@ -771,7 +827,7 @@ Defined in: [packages/core/src/actions/sbt.ts:48](https://github.com/AAStarCommu > **tokenURI**: (`args`) => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/sbt.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L49) +Defined in: [packages/core/src/actions/sbt.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L64) #### Parameters @@ -790,7 +846,7 @@ Defined in: [packages/core/src/actions/sbt.ts:49](https://github.com/AAStarCommu > **transferFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L40) +Defined in: [packages/core/src/actions/sbt.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L55) #### Parameters @@ -808,11 +864,11 @@ Defined in: [packages/core/src/actions/sbt.ts:40](https://github.com/AAStarCommu *** -### transferOwnership() +### ~~transferOwnership()~~ > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L97) +Defined in: [packages/core/src/actions/sbt.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L116) #### Parameters @@ -826,13 +882,17 @@ Defined in: [packages/core/src/actions/sbt.ts:97](https://github.com/AAStarCommu `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +MySBT is not Ownable — there is no `transferOwnership`. Throws ErrorCode.NOT\_IMPLEMENTED; use [setDAOMultisig](#setdaomultisig). + *** ### unpause() > **unpause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/sbt.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L79) +Defined in: [packages/core/src/actions/sbt.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L95) #### Parameters @@ -851,7 +911,7 @@ Defined in: [packages/core/src/actions/sbt.ts:79](https://github.com/AAStarCommu > **userToSBT**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/sbt.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L32) +Defined in: [packages/core/src/actions/sbt.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L47) #### Parameters @@ -870,7 +930,7 @@ Defined in: [packages/core/src/actions/sbt.ts:32](https://github.com/AAStarCommu > **verifyCommunityMembership**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/sbt.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L31) +Defined in: [packages/core/src/actions/sbt.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L46) #### Parameters @@ -890,7 +950,7 @@ Defined in: [packages/core/src/actions/sbt.ts:31](https://github.com/AAStarCommu > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/sbt.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L88) +Defined in: [packages/core/src/actions/sbt.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L105) #### Returns @@ -898,11 +958,11 @@ Defined in: [packages/core/src/actions/sbt.ts:88](https://github.com/AAStarCommu *** -### weeklyActivity() +### ~~weeklyActivity()~~ > **weeklyActivity**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/sbt.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L67) +Defined in: [packages/core/src/actions/sbt.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L83) #### Parameters @@ -916,3 +976,7 @@ Defined in: [packages/core/src/actions/sbt.ts:67](https://github.com/AAStarCommu #### Returns `Promise`\<`boolean`\> + +#### Deprecated + +Removed in the v5.x contract refactor — MySBT no longer tracks per-week activity (no `weeklyActivity` getter). Throws ErrorCode.NOT\_IMPLEMENTED; use [lastActivityTime](#lastactivitytime) and compare against your week window. diff --git a/api/@aastar/core/type-aliases/SBTData.md b/api/@aastar/core/type-aliases/SBTData.md index c351acd14..d46f68d51 100644 --- a/api/@aastar/core/type-aliases/SBTData.md +++ b/api/@aastar/core/type-aliases/SBTData.md @@ -1,6 +1,6 @@ > **SBTData** = `object` -Defined in: [packages/core/src/actions/sbt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L14) +Defined in: [packages/core/src/actions/sbt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L14) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/sbt.ts:14](https://github.com/AAStarCommu > **firstCommunity**: `Address` -Defined in: [packages/core/src/actions/sbt.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L16) +Defined in: [packages/core/src/actions/sbt.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L16) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/sbt.ts:16](https://github.com/AAStarCommu > **holder**: `Address` -Defined in: [packages/core/src/actions/sbt.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L15) +Defined in: [packages/core/src/actions/sbt.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L15) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/sbt.ts:15](https://github.com/AAStarCommu > **mintedAt**: `bigint` -Defined in: [packages/core/src/actions/sbt.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L17) +Defined in: [packages/core/src/actions/sbt.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L17) *** @@ -32,4 +32,4 @@ Defined in: [packages/core/src/actions/sbt.ts:17](https://github.com/AAStarCommu > **totalCommunities**: `bigint` -Defined in: [packages/core/src/actions/sbt.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L18) +Defined in: [packages/core/src/actions/sbt.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L18) diff --git a/api/@aastar/core/type-aliases/SBTMembership.md b/api/@aastar/core/type-aliases/SBTMembership.md index dde1f87de..9b1dc1e15 100644 --- a/api/@aastar/core/type-aliases/SBTMembership.md +++ b/api/@aastar/core/type-aliases/SBTMembership.md @@ -1,6 +1,6 @@ > **SBTMembership** = `object` -Defined in: [packages/core/src/actions/sbt.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L6) +Defined in: [packages/core/src/actions/sbt.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L6) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/sbt.ts:6](https://github.com/AAStarCommun > **community**: `Address` -Defined in: [packages/core/src/actions/sbt.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L7) +Defined in: [packages/core/src/actions/sbt.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L7) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/sbt.ts:7](https://github.com/AAStarCommun > **isActive**: `boolean` -Defined in: [packages/core/src/actions/sbt.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L10) +Defined in: [packages/core/src/actions/sbt.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L10) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/sbt.ts:10](https://github.com/AAStarCommu > **joinedAt**: `bigint` -Defined in: [packages/core/src/actions/sbt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L8) +Defined in: [packages/core/src/actions/sbt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L8) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/actions/sbt.ts:8](https://github.com/AAStarCommun > **lastActiveTime**: `bigint` -Defined in: [packages/core/src/actions/sbt.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L9) +Defined in: [packages/core/src/actions/sbt.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L9) *** @@ -40,4 +40,4 @@ Defined in: [packages/core/src/actions/sbt.ts:9](https://github.com/AAStarCommun > **metadata**: `string` -Defined in: [packages/core/src/actions/sbt.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/sbt.ts#L11) +Defined in: [packages/core/src/actions/sbt.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L11) diff --git a/api/@aastar/core/type-aliases/SessionKeyValidatorActions.md b/api/@aastar/core/type-aliases/SessionKeyValidatorActions.md new file mode 100644 index 000000000..58ec9666f --- /dev/null +++ b/api/@aastar/core/type-aliases/SessionKeyValidatorActions.md @@ -0,0 +1,127 @@ +> **SessionKeyValidatorActions** = `object` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L13) + +## Properties + +### checkSessionScope() + +> **checkSessionScope**: (`args`) => `Promise`\<`void`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `dest`: `Address`; `selector`: [`Hex`](https://viem.sh/docs/index.html); `sessionKeyOrHash`: [`Hex`](https://viem.sh/docs/index.html); `sessionType`: `number`; \} | +| `args.account` | `Address` | +| `args.dest` | `Address` | +| `args.selector` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sessionKeyOrHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sessionType` | `number` | + +#### Returns + +`Promise`\<`void`\> + +*** + +### grantNonces() + +> **grantNonces**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `key`: `Address`; \} | +| `args.account` | `Address` | +| `args.key` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### grantNonces\_p256() + +> **grantNonces\_p256**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `keyHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account` | `Address` | +| `args.keyHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### recordCallForVelocity() + +> **recordCallForVelocity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `sessionKeyOrHash`: [`Hex`](https://viem.sh/docs/index.html); `sessionType`: `number`; `signer?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account` | `Address` | +| `args.sessionKeyOrHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sessionType` | `number` | +| `args.signer?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### sessionKeyCount() + +> **sessionKeyCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### sessionStates\_p256() + +> **sessionStates\_p256**: (`args`) => `Promise`\<[`P256SessionState`](P256SessionState.md)\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `keyHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account` | `Address` | +| `args.keyHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`P256SessionState`](P256SessionState.md)\> diff --git a/api/@aastar/core/type-aliases/SlashRecord.md b/api/@aastar/core/type-aliases/SlashRecord.md index 5d1127ddb..b2f033b8f 100644 --- a/api/@aastar/core/type-aliases/SlashRecord.md +++ b/api/@aastar/core/type-aliases/SlashRecord.md @@ -1,6 +1,6 @@ > **SlashRecord** = `object` -Defined in: [packages/core/src/actions/superPaymaster.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L6) +Defined in: [packages/core/src/actions/superPaymaster.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L33) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:6](https://github.com/A > **amount**: `bigint` -Defined in: [packages/core/src/actions/superPaymaster.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L8) +Defined in: [packages/core/src/actions/superPaymaster.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L35) *** @@ -16,7 +16,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:8](https://github.com/A > **level**: `number` -Defined in: [packages/core/src/actions/superPaymaster.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L11) +Defined in: [packages/core/src/actions/superPaymaster.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L38) *** @@ -24,7 +24,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:11](https://github.com/ > **reason**: `string` -Defined in: [packages/core/src/actions/superPaymaster.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L10) +Defined in: [packages/core/src/actions/superPaymaster.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L37) *** @@ -32,7 +32,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:10](https://github.com/ > **reputationLoss**: `bigint` -Defined in: [packages/core/src/actions/superPaymaster.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L9) +Defined in: [packages/core/src/actions/superPaymaster.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L36) *** @@ -40,4 +40,4 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:9](https://github.com/A > **timestamp**: `bigint` -Defined in: [packages/core/src/actions/superPaymaster.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L7) +Defined in: [packages/core/src/actions/superPaymaster.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L34) diff --git a/api/@aastar/core/type-aliases/SpendCounter.md b/api/@aastar/core/type-aliases/SpendCounter.md new file mode 100644 index 000000000..4c50cbd5b --- /dev/null +++ b/api/@aastar/core/type-aliases/SpendCounter.md @@ -0,0 +1,25 @@ +> **SpendCounter** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L68) + +Sender-keyed cumulative spend counter for one asset/target window. + +## Properties + +### spentInWindow + +> **spentInWindow**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L70) + +cumulative native-unit spend in the current window. + +*** + +### windowStart + +> **windowStart**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L72) + +unix timestamp the current window began. diff --git a/api/@aastar/core/type-aliases/StakingActions.md b/api/@aastar/core/type-aliases/StakingActions.md index 1c5404911..232ba030f 100644 --- a/api/@aastar/core/type-aliases/StakingActions.md +++ b/api/@aastar/core/type-aliases/StakingActions.md @@ -1,6 +1,6 @@ > **StakingActions** = `object` -Defined in: [packages/core/src/actions/staking.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L6) +Defined in: [packages/core/src/actions/staking.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L6) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/staking.ts:6](https://github.com/AAStarCo > **authorizedSlashers**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/staking.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L59) +Defined in: [packages/core/src/actions/staking.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L69) #### Parameters @@ -27,7 +27,7 @@ Defined in: [packages/core/src/actions/staking.ts:59](https://github.com/AAStarC > **availableBalance**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/staking.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L35) +Defined in: [packages/core/src/actions/staking.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L44) #### Parameters @@ -46,7 +46,7 @@ Defined in: [packages/core/src/actions/staking.ts:35](https://github.com/AAStarC > **getLockedStake**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/staking.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L26) +Defined in: [packages/core/src/actions/staking.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L35) #### Parameters @@ -66,7 +66,7 @@ Defined in: [packages/core/src/actions/staking.ts:26](https://github.com/AAStarC > **getStakeInfo**: (`args`) => `Promise`\<\{ `amount`: `bigint`; `slashedAmount`: `bigint`; `stakedAt`: `bigint`; `unstakeRequestedAt`: `bigint`; \}\> -Defined in: [packages/core/src/actions/staking.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L19) +Defined in: [packages/core/src/actions/staking.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L28) #### Parameters @@ -86,7 +86,7 @@ Defined in: [packages/core/src/actions/staking.ts:19](https://github.com/AAStarC > **getStakingBalance**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/staking.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L25) +Defined in: [packages/core/src/actions/staking.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L34) #### Parameters @@ -105,7 +105,7 @@ Defined in: [packages/core/src/actions/staking.ts:25](https://github.com/AAStarC > **getTotalStaked**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/staking.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L61) +Defined in: [packages/core/src/actions/staking.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L71) #### Returns @@ -117,7 +117,7 @@ Defined in: [packages/core/src/actions/staking.ts:61](https://github.com/AAStarC > **getUserRoleLocks**: (`args`) => `Promise`\<`object`[]\> -Defined in: [packages/core/src/actions/staking.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L27) +Defined in: [packages/core/src/actions/staking.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L36) #### Parameters @@ -136,7 +136,7 @@ Defined in: [packages/core/src/actions/staking.ts:27](https://github.com/AAStarC > **GTOKEN**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/staking.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L74) +Defined in: [packages/core/src/actions/staking.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L84) #### Returns @@ -148,7 +148,7 @@ Defined in: [packages/core/src/actions/staking.ts:74](https://github.com/AAStarC > **hasRoleLock**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/staking.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L34) +Defined in: [packages/core/src/actions/staking.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L43) #### Parameters @@ -164,22 +164,56 @@ Defined in: [packages/core/src/actions/staking.ts:34](https://github.com/AAStarC *** -### lockStake() +### ~~lockStake()~~ > **lockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L8) +Defined in: [packages/core/src/actions/staking.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L9) #### Parameters | Parameter | Type | | ------ | ------ | -| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `entryBurn`: `bigint`; `payer`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; `user`: `Address`; \} | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `payer`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; `ticketPrice`: `bigint`; `user`: `Address`; \} | | `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | -| `args.entryBurn` | `bigint` | | `args.payer` | `Address` | | `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | | `args.stakeAmount` | `bigint` | +| `args.ticketPrice` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +`lockStake` is absent from the deployed ABI (reverts on-chain); use [lockStakeWithTicket](#lockstakewithticket). + +*** + +### lockStakeWithTicket() + +> **lockStakeWithTicket**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L17) + +Lock stake for a role and consume a ticket in one call. ABI: +lockStakeWithTicket(address user, bytes32 roleId, uint256 stakeAmount, uint256 ticketPrice, address payer) -> uint256 lockId. +NOTE: the deployed GTokenStaking ABI exposes ONLY this function; the bare `lockStake` getter no longer exists on-chain. +This is a state-changing tx, so it resolves to the transaction `Hash` — the on-chain +`uint256 lockId` return is NOT recoverable from a write; `simulateContract` the same call if you need it. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `payer`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; `ticketPrice`: `bigint`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.payer` | `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | +| `args.ticketPrice` | `bigint` | | `args.user` | `Address` | #### Returns @@ -188,11 +222,25 @@ Defined in: [packages/core/src/actions/staking.ts:8](https://github.com/AAStarCo *** +### MAX\_TOTAL\_STAKE() + +> **MAX\_TOTAL\_STAKE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L86) + +Protocol-wide cap on total locked stake (view). ABI: MAX_TOTAL_STAKE() -> uint256. + +#### Returns + +`Promise`\<`bigint`\> + +*** + ### owner() > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/staking.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L63) +Defined in: [packages/core/src/actions/staking.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L73) #### Returns @@ -204,7 +252,7 @@ Defined in: [packages/core/src/actions/staking.ts:63](https://github.com/AAStarC > **previewExitFee**: (`args`) => `Promise`\<\{ `fee`: `bigint`; `netAmount`: `bigint`; \}\> -Defined in: [packages/core/src/actions/staking.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L36) +Defined in: [packages/core/src/actions/staking.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L45) #### Parameters @@ -224,7 +272,7 @@ Defined in: [packages/core/src/actions/staking.ts:36](https://github.com/AAStarC > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/staking.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L73) +Defined in: [packages/core/src/actions/staking.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L83) #### Returns @@ -236,7 +284,7 @@ Defined in: [packages/core/src/actions/staking.ts:73](https://github.com/AAStarC > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L67) +Defined in: [packages/core/src/actions/staking.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L77) #### Parameters @@ -255,7 +303,7 @@ Defined in: [packages/core/src/actions/staking.ts:67](https://github.com/AAStarC > **roleExitConfigs**: (`args`) => `Promise`\<\{ `feePercent`: `bigint`; `minFee`: `bigint`; \}\> -Defined in: [packages/core/src/actions/staking.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L57) +Defined in: [packages/core/src/actions/staking.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L67) #### Parameters @@ -274,7 +322,7 @@ Defined in: [packages/core/src/actions/staking.ts:57](https://github.com/AAStarC > **roleLocks**: (`args`) => `Promise`\<\{ `amount`: `bigint`; `entryBurn`: `bigint`; `lockedAt`: `number`; `metadata`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \}\> -Defined in: [packages/core/src/actions/staking.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L50) +Defined in: [packages/core/src/actions/staking.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L60) #### Parameters @@ -294,7 +342,7 @@ Defined in: [packages/core/src/actions/staking.ts:50](https://github.com/AAStarC > **setAuthorizedSlasher**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L16) +Defined in: [packages/core/src/actions/staking.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L25) #### Parameters @@ -311,11 +359,11 @@ Defined in: [packages/core/src/actions/staking.ts:16](https://github.com/AAStarC *** -### setRegistry() +### ~~setRegistry()~~ > **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L39) +Defined in: [packages/core/src/actions/staking.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L49) #### Parameters @@ -329,13 +377,17 @@ Defined in: [packages/core/src/actions/staking.ts:39](https://github.com/AAStarC `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — `setRegistry` is absent from the deployed GTokenStaking ABI (REGISTRY is immutable, set at construction). Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### setRoleExitFee() > **setRoleExitFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L40) +Defined in: [packages/core/src/actions/staking.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L50) #### Parameters @@ -357,7 +409,7 @@ Defined in: [packages/core/src/actions/staking.ts:40](https://github.com/AAStarC > **setTreasury**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L41) +Defined in: [packages/core/src/actions/staking.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L51) #### Parameters @@ -377,7 +429,7 @@ Defined in: [packages/core/src/actions/staking.ts:41](https://github.com/AAStarC > **slash**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L14) +Defined in: [packages/core/src/actions/staking.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L23) #### Parameters @@ -399,7 +451,7 @@ Defined in: [packages/core/src/actions/staking.ts:14](https://github.com/AAStarC > **slashByDVT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L15) +Defined in: [packages/core/src/actions/staking.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L24) #### Parameters @@ -422,7 +474,7 @@ Defined in: [packages/core/src/actions/staking.ts:15](https://github.com/AAStarC > **stakes**: (`args`) => `Promise`\<\{ `amount`: `bigint`; `slashedAmount`: `bigint`; `stakedAt`: `bigint`; `unstakeRequestedAt`: `bigint`; \}\> -Defined in: [packages/core/src/actions/staking.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L44) +Defined in: [packages/core/src/actions/staking.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L54) #### Parameters @@ -441,7 +493,7 @@ Defined in: [packages/core/src/actions/staking.ts:44](https://github.com/AAStarC > **topUpStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L9) +Defined in: [packages/core/src/actions/staking.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L18) #### Parameters @@ -464,7 +516,7 @@ Defined in: [packages/core/src/actions/staking.ts:9](https://github.com/AAStarCo > **totalStaked**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/staking.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L60) +Defined in: [packages/core/src/actions/staking.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L70) #### Returns @@ -476,7 +528,7 @@ Defined in: [packages/core/src/actions/staking.ts:60](https://github.com/AAStarC > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L66) +Defined in: [packages/core/src/actions/staking.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L76) #### Parameters @@ -496,7 +548,7 @@ Defined in: [packages/core/src/actions/staking.ts:66](https://github.com/AAStarC > **treasury**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/staking.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L62) +Defined in: [packages/core/src/actions/staking.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L72) #### Returns @@ -508,7 +560,7 @@ Defined in: [packages/core/src/actions/staking.ts:62](https://github.com/AAStarC > **unlockAndTransfer**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L11) +Defined in: [packages/core/src/actions/staking.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L20) #### Parameters @@ -529,7 +581,7 @@ Defined in: [packages/core/src/actions/staking.ts:11](https://github.com/AAStarC > **unlockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L10) +Defined in: [packages/core/src/actions/staking.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L19) #### Parameters @@ -550,7 +602,7 @@ Defined in: [packages/core/src/actions/staking.ts:10](https://github.com/AAStarC > **userActiveRoles**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/staking.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L58) +Defined in: [packages/core/src/actions/staking.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L68) #### Parameters @@ -570,7 +622,7 @@ Defined in: [packages/core/src/actions/staking.ts:58](https://github.com/AAStarC > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/staking.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/staking.ts#L70) +Defined in: [packages/core/src/actions/staking.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L80) #### Returns diff --git a/api/@aastar/core/type-aliases/SuperPaymasterActions.md b/api/@aastar/core/type-aliases/SuperPaymasterActions.md index eaded052a..d9bb92df0 100644 --- a/api/@aastar/core/type-aliases/SuperPaymasterActions.md +++ b/api/@aastar/core/type-aliases/SuperPaymasterActions.md @@ -1,6 +1,6 @@ > **SuperPaymasterActions** = `object` -Defined in: [packages/core/src/actions/superPaymaster.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L27) +Defined in: [packages/core/src/actions/superPaymaster.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L73) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:27](https://github.com/ > **addStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L36) +Defined in: [packages/core/src/actions/superPaymaster.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L82) #### Parameters @@ -29,7 +29,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:36](https://github.com/ > **APNTS\_TOKEN**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L89) +Defined in: [packages/core/src/actions/superPaymaster.ts:190](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L190) #### Returns @@ -37,11 +37,25 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:89](https://github.com/ *** +### APNTS\_TOKEN\_TIMELOCK() + +> **APNTS\_TOKEN\_TIMELOCK**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L214) + +Duration (seconds) of the aPNTs-token-change timelock. + +#### Returns + +`Promise`\<`bigint`\> + +*** + ### aPNTsPriceUSD() > **aPNTsPriceUSD**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L81) +Defined in: [packages/core/src/actions/superPaymaster.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L172) #### Returns @@ -49,11 +63,30 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:81](https://github.com/ *** +### applyBLSAggregator() + +> **applyBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L148) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### BLS\_AGGREGATOR() > **BLS\_AGGREGATOR**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L91) +Defined in: [packages/core/src/actions/superPaymaster.ts:192](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L192) #### Returns @@ -61,23 +94,27 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:91](https://github.com/ *** -### BPS\_DENOMINATOR() +### ~~BPS\_DENOMINATOR()~~ > **BPS\_DENOMINATOR**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L103) +Defined in: [packages/core/src/actions/superPaymaster.ts:212](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L212) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### cachedPrice() > **cachedPrice**: () => `Promise`\<\{ `decimals`: `number`; `price`: `bigint`; `roundId`: `bigint`; `updatedAt`: `bigint`; \}\> -Defined in: [packages/core/src/actions/superPaymaster.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L80) +Defined in: [packages/core/src/actions/superPaymaster.ts:171](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L171) #### Returns @@ -85,19 +122,79 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:80](https://github.com/ *** +### cancelAPNTsTokenChange() + +> **cancelAPNTsTokenChange**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L122) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### cancelEmergencyPrice() + +> **cancelEmergencyPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:140](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L140) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### clearPendingDebt() + +> **clearPendingDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L104) + +Operator force-clears the user's pending-debt entry without recording it. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### configureOperator() > **configureOperator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L41) +Defined in: [packages/core/src/actions/superPaymaster.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L87) #### Parameters | Parameter | Type | | ------ | ------ | -| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `exchangeRate`: `bigint`; `opTreasury`: `Address`; `xPNTsToken`: `Address`; \} | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `opTreasury`: `Address`; `xPNTsToken`: `Address`; \} | | `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | -| `args.exchangeRate` | `bigint` | | `args.opTreasury` | `Address` | | `args.xPNTsToken` | `Address` | @@ -111,7 +208,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:41](https://github.com/ > **deposit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L29) +Defined in: [packages/core/src/actions/superPaymaster.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L75) #### Parameters @@ -131,7 +228,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:29](https://github.com/ > **depositETH**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L30) +Defined in: [packages/core/src/actions/superPaymaster.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L76) #### Parameters @@ -151,7 +248,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:30](https://github.com/ > **depositFor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L31) +Defined in: [packages/core/src/actions/superPaymaster.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L77) #### Parameters @@ -168,11 +265,103 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:31](https://github.com/ *** +### dryRunValidation() + +> **dryRunValidation**: (`args`) => `Promise`\<[`DryRunValidationResult`](DryRunValidationResult.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:160](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L160) + +Off-chain pre-flight validation of a UserOp against this paymaster. +Returns `{ ok, reasonCode }` so callers can detect AA34-style rejections +before submitting the UserOp on-chain. View call; never mutates state. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `maxCost`: `bigint`; `userOp`: [`PackedUserOperation`](PackedUserOperation.md); \} | +| `args.maxCost` | `bigint` | +| `args.userOp` | [`PackedUserOperation`](PackedUserOperation.md) | + +#### Returns + +`Promise`\<[`DryRunValidationResult`](DryRunValidationResult.md)\> + +*** + +### EMERGENCY\_TIMELOCK() + +> **EMERGENCY\_TIMELOCK**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:144](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L144) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencyActivatedAt() + +> **emergencyActivatedAt**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L142) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencyPendingPrice() + +> **emergencyPendingPrice**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:141](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L141) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencyQueuedAt() + +> **emergencyQueuedAt**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L143) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencySetPrice() + +> **emergencySetPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L138) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newPrice`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newPrice` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### entryPoint() > **entryPoint**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L95) +Defined in: [packages/core/src/actions/superPaymaster.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L196) #### Returns @@ -184,7 +373,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:95](https://github.com/ > **ETH\_USD\_PRICE\_FEED**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L92) +Defined in: [packages/core/src/actions/superPaymaster.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L193) #### Returns @@ -192,11 +381,49 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:92](https://github.com/ *** +### executeAPNTsTokenChange() + +> **executeAPNTsTokenChange**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L121) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeEmergencyPrice() + +> **executeEmergencyPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L139) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### executeSlashWithBLS() > **executeSlashWithBLS**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L45) +Defined in: [packages/core/src/actions/superPaymaster.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L91) #### Parameters @@ -218,7 +445,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:45](https://github.com/ > **getAvailableCredit**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L73) +Defined in: [packages/core/src/actions/superPaymaster.ts:164](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L164) #### Parameters @@ -238,7 +465,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:73](https://github.com/ > **getDeposit**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L74) +Defined in: [packages/core/src/actions/superPaymaster.ts:165](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L165) #### Returns @@ -250,7 +477,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:74](https://github.com/ > **getLatestSlash**: (`args`) => `Promise`\<[`SlashRecord`](SlashRecord.md)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L75) +Defined in: [packages/core/src/actions/superPaymaster.ts:166](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L166) #### Parameters @@ -269,7 +496,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:75](https://github.com/ > **getSlashCount**: (`args`) => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L76) +Defined in: [packages/core/src/actions/superPaymaster.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L167) #### Parameters @@ -288,7 +515,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:76](https://github.com/ > **getSlashHistory**: (`args`) => `Promise`\<[`SlashRecord`](SlashRecord.md)[]\> -Defined in: [packages/core/src/actions/superPaymaster.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L77) +Defined in: [packages/core/src/actions/superPaymaster.ts:168](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L168) #### Parameters @@ -303,47 +530,73 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:77](https://github.com/ *** -### MAX\_ETH\_USD\_PRICE() +### isChainlinkStale() + +> **isChainlinkStale**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L179) + +True when the Chainlink ETH/USD feed is considered stale by the contract. + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ~~MAX\_ETH\_USD\_PRICE()~~ > **MAX\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L97) +Defined in: [packages/core/src/actions/superPaymaster.ts:200](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L200) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed from SuperPaymaster in the v5.x refactor (this bound belongs to the standalone Paymaster contract). Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### MAX\_PROTOCOL\_FEE() +### ~~MAX\_PROTOCOL\_FEE()~~ > **MAX\_PROTOCOL\_FEE**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L96) +Defined in: [packages/core/src/actions/superPaymaster.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L198) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### MIN\_ETH\_USD\_PRICE() +### ~~MIN\_ETH\_USD\_PRICE()~~ > **MIN\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L98) +Defined in: [packages/core/src/actions/superPaymaster.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L202) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed from SuperPaymaster in the v5.x refactor (this bound belongs to the standalone Paymaster contract). Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### onTransferReceived() > **onTransferReceived**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L66) +Defined in: [packages/core/src/actions/superPaymaster.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L151) #### Parameters @@ -365,7 +618,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:66](https://github.com/ > **operators**: (`args`) => `Promise`\<[`OperatorConfig`](OperatorConfig.md)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L72) +Defined in: [packages/core/src/actions/superPaymaster.ts:163](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L163) #### Parameters @@ -384,7 +637,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:72](https://github.com/ > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L106) +Defined in: [packages/core/src/actions/superPaymaster.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L217) #### Returns @@ -392,35 +645,145 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:106](https://github.com *** -### PAYMASTER\_DATA\_OFFSET() +### ~~PAYMASTER\_DATA\_OFFSET()~~ > **PAYMASTER\_DATA\_OFFSET**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L99) +Defined in: [packages/core/src/actions/superPaymaster.ts:204](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L204) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### PRICE\_CACHE\_DURATION() +### pendingAPNTsToken() + +> **pendingAPNTsToken**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L123) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pendingAPNTsTokenEta() + +> **pendingAPNTsTokenEta**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L124) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### pendingBLSAgg() + +> **pendingBLSAgg**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L185) + +Address of the BLS aggregator pending the timelock (`zeroAddress` if none queued). + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pendingBLSAggEta() + +> **pendingBLSAggEta**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L187) + +Unix-second ETA at which the pending BLS aggregator change becomes executable (uint48). + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### pendingDebts() + +> **pendingDebts**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L100) + +Read the unrecovered debt recorded for a user after a failed burn/recordDebt. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; `user`: `Address`; \} | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### ~~PRICE\_CACHE\_DURATION()~~ > **PRICE\_CACHE\_DURATION**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L100) +Defined in: [packages/core/src/actions/superPaymaster.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L206) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### priceMode() + +> **priceMode**: () => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L181) + +Current pricing mode (uint8 enum on the contract). + +#### Returns + +`Promise`\<`number`\> + *** ### priceStalenessThreshold() > **priceStalenessThreshold**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L85) +Defined in: [packages/core/src/actions/superPaymaster.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L176) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### priceValidUntil() + +> **priceValidUntil**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L183) + +Unix-second timestamp until which the cached price remains valid (uint48). #### Returns @@ -432,7 +795,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:85](https://github.com/ > **protocolFeeBPS**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L82) +Defined in: [packages/core/src/actions/superPaymaster.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L173) #### Returns @@ -444,7 +807,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:82](https://github.com/ > **protocolRevenue**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L83) +Defined in: [packages/core/src/actions/superPaymaster.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L174) #### Returns @@ -452,23 +815,47 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:83](https://github.com/ *** -### RATE\_OFFSET() +### queueBLSAggregator() + +> **queueBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L147) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `aggregator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.aggregator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~RATE\_OFFSET()~~ > **RATE\_OFFSET**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L101) +Defined in: [packages/core/src/actions/superPaymaster.ts:208](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L208) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### REGISTRY() > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L90) +Defined in: [packages/core/src/actions/superPaymaster.ts:191](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L191) #### Returns @@ -480,7 +867,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:90](https://github.com/ > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L108) +Defined in: [packages/core/src/actions/superPaymaster.ts:219](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L219) #### Parameters @@ -495,11 +882,63 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:108](https://github.com *** +### resolveAPNTsToken() + +> **resolveAPNTsToken**: (`args?`) => `Promise`\<[`ResolvedAPNTsToken`](ResolvedAPNTsToken.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L135) + +Resolve the live aPNTs token address from chain instead of relying on a static constant. + +Reads `APNTS_TOKEN()` (active), `pendingAPNTsToken()` and `pendingAPNTsTokenEta()` +in parallel and returns them as a structured result. Prefer `active` for runtime use. + +If `fallback` is supplied and the chain reads fail, the static `fallback` address is +returned with `fallbackUsed: true` (pending fields zeroed). Without a `fallback` the +underlying error is re-thrown rather than silently masked. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `fallback?`: `Address`; \} | +| `args.fallback?` | `Address` | + +#### Returns + +`Promise`\<[`ResolvedAPNTsToken`](ResolvedAPNTsToken.md)\> + +*** + +### retryPendingDebt() + +> **retryPendingDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L102) + +Operator retries recovering up to `amount` of the user's pending debt. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + ### sbtHolders() > **sbtHolders**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L86) +Defined in: [packages/core/src/actions/superPaymaster.ts:177](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L177) #### Parameters @@ -518,7 +957,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:86](https://github.com/ > **setAPNTSPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L53) +Defined in: [packages/core/src/actions/superPaymaster.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L107) #### Parameters @@ -538,7 +977,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:53](https://github.com/ > **setAPNTsToken**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L61) +Defined in: [packages/core/src/actions/superPaymaster.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L115) #### Parameters @@ -554,11 +993,11 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:61](https://github.com/ *** -### setBLSAggregator() +### ~~setBLSAggregator()~~ > **setBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L62) +Defined in: [packages/core/src/actions/superPaymaster.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L117) #### Parameters @@ -572,13 +1011,17 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:62](https://github.com/ `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +The deployed SuperPaymaster ABI has no direct `setBLSAggregator` — the aggregator change is timelocked via [queueBLSAggregator](#queueblsaggregator) + [applyBLSAggregator](#applyblsaggregator). Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### setOperatorLimits() > **setOperatorLimits**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L43) +Defined in: [packages/core/src/actions/superPaymaster.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L89) #### Parameters @@ -598,7 +1041,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:43](https://github.com/ > **setOperatorPaused**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L42) +Defined in: [packages/core/src/actions/superPaymaster.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L88) #### Parameters @@ -619,7 +1062,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:42](https://github.com/ > **setProtocolFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L58) +Defined in: [packages/core/src/actions/superPaymaster.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L112) #### Parameters @@ -639,7 +1082,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:58](https://github.com/ > **setTreasury**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L59) +Defined in: [packages/core/src/actions/superPaymaster.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L113) #### Parameters @@ -659,7 +1102,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:59](https://github.com/ > **setXPNTsFactory**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L60) +Defined in: [packages/core/src/actions/superPaymaster.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L114) #### Parameters @@ -679,7 +1122,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:60](https://github.com/ > **slashHistory**: (`args`) => `Promise`\<[`SlashRecord`](SlashRecord.md)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L78) +Defined in: [packages/core/src/actions/superPaymaster.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L169) #### Parameters @@ -699,7 +1142,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:78](https://github.com/ > **slashOperator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L46) +Defined in: [packages/core/src/actions/superPaymaster.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L92) #### Parameters @@ -722,7 +1165,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:46](https://github.com/ > **totalTrackedBalance**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L84) +Defined in: [packages/core/src/actions/superPaymaster.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L175) #### Returns @@ -734,7 +1177,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:84](https://github.com/ > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L107) +Defined in: [packages/core/src/actions/superPaymaster.ts:218](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L218) #### Parameters @@ -754,7 +1197,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:107](https://github.com > **treasury**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L93) +Defined in: [packages/core/src/actions/superPaymaster.ts:194](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L194) #### Returns @@ -766,7 +1209,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:93](https://github.com/ > **unlockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L37) +Defined in: [packages/core/src/actions/superPaymaster.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L83) #### Parameters @@ -785,7 +1228,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:37](https://github.com/ > **updateBlockedStatus**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L49) +Defined in: [packages/core/src/actions/superPaymaster.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L95) #### Parameters @@ -807,7 +1250,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:49](https://github.com/ > **updatePrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L54) +Defined in: [packages/core/src/actions/superPaymaster.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L108) #### Parameters @@ -826,7 +1269,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:54](https://github.com/ > **updatePriceDVT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L55) +Defined in: [packages/core/src/actions/superPaymaster.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L109) #### Parameters @@ -848,7 +1291,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:55](https://github.com/ > **updateReputation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L44) +Defined in: [packages/core/src/actions/superPaymaster.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L90) #### Parameters @@ -869,7 +1312,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:44](https://github.com/ > **updateSBTStatus**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L50) +Defined in: [packages/core/src/actions/superPaymaster.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L96) #### Parameters @@ -890,7 +1333,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:50](https://github.com/ > **userOpState**: (`args`) => `Promise`\<\{ `isBlocked`: `boolean`; `lastTimestamp`: `number`; \}\> -Defined in: [packages/core/src/actions/superPaymaster.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L79) +Defined in: [packages/core/src/actions/superPaymaster.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L170) #### Parameters @@ -910,7 +1353,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:79](https://github.com/ > **validatePaymasterUserOp**: (`args`) => `Promise`\<\{ `context`: [`Hex`](https://viem.sh/docs/index.html); `validationData`: `bigint`; \}\> -Defined in: [packages/core/src/actions/superPaymaster.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L69) +Defined in: [packages/core/src/actions/superPaymaster.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L154) #### Parameters @@ -927,23 +1370,27 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:69](https://github.com/ *** -### VALIDATION\_BUFFER\_BPS() +### ~~VALIDATION\_BUFFER\_BPS()~~ > **VALIDATION\_BUFFER\_BPS**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L102) +Defined in: [packages/core/src/actions/superPaymaster.ts:210](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L210) #### Returns `Promise`\<`bigint`\> +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### version() > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L111) +Defined in: [packages/core/src/actions/superPaymaster.ts:222](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L222) #### Returns @@ -955,7 +1402,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:111](https://github.com > **withdraw**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L33) +Defined in: [packages/core/src/actions/superPaymaster.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L79) #### Parameters @@ -975,7 +1422,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:33](https://github.com/ > **withdrawProtocolRevenue**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L63) +Defined in: [packages/core/src/actions/superPaymaster.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L118) #### Parameters @@ -996,7 +1443,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:63](https://github.com/ > **withdrawStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L38) +Defined in: [packages/core/src/actions/superPaymaster.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L84) #### Parameters @@ -1016,7 +1463,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:38](https://github.com/ > **withdrawTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/superPaymaster.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L32) +Defined in: [packages/core/src/actions/superPaymaster.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L78) #### Parameters @@ -1037,7 +1484,7 @@ Defined in: [packages/core/src/actions/superPaymaster.ts:32](https://github.com/ > **xpntsFactory**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/superPaymaster.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/superPaymaster.ts#L94) +Defined in: [packages/core/src/actions/superPaymaster.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L195) #### Returns diff --git a/api/@aastar/core/type-aliases/SupportedChainId.md b/api/@aastar/core/type-aliases/SupportedChainId.md new file mode 100644 index 000000000..5ce056e74 --- /dev/null +++ b/api/@aastar/core/type-aliases/SupportedChainId.md @@ -0,0 +1,3 @@ +> **SupportedChainId** = keyof *typeof* [`CANONICAL_ADDRESSES`](../variables/CANONICAL_ADDRESSES.md) + +Defined in: [packages/core/src/addresses.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L185) diff --git a/api/@aastar/core/type-aliases/SupportedNetwork.md b/api/@aastar/core/type-aliases/SupportedNetwork.md index f2e1e2fd1..847b0722d 100644 --- a/api/@aastar/core/type-aliases/SupportedNetwork.md +++ b/api/@aastar/core/type-aliases/SupportedNetwork.md @@ -1,3 +1,3 @@ > **SupportedNetwork** = keyof *typeof* [`NETWORKS`](../variables/NETWORKS.md) -Defined in: [packages/core/src/networks.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L52) +Defined in: [packages/core/src/networks.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L52) diff --git a/api/@aastar/core/type-aliases/TokenActions.md b/api/@aastar/core/type-aliases/TokenActions.md index 994505c4c..b70a47b15 100644 --- a/api/@aastar/core/type-aliases/TokenActions.md +++ b/api/@aastar/core/type-aliases/TokenActions.md @@ -1,3 +1,3 @@ > **TokenActions** = [`GTokenActions`](GTokenActions.md) & [`XPNTsTokenActions`](XPNTsTokenActions.md) -Defined in: [packages/core/src/actions/tokens.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L81) +Defined in: [packages/core/src/actions/tokens.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L127) diff --git a/api/@aastar/core/type-aliases/TokenConfig.md b/api/@aastar/core/type-aliases/TokenConfig.md new file mode 100644 index 000000000..7620b15a1 --- /dev/null +++ b/api/@aastar/core/type-aliases/TokenConfig.md @@ -0,0 +1,27 @@ +> **TokenConfig** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L12) + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L15) + +*** + +### tier1Limit + +> **tier1Limit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L13) + +*** + +### tier2Limit + +> **tier2Limit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L14) diff --git a/api/@aastar/core/type-aliases/X402Actions.md b/api/@aastar/core/type-aliases/X402Actions.md new file mode 100644 index 000000000..fe788d9ea --- /dev/null +++ b/api/@aastar/core/type-aliases/X402Actions.md @@ -0,0 +1,185 @@ +> **X402Actions** = `object` + +Defined in: [packages/core/src/actions/x402.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L46) + +## Properties + +### facilitatorEarnings() + +> **facilitatorEarnings**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/x402.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L61) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `asset`: `Address`; `operator`: `Address`; \} | +| `args.asset` | `Address` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### facilitatorFeeBPS() + +> **facilitatorFeeBPS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/x402.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L60) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### operatorFacilitatorFees() + +> **operatorFacilitatorFees**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/x402.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L62) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### setFacilitatorFeeBPS() + +> **setFacilitatorFeeBPS**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L66) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `fee`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.fee` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setOperatorFacilitatorFee() + +> **setOperatorFacilitatorFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `fee`: `bigint`; `operator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.fee` | `bigint` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### settleX402Payment() + +> **settleX402Payment**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `asset`: `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `validAfter`: `bigint`; `validBefore`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.asset` | `Address` | +| `args.from` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.to` | `Address` | +| `args.validAfter` | `bigint` | +| `args.validBefore` | `bigint` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### settleX402PaymentDirect() + +> **settleX402PaymentDirect**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L53) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `asset`: `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.asset` | `Address` | +| `args.from` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawFacilitatorEarnings() + +> **withdrawFacilitatorEarnings**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `asset`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.asset` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### x402SettlementNonces() + +> **x402SettlementNonces**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/x402.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L59) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `nonce`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/core/type-aliases/XPNTsFactoryActions.md b/api/@aastar/core/type-aliases/XPNTsFactoryActions.md index 3f0188e98..ae583b699 100644 --- a/api/@aastar/core/type-aliases/XPNTsFactoryActions.md +++ b/api/@aastar/core/type-aliases/XPNTsFactoryActions.md @@ -1,6 +1,6 @@ > **XPNTsFactoryActions** = `object` -Defined in: [packages/core/src/actions/factory.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L7) +Defined in: [packages/core/src/actions/factory.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L7) ## Properties @@ -8,7 +8,7 @@ Defined in: [packages/core/src/actions/factory.ts:7](https://github.com/AAStarCo > **communityToToken**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L23) +Defined in: [packages/core/src/actions/factory.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L26) #### Parameters @@ -27,7 +27,7 @@ Defined in: [packages/core/src/actions/factory.ts:23](https://github.com/AAStarC > **createToken**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L10) +Defined in: [packages/core/src/actions/factory.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L10) #### Parameters @@ -49,7 +49,7 @@ Defined in: [packages/core/src/actions/factory.ts:10](https://github.com/AAStarC > **deployedTokens**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L22) +Defined in: [packages/core/src/actions/factory.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L25) #### Parameters @@ -64,11 +64,11 @@ Defined in: [packages/core/src/actions/factory.ts:22](https://github.com/AAStarC *** -### deployForCommunity() +### ~~deployForCommunity()~~ > **deployForCommunity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L11) +Defined in: [packages/core/src/actions/factory.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L12) #### Parameters @@ -82,13 +82,17 @@ Defined in: [packages/core/src/actions/factory.ts:11](https://github.com/AAStarC `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory has no `deployForCommunity` (it cannot derive token name/symbol from a community address). Throws ErrorCode.NOT\_IMPLEMENTED; use [deployxPNTsToken](#deployxpntstoken) with full token params. + *** ### deployxPNTsToken() > **deployxPNTsToken**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L9) +Defined in: [packages/core/src/actions/factory.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L9) #### Parameters @@ -113,7 +117,7 @@ Defined in: [packages/core/src/actions/factory.ts:9](https://github.com/AAStarCo > **getAllTokens**: () => `Promise`\<`Address`[]\> -Defined in: [packages/core/src/actions/factory.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L19) +Defined in: [packages/core/src/actions/factory.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L22) #### Returns @@ -121,11 +125,11 @@ Defined in: [packages/core/src/actions/factory.ts:19](https://github.com/AAStarC *** -### getCommunityByToken() +### ~~getCommunityByToken()~~ > **getCommunityByToken**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L18) +Defined in: [packages/core/src/actions/factory.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L21) #### Parameters @@ -138,13 +142,17 @@ Defined in: [packages/core/src/actions/factory.ts:18](https://github.com/AAStarC `Promise`\<`Address`\> +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory has no token->community reverse lookup (only community->token via [communityToToken](#communitytotoken)). Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### getDeployedCount() > **getDeployedCount**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/factory.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L20) +Defined in: [packages/core/src/actions/factory.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L23) #### Returns @@ -156,7 +164,9 @@ Defined in: [packages/core/src/actions/factory.ts:20](https://github.com/AAStarC > **getImplementation**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L30) +Defined in: [packages/core/src/actions/factory.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L36) + +Token implementation address. On-chain fn: `implementation()` (the legacy `getImplementation` getter was removed). #### Returns @@ -168,7 +178,7 @@ Defined in: [packages/core/src/actions/factory.ts:30](https://github.com/AAStarC > **getTokenAddress**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L14) +Defined in: [packages/core/src/actions/factory.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L15) #### Parameters @@ -187,7 +197,7 @@ Defined in: [packages/core/src/actions/factory.ts:14](https://github.com/AAStarC > **getTokenCount**: () => `Promise`\<`bigint`\> -Defined in: [packages/core/src/actions/factory.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L21) +Defined in: [packages/core/src/actions/factory.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L24) #### Returns @@ -199,7 +209,7 @@ Defined in: [packages/core/src/actions/factory.ts:21](https://github.com/AAStarC > **hasToken**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/factory.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L16) +Defined in: [packages/core/src/actions/factory.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L18) #### Parameters @@ -218,7 +228,7 @@ Defined in: [packages/core/src/actions/factory.ts:16](https://github.com/AAStarC > **isTokenDeployed**: (`args`) => `Promise`\<`boolean`\> -Defined in: [packages/core/src/actions/factory.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L17) +Defined in: [packages/core/src/actions/factory.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L19) #### Parameters @@ -237,7 +247,7 @@ Defined in: [packages/core/src/actions/factory.ts:17](https://github.com/AAStarC > **owner**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L39) +Defined in: [packages/core/src/actions/factory.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L46) #### Returns @@ -245,11 +255,11 @@ Defined in: [packages/core/src/actions/factory.ts:39](https://github.com/AAStarC *** -### predictAddress() +### ~~predictAddress()~~ > **predictAddress**: (`args`) => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L15) +Defined in: [packages/core/src/actions/factory.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L17) #### Parameters @@ -263,13 +273,17 @@ Defined in: [packages/core/src/actions/factory.ts:15](https://github.com/AAStarC `Promise`\<`Address`\> +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory exposes no CREATE2 address predictor. Throws ErrorCode.NOT\_IMPLEMENTED; read the deployed address via [getTokenAddress](#gettokenaddress)/[communityToToken](#communitytotoken) after deploy. + *** ### REGISTRY() > **REGISTRY**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L33) +Defined in: [packages/core/src/actions/factory.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L39) #### Returns @@ -281,7 +295,7 @@ Defined in: [packages/core/src/actions/factory.ts:33](https://github.com/AAStarC > **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L41) +Defined in: [packages/core/src/actions/factory.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L48) #### Parameters @@ -296,11 +310,11 @@ Defined in: [packages/core/src/actions/factory.ts:41](https://github.com/AAStarC *** -### setImplementation() +### ~~setImplementation()~~ > **setImplementation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L29) +Defined in: [packages/core/src/actions/factory.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L34) #### Parameters @@ -314,13 +328,17 @@ Defined in: [packages/core/src/actions/factory.ts:29](https://github.com/AAStarC `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory has no implementation setter (the token `implementation()` is fixed). Throws ErrorCode.NOT\_IMPLEMENTED. + *** -### setRegistry() +### ~~setRegistry()~~ > **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L26) +Defined in: [packages/core/src/actions/factory.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L30) #### Parameters @@ -334,13 +352,17 @@ Defined in: [packages/core/src/actions/factory.ts:26](https://github.com/AAStarC `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory.REGISTRY is immutable (no `setRegistry`). Throws ErrorCode.NOT\_IMPLEMENTED. + *** ### setSuperPaymaster() > **setSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L28) +Defined in: [packages/core/src/actions/factory.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L32) #### Parameters @@ -360,7 +382,7 @@ Defined in: [packages/core/src/actions/factory.ts:28](https://github.com/AAStarC > **setSuperPaymasterAddress**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L27) +Defined in: [packages/core/src/actions/factory.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L31) #### Parameters @@ -380,7 +402,7 @@ Defined in: [packages/core/src/actions/factory.ts:27](https://github.com/AAStarC > **SUPER\_PAYMASTER**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L35) +Defined in: [packages/core/src/actions/factory.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L41) #### Returns @@ -392,7 +414,7 @@ Defined in: [packages/core/src/actions/factory.ts:35](https://github.com/AAStarC > **SUPERPAYMASTER**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L34) +Defined in: [packages/core/src/actions/factory.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L40) #### Returns @@ -404,7 +426,9 @@ Defined in: [packages/core/src/actions/factory.ts:34](https://github.com/AAStarC > **tokenImplementation**: () => `Promise`\<`Address`\> -Defined in: [packages/core/src/actions/factory.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L36) +Defined in: [packages/core/src/actions/factory.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L43) + +Token implementation address. On-chain fn: `implementation()` (the legacy `tokenImplementation` getter was removed). #### Returns @@ -416,7 +440,7 @@ Defined in: [packages/core/src/actions/factory.ts:36](https://github.com/AAStarC > **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> -Defined in: [packages/core/src/actions/factory.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L40) +Defined in: [packages/core/src/actions/factory.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L47) #### Parameters @@ -436,7 +460,7 @@ Defined in: [packages/core/src/actions/factory.ts:40](https://github.com/AAStarC > **version**: () => `Promise`\<`string`\> -Defined in: [packages/core/src/actions/factory.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/factory.ts#L44) +Defined in: [packages/core/src/actions/factory.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L51) #### Returns diff --git a/api/@aastar/core/type-aliases/XPNTsTokenActions.md b/api/@aastar/core/type-aliases/XPNTsTokenActions.md index 780ad8a22..4b17f38a6 100644 --- a/api/@aastar/core/type-aliases/XPNTsTokenActions.md +++ b/api/@aastar/core/type-aliases/XPNTsTokenActions.md @@ -1,9 +1,28 @@ > **XPNTsTokenActions** = [`ERC20Actions`](ERC20Actions.md) & `object` -Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/actions/tokens.ts#L33) +Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L33) ## Type Declaration +### addApprovedFacilitator() + +> **addApprovedFacilitator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Add an approved facilitator. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `facilitator`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.facilitator` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + ### addAutoApprovedSpender() > **addAutoApprovedSpender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -21,6 +40,22 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### approvedFacilitators() + +> **approvedFacilitators**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `facilitator`: `Address`; `token`: `Address`; \} | +| `args.facilitator` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + ### autoApprovedSpenders() > **autoApprovedSpenders**: (`args`) => `Promise`\<`boolean`\> @@ -182,6 +217,36 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<`any`\> +### emergencyDisabled() + +> **emergencyDisabled**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### emergencyRevokedAddress() + +> **emergencyRevokedAddress**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + ### emergencyRevokePaymaster() > **emergencyRevokePaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -198,6 +263,66 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### EXCHANGE\_RATE\_COOLDOWN() + +> **EXCHANGE\_RATE\_COOLDOWN**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### EXCHANGE\_RATE\_DELTA\_BPS() + +> **EXCHANGE\_RATE\_DELTA\_BPS**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### EXCHANGE\_RATE\_MAX() + +> **EXCHANGE\_RATE\_MAX**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### EXCHANGE\_RATE\_MIN() + +> **EXCHANGE\_RATE\_MIN**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + ### exchangeRate() > **exchangeRate**: (`args`) => `Promise`\<`bigint`\> @@ -213,6 +338,21 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<`bigint`\> +### exchangeRateUpdatedAt() + +> **exchangeRateUpdatedAt**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + ### FACTORY() > **FACTORY**: (`args`) => `Promise`\<`Address`\> @@ -259,7 +399,7 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<\{ `communityENS`: `string`; `communityName`: `string`; `communityOwner`: `Address`; `name`: `string`; `symbol`: `string`; \}\> -### MAX\_SINGLE\_TX\_LIMIT() +### ~~MAX\_SINGLE\_TX\_LIMIT()~~ > **MAX\_SINGLE\_TX\_LIMIT**: (`args`) => `Promise`\<`bigint`\> @@ -274,6 +414,40 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<`bigint`\> +#### Deprecated + +The deployed xPNTsToken ABI renamed this constant to `MAX_SINGLE_TX_LIMIT_CAP`; this wrapper now reads that. Prefer MAX\_SINGLE\_TX\_LIMIT\_CAP. + +### MAX\_SINGLE\_TX\_LIMIT\_CAP() + +> **MAX\_SINGLE\_TX\_LIMIT\_CAP**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### maxSingleTxLimit() + +> **maxSingleTxLimit**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + ### mint() > **mint**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -367,6 +541,48 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### recordDebtWithOpHash() + +> **recordDebtWithOpHash**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Record APNTs-denominated debt for a user, guarded by a unique `opHash` to prevent replay. +ABI: recordDebtWithOpHash(address user, uint256 amountAPNTs, bytes32 opHash). This is a +state-changing tx, so it resolves to the transaction `Hash`; the function has no return value. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amountAPNTs`: `bigint`; `opHash`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amountAPNTs` | `bigint` | +| `args.opHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### removeApprovedFacilitator() + +> **removeApprovedFacilitator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Remove an approved facilitator. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `facilitator`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.facilitator` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + ### removeAutoApprovedSpender() > **removeAutoApprovedSpender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -384,6 +600,24 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### renounceFactory() + +> **renounceFactory**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Permanently renounce the factory link. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + ### repayDebt() > **repayDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -401,6 +635,64 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### setMaxSingleTxLimit() + +> **setMaxSingleTxLimit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Set the per-tx burn ceiling. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newLimit`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newLimit` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setSpenderDailyCap() + +> **setSpenderDailyCap**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Set the per-spender daily burn cap (in whole tokens). State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newCap`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newCap` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setSpenderDailyCapFor() + +> **setSpenderDailyCapFor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Set a per-spender daily burn-cap OVERRIDE for a specific spender (admin). State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newCap`: `bigint`; `spender`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newCap` | `bigint` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + ### setSuperPaymasterAddress() > **setSuperPaymasterAddress**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -418,6 +710,55 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### spenderDailyCapOverride() + +> **spenderDailyCapOverride**: (`args`) => `Promise`\<`bigint`\> + +Read a spender's daily-cap override (0 = no override; the global `spenderDailyCapTokens` applies). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `spender`: `Address`; `token`: `Address`; \} | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### spenderDailyCapTokens() + +> **spenderDailyCapTokens**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### spenderRateLimit() + +> **spenderRateLimit**: (`args`) => `Promise`\<\{ `dailyBurnTotal`: `bigint`; `reserved`: `bigint`; `windowStart`: `bigint`; \}\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `spender`: `Address`; `token`: `Address`; \} | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<\{ `dailyBurnTotal`: `bigint`; `reserved`: `bigint`; `windowStart`: `bigint`; \}\> + ### SUPERPAYMASTER\_ADDRESS() > **SUPERPAYMASTER\_ADDRESS**: (`args`) => `Promise`\<`Address`\> @@ -469,6 +810,24 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### unsetEmergencyDisabled() + +> **unsetEmergencyDisabled**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Clear the emergency-disabled flag. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + ### updateExchangeRate() > **updateExchangeRate**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> @@ -486,6 +845,22 @@ Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCo `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> +### usedDebtHashes() + +> **usedDebtHashes**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `opHash`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.opHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + ### usedOpHashes() > **usedOpHashes**: (`args`) => `Promise`\<`boolean`\> diff --git a/api/@aastar/core/variables/AASTAR_COMMUNITY.md b/api/@aastar/core/variables/AASTAR_COMMUNITY.md index 833aad945..34252448b 100644 --- a/api/@aastar/core/variables/AASTAR_COMMUNITY.md +++ b/api/@aastar/core/variables/AASTAR_COMMUNITY.md @@ -1,6 +1,6 @@ > `const` **AASTAR\_COMMUNITY**: [`CommunityConfig`](../interfaces/CommunityConfig.md) -Defined in: [packages/core/src/communities.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L34) +Defined in: [packages/core/src/communities.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L34) AAstar Community - SuperPaymaster shared mode (AOA+) diff --git a/api/@aastar/core/variables/AAStarAirAccountFactoryV7ABI.md b/api/@aastar/core/variables/AAStarAirAccountFactoryV7ABI.md new file mode 100644 index 000000000..4d9fa9ba6 --- /dev/null +++ b/api/@aastar/core/variables/AAStarAirAccountFactoryV7ABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarAirAccountFactoryV7ABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L183) diff --git a/api/@aastar/core/variables/AAStarAirAccountFactoryV7Artifact.md b/api/@aastar/core/variables/AAStarAirAccountFactoryV7Artifact.md new file mode 100644 index 000000000..c3e75aecf --- /dev/null +++ b/api/@aastar/core/variables/AAStarAirAccountFactoryV7Artifact.md @@ -0,0 +1,3 @@ +> `const` **AAStarAirAccountFactoryV7Artifact**: (\{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `AAStarAirAccountFactoryV7ABIData` + +Defined in: [packages/core/src/abis/index.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L184) diff --git a/api/@aastar/core/variables/AAStarAirAccountV7ABI.md b/api/@aastar/core/variables/AAStarAirAccountV7ABI.md new file mode 100644 index 000000000..1881ad9f2 --- /dev/null +++ b/api/@aastar/core/variables/AAStarAirAccountV7ABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarAirAccountV7ABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L97) diff --git a/api/@aastar/core/variables/AAStarAirAccountV7Artifact.md b/api/@aastar/core/variables/AAStarAirAccountV7Artifact.md new file mode 100644 index 000000000..c14a48f5a --- /dev/null +++ b/api/@aastar/core/variables/AAStarAirAccountV7Artifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarAirAccountV7Artifact**: `object` = `AAStarAirAccountV7ABIData` + +Defined in: [packages/core/src/abis/index.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L98) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: ...[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/core/variables/AAStarBLSAggregatorABI.md b/api/@aastar/core/variables/AAStarBLSAggregatorABI.md new file mode 100644 index 000000000..d0484fd10 --- /dev/null +++ b/api/@aastar/core/variables/AAStarBLSAggregatorABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarBLSAggregatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L214) diff --git a/api/@aastar/core/variables/AAStarBLSAggregatorArtifact.md b/api/@aastar/core/variables/AAStarBLSAggregatorArtifact.md new file mode 100644 index 000000000..cdb673875 --- /dev/null +++ b/api/@aastar/core/variables/AAStarBLSAggregatorArtifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarBLSAggregatorArtifact**: `object` = `AAStarBLSAggregatorABIData` + +Defined in: [packages/core/src/abis/index.ts:215](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L215) + +## Type Declaration + +### abi + +> **abi**: (\{ `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: `never`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/core/variables/AAStarBLSAlgorithmABI.md b/api/@aastar/core/variables/AAStarBLSAlgorithmABI.md new file mode 100644 index 000000000..3a6472e28 --- /dev/null +++ b/api/@aastar/core/variables/AAStarBLSAlgorithmABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarBLSAlgorithmABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:211](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L211) diff --git a/api/@aastar/core/variables/AAStarBLSAlgorithmArtifact.md b/api/@aastar/core/variables/AAStarBLSAlgorithmArtifact.md new file mode 100644 index 000000000..c2e439925 --- /dev/null +++ b/api/@aastar/core/variables/AAStarBLSAlgorithmArtifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarBLSAlgorithmArtifact**: `object` = `AAStarBLSAlgorithmABIData` + +Defined in: [packages/core/src/abis/index.ts:212](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L212) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/core/variables/AAStarValidatorABI.md b/api/@aastar/core/variables/AAStarValidatorABI.md new file mode 100644 index 000000000..52edcfa0d --- /dev/null +++ b/api/@aastar/core/variables/AAStarValidatorABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarValidatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L206) diff --git a/api/@aastar/core/variables/AAStarValidatorArtifact.md b/api/@aastar/core/variables/AAStarValidatorArtifact.md new file mode 100644 index 000000000..d4c05c13d --- /dev/null +++ b/api/@aastar/core/variables/AAStarValidatorArtifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarValidatorArtifact**: `object` = `AAStarValidatorABIData` + +Defined in: [packages/core/src/abis/index.ts:207](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L207) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/core/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md b/api/@aastar/core/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md new file mode 100644 index 000000000..3f6bc908b --- /dev/null +++ b/api/@aastar/core/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md @@ -0,0 +1,3 @@ +> **AGENT\_IDENTITY\_REGISTRY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L45) diff --git a/api/@aastar/core/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md b/api/@aastar/core/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md new file mode 100644 index 000000000..3db8e761e --- /dev/null +++ b/api/@aastar/core/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md @@ -0,0 +1,3 @@ +> **AGENT\_REPUTATION\_REGISTRY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L46) diff --git a/api/@aastar/core/variables/ALL_ADDRESSES.md b/api/@aastar/core/variables/ALL_ADDRESSES.md index be6f58f85..e8a13097f 100644 --- a/api/@aastar/core/variables/ALL_ADDRESSES.md +++ b/api/@aastar/core/variables/ALL_ADDRESSES.md @@ -1,11 +1,19 @@ > `const` **ALL\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L110) +Defined in: [packages/core/src/contract-addresses.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L116) All Addresses Combined (for reference) ## Type Declaration +### agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +### agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + ### aPNTs > `readonly` **aPNTs**: `` `0x${string}` `` @@ -34,6 +42,10 @@ All Addresses Combined (for reference) > `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` +### microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + ### mockUSDT > `readonly` **mockUSDT**: `` `0x${string}` `` diff --git a/api/@aastar/core/variables/ALL_ROLES.md b/api/@aastar/core/variables/ALL_ROLES.md index 29011f530..f2786786d 100644 --- a/api/@aastar/core/variables/ALL_ROLES.md +++ b/api/@aastar/core/variables/ALL_ROLES.md @@ -1,5 +1,5 @@ > `const` **ALL\_ROLES**: readonly \[`` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``\] -Defined in: [packages/core/src/roles.ts:236](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L236) +Defined in: [packages/core/src/roles.ts:236](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L236) All defined roles array (for iteration) diff --git a/api/@aastar/core/variables/APNTS_ADDRESS.md b/api/@aastar/core/variables/APNTS_ADDRESS.md index 8d625ed24..6e451bd0b 100644 --- a/api/@aastar/core/variables/APNTS_ADDRESS.md +++ b/api/@aastar/core/variables/APNTS_ADDRESS.md @@ -1,3 +1,3 @@ > **APNTS\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L43) +Defined in: [packages/core/src/constants.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L43) diff --git a/api/@aastar/core/variables/AgentRegistryABI.md b/api/@aastar/core/variables/AgentRegistryABI.md new file mode 100644 index 000000000..84dbc33ab --- /dev/null +++ b/api/@aastar/core/variables/AgentRegistryABI.md @@ -0,0 +1,3 @@ +> `const` **AgentRegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:186](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L186) diff --git a/api/@aastar/core/variables/AgentRegistryArtifact.md b/api/@aastar/core/variables/AgentRegistryArtifact.md new file mode 100644 index 000000000..4bdd67a9a --- /dev/null +++ b/api/@aastar/core/variables/AgentRegistryArtifact.md @@ -0,0 +1,3 @@ +> `const` **AgentRegistryArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `AgentRegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L187) diff --git a/api/@aastar/core/variables/AirAccountDelegateABI.md b/api/@aastar/core/variables/AirAccountDelegateABI.md new file mode 100644 index 000000000..801d7b4f4 --- /dev/null +++ b/api/@aastar/core/variables/AirAccountDelegateABI.md @@ -0,0 +1,3 @@ +> `const` **AirAccountDelegateABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L201) diff --git a/api/@aastar/core/variables/AirAccountDelegateArtifact.md b/api/@aastar/core/variables/AirAccountDelegateArtifact.md new file mode 100644 index 000000000..008b40ecc --- /dev/null +++ b/api/@aastar/core/variables/AirAccountDelegateArtifact.md @@ -0,0 +1,3 @@ +> `const` **AirAccountDelegateArtifact**: (\{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `AirAccountDelegateABIData` + +Defined in: [packages/core/src/abis/index.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L202) diff --git a/api/@aastar/core/variables/AirAccountExtensionABI.md b/api/@aastar/core/variables/AirAccountExtensionABI.md new file mode 100644 index 000000000..6fc6446fc --- /dev/null +++ b/api/@aastar/core/variables/AirAccountExtensionABI.md @@ -0,0 +1,3 @@ +> `const` **AirAccountExtensionABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:226](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L226) diff --git a/api/@aastar/core/variables/AirAccountExtensionArtifact.md b/api/@aastar/core/variables/AirAccountExtensionArtifact.md new file mode 100644 index 000000000..063dbe666 --- /dev/null +++ b/api/@aastar/core/variables/AirAccountExtensionArtifact.md @@ -0,0 +1,9 @@ +> `const` **AirAccountExtensionArtifact**: `object` = `AirAccountExtensionABIData` + +Defined in: [packages/core/src/abis/index.ts:227](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L227) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/core/variables/BLSAggregatorABI.md b/api/@aastar/core/variables/BLSAggregatorABI.md index faf3efeaa..3525232f6 100644 --- a/api/@aastar/core/variables/BLSAggregatorABI.md +++ b/api/@aastar/core/variables/BLSAggregatorABI.md @@ -1,3 +1,3 @@ > `const` **BLSAggregatorABI**: `any` -Defined in: [packages/core/src/abis/index.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L84) +Defined in: [packages/core/src/abis/index.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L122) diff --git a/api/@aastar/core/variables/BLSAggregatorArtifact.md b/api/@aastar/core/variables/BLSAggregatorArtifact.md index 1179d1f34..04026926a 100644 --- a/api/@aastar/core/variables/BLSAggregatorArtifact.md +++ b/api/@aastar/core/variables/BLSAggregatorArtifact.md @@ -1,13 +1,13 @@ > `const` **BLSAggregatorArtifact**: `object` = `BLSAggregatorABIData` -Defined in: [packages/core/src/abis/index.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L85) +Defined in: [packages/core/src/abis/index.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L123) ## Type Declaration ### abi -> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] ### bytecode -> **bytecode**: `string` = `"0x60a03461014057601f61292f38819003918201601f19168301916001600160401b03831184841017610144578084926060946040528339810103126101405761004781610158565b90610060604061005960208401610158565b9201610158565b90331561012d575f8054336001600160a01b0319821681178355604051959290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055600360085560076009556001600160a01b0316801561011a57608052600280546001600160a01b039283166001600160a01b031991821617909155600380549390921692169190911790556127c2908161016d8239608051818181611b70015261214a0152f35b634726455360e11b5f525f60045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101405756fe60a0806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b146121205750806322c70bbb14611ea25780632399c309146112cf578063300b0b35146112645780633b60288a1461123557806353f10a4b1461121757806354fd4d50146111b25780635ae48ba41461117e5780635e1a03a2146106425780636578b0cc146105de578063714897df146105c2578063715018a6146105445780637f39a939146104815780638da5cb5b1461044e578063a74c1ca814610424578063bc8efe75146103f0578063c5246bf5146102c8578063c85501bb146102aa578063e79e973914610246578063f2fde38b146101765763f42cc34e14610105575f80fd5b346101735760206003193601126101735760406101679173ffffffffffffffffffffffffffffffffffffffff61013961216e565b16815260046020522060ff600161014f836122c0565b92015416604051928392604084526040840190612360565b90151560208301520390f35b80fd5b50346101735760206003193601126101735773ffffffffffffffffffffffffffffffffffffffff6101a561216e565b6101ad612486565b16801561021a5773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b50346101735760206003193601126101735773ffffffffffffffffffffffffffffffffffffffff61027561216e565b61027d612486565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025580f35b50346101735780600319360112610173576020600854604051908152f35b5034610173576020600319360112610173576004356102e5612486565b600854811061039257600d811161032e577fb06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b60406009548151908152836020820152a160095580f35b6040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5468726573686f6c64203e204d61780000000000000000000000000000000000604482015280606481015b0390fd5b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f42656c6f77206d696e5468726573686f6c6400000000000000000000000000006044820152fd5b5034610173578060031936011261017357602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346101735760206003193601126101735760406020916004358152600783522054604051908152f35b503461017357806003193601126101735773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b50346101735760206003193601126101735760043561049e612486565b600281106104e657600d811161032e577fb06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b60406008548151908152836020820152a160085580f35b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d696e207468726573686f6c6420746f6f206c6f7700000000000000000000006044820152fd5b503461017357806003193601126101735761055d612486565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346101735780600319360112610173576020604051600d8152f35b50346101735760206003193601126101735773ffffffffffffffffffffffffffffffffffffffff61060d61216e565b610615612486565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600354161760035580f35b50346101735760a06003193601126101735761065c612191565b60443567ffffffffffffffff8111610e945761067c9036906004016121b4565b9160843567ffffffffffffffff81116110015761069d9036906004016121b4565b9290946106a86124d2565b73ffffffffffffffffffffffffffffffffffffffff600354163314158061115d575b6111315773ffffffffffffffffffffffffffffffffffffffff8316156110ef576004358152600660205260ff6040822054166110c1576008546064351061106357600d60643511611005576107203686846123a1565b602081519101206040516020810191600435835273ffffffffffffffffffffffffffffffffffffffff86166040830152606082015260643560808201524660a082015260a0815261077260c08261229d565b51902093860193608087860312610de057863567ffffffffffffffff8111610e9457856107a091890161250b565b94602088013567ffffffffffffffff8111610dd157816107c1918a0161250b565b90604089013567ffffffffffffffff811161100157906107e2918a0161250b565b97604051926020840152602083526107fb60408461229d565b6108036125b2565b926108ae6067604051809360403661010084013780518160200161014084015e5181017f0100000000000000000000000000000000000000000000000000000000000000610140820152886101428201537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e6101438201527f554c5f23000000000000000000000000000000000000000000000000000000006101638201520301610100830161268d565b806020528061010083015260016101208301537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e6101218301527f554c5f23000000000000000000000000000000000000000000000000000000006101418301526020866045610100850160025afa60203d141615610ffd5785518252600260016020845b80518518610100870152019161096060ff1986610954846101208301612638565b0301610100870161268d565b83520191600983146109785791602060019192610933565b505050610a369060406101008201526020610120820152604061014082015260016101a08201526f1a0111ea397fe69a4b1ba7b6434bacd76101c08201527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e08201526109eb8161010081016126a5565b6109fc6040820161010083016126a5565b610a0d6080820161010083016126a5565b610a1e60c0820161010083016126a5565b610a2885826126c3565b8461010001906080016126c3565b6101008361020081600d5afa6101003d141615610ff057885192610a626020808c01958c010185612529565b81518151149182610fdd575b82610fca575b82610fb7575b82610fa4575b82610f91575b82610f7e575b82610f6b575b505015610f4357606001358084915b610ec957506064358110610e985750608086805181010312610e9457906020610b04610b0f93608060405199610ad68b612264565b848101518b526040810151858c0152606081015160408c0152015160608a0152828082518301019101612529565b988051010190612529565b9260609360405195610b21868861229d565b60028752601f19860198845b8a8110610e7d575060405199610b43888c61229d565b60028b52855b818110610e6557505090610c0091610b5f61258e565b6f17f1d3a73197d7942695638c4fa9ac0f81527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e189820152610bdc8a6125ee565b52610be6896125ee565b50610bf08b6125ee565b52610bfa8a6125ee565b506126e8565b610c0987612628565b52610c1386612628565b50610c1d88612628565b52610c2787612628565b50849285519660405196890395845b868a8214610c67579061010060206001930198608060208d85610180020192828d51855e8d01015191015e01610c36565b5050888a6020878b846101800290600f5afa9160203d14915114161615610e5857845115610e305784806040518486823780858101838152039082885af1903d15610e2a57503d90610cb882612385565b91610cc6604051938461229d565b82523d86602084013e5b15610de457506004358452600660205260408420600160ff198254161790558373ffffffffffffffffffffffffffffffffffffffff6003541680610d71575b505073ffffffffffffffffffffffffffffffffffffffff91610d329136916123a1565b602081519101209160405192835216907ff75669458e39b3e450bebdf8e3f8396a4ca0b4057017be244aa5af43321b2807602060043592a36001805580f35b803b15610de0578180916024604051809481937f424a3d7700000000000000000000000000000000000000000000000000000000835260043560048401525af18015610dd55715610d0f5781610dc69161229d565b610dd1578385610d0f565b8380fd5b6040513d84823e3d90fd5b5080fd5b61038e906040519182917f0418cb660000000000000000000000000000000000000000000000000000000083526004356004840152604060248401526044830190612360565b90610cd0565b6004857f729d0f6b000000000000000000000000000000000000000000000000000000008152fd5b634df45e2f85526004601cfd5b808c60208093610e736125b2565b9201015201610b49565b602090610e8861258e565b82828c01015201610b2d565b8280fd5b7fd6022e8e000000000000000000000000000000000000000000000000000000008452600452606435602452604483fd5b5f19810190808211610f165716905f198114610ee9576001019080610aa1565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6004847f729d0f6b000000000000000000000000000000000000000000000000000000008152fd5b60e0919250810151910151145f80610a92565b915060c082015160c08201511491610a8c565b915060a082015160a08201511491610a86565b9150608082015160808201511491610a80565b9150606082015160608201511491610a7a565b9150604082015160408201511491610a74565b9150602082015160208201511491610a6e565b63c55e5e3384526004601cfd5b8580fd5b8480fd5b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5468726573686f6c642065786365656473206d617800000000000000000000006044820152fd5b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5468726573686f6c642062656c6f77206d696e696d756d0000000000000000006044820152fd5b807f4eec80e60000000000000000000000000000000000000000000000000000000060249252600435600452fd5b8073ffffffffffffffffffffffffffffffffffffffff847fd08525e9000000000000000000000000000000000000000000000000000000006024945216600452fd5b807fd86ad9cf000000000000000000000000000000000000000000000000000000006024925233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff8154163314156106ca565b5034610173578060031936011261017357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b5034610173578060031936011261017357506112136040516111d560408261229d565b601381527f424c5341676772656761746f722d332e322e31000000000000000000000000006020820152604051918291602083526020830190612360565b0390f35b50346101735780600319360112610173576020600954604051908152f35b50346101735760206003193601126101735760ff60406020926004358152600684522054166040519015158152f35b50346101735760206003193601126101735760406112b9916004358152600560205220611290816122c0565b9060028101549060ff600460038301549201541690604051948594608086526080860190612360565b9260208501526040840152151560608301520390f35b5034611c835760e0600319360112611c83576112e9612191565b9060443560ff81168103611c835760643567ffffffffffffffff8111611c83576113179036906004016121e2565b909160843567ffffffffffffffff8111611c83576113399036906004016121e2565b94909160c43567ffffffffffffffff8111611c835761135c9036906004016121b4565b9790946113676124d2565b73ffffffffffffffffffffffffffffffffffffffff6003541633141580611e81575b611e55576004355f52600660205260ff60405f20541680611e4a575b611e1c576040516020810190600435825273ffffffffffffffffffffffffffffffffffffffff8416604082015260ff8516606082015260e060808201526114288161140c6113f98c876101008501916123f7565b601f198382030160a08401528d8b612449565b60a43560c08301524660e083015203601f19810183528261229d565b5190209560095499808201976080838a0312611c8357823567ffffffffffffffff8111611c83578961145b91850161250b565b90602084013567ffffffffffffffff8111611c83578a61147c91860161250b565b9960408501359067ffffffffffffffff8211611c835761149d91860161250b565b9c604051916020830152602082526114b660408361229d565b6114be6125b2565b91604051610100810191604036843761156960678383519361014082019481602001865e5181017f01000000000000000000000000000000000000000000000000000000000000006101408201525f6101428201537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e6101438201527f554c5f230000000000000000000000000000000000000000000000000000000061016382015203018461268d565b9283602052838152610120830193600185537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e6101218501527f554c5f230000000000000000000000000000000000000000000000000000000061014185015260205f60458460025afa60203d141615611c83575f518452600260016020865b805185188652019161160a60ff1988611602848c612638565b03018661268d565b835201916009831461162257916020600191926115e9565b50505060406116aa9260206116c296838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e084015261168683826126a5565b61169360408401826126a5565b6116a060808401826126a5565b60c08301906126a5565b6116b484826126c3565b8361010001906080016126c3565b6101008261020081600d5afa6101003d141615611e0f578d916116ee6020845181860195010184612529565b81518151149182611dfc575b82611de9575b82611dd6575b82611dc3575b82611db0575b82611d9d575b82611d8a575b505015611c87575f6060860135805b611d3d5750818110611d0f575050608082805181010312611c8357604051989c989a9993949293909161175f8c612264565b60208101518c52604081015160208d0152606081015160408d01526080015160608c015280518101602001906020019061179891612529565b978051016020016117a891612529565b606099604051986117b98c8b61229d565b60028a525f5b601f198d018110611ce05750908b95949392916117df6040519d8e61229d565b60028d525f5b601f1988018110611cbc5750906118999161188f8e6118898e61180661258e565b6f17f1d3a73197d7942695638c4fa9ac0f81527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e18d820152611883826125ee565b526125ee565b506125ee565b52610bfa8d6125ee565b6118a28a612628565b526118ac89612628565b506118b68b612628565b526118c08a612628565b50879b8851996040516080528d5f905b9e8c8214611913579c809e9f60208d9e9f019c8d928461018002608051019351608090855e0301602001519060800190610100915e6001018a9e9d9c9b9a6118d0565b50508c8b8d60205f8361018002608051600f5afa9160203d14915114161615611caf575f5115611c875783611b59575b5050505073ffffffffffffffffffffffffffffffffffffffff8416611a1a575b5050505050600435611977575b6001805580f35b6004358152600660205260408120600160ff198254161790558073ffffffffffffffffffffffffffffffffffffffff60035416806119b7575b5050611970565b803b15611a17578180916024604051809481937f424a3d7700000000000000000000000000000000000000000000000000000000835260043560048401525af18015610dd557156119b05781611a0c9161229d565b6101735780826119b0565b50fd5b600360ff86161015611b2c579085929173ffffffffffffffffffffffffffffffffffffffff60025416803b156110015773ffffffffffffffffffffffffffffffffffffffff8587611ab382968b9660ff996040519a8b998a9889977f079d2d42000000000000000000000000000000000000000000000000000000008952166004880152166024860152604485015260648401916123d7565b03925af18015610dd557611b17575b505073ffffffffffffffffffffffffffffffffffffffff9060ff6040519316835216907f85137418138b73abf7daf3f3556f050e536be403436e0ee7649eaee69d1faaca602060043592a38180808080611963565b81611b219161229d565b610e94578284611ac2565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526021600452fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15611c8357611bea5f8094611c17611bfc604051988997889687957f1b02e44f000000000000000000000000000000000000000000000000000000008752600435600488015260a060248801528d60a48801916123f7565b91600319868403016044870152612449565b60a43560648401526003198382030160848401528a8c6123d7565b03925af18015611c7857611c62575b5060407f5ce6898a418ad55caa812016e4cdd4a200158714e584a9627d17df3369316ef39181519060a43582526020820152a186808080611943565b611c6f9197505f9061229d565b5f956040611c26565b6040513d5f823e3d90fd5b5f80fd5b7f729d0f6b000000000000000000000000000000000000000000000000000000005f5260045ffd5b634df45e2f5f526004601cfd5b8d9e9f9b9c9d906020918282611cd06125b2565b92010152019e9d9c9b9a9e6117e5565b808b929f9b60209d9e9897969594939d8093611cfa61258e565b92010152019d9091929394959b9a999d6117bf565b7fd6022e8e000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b5f19810190808211611d5d5716905f198114611d5d57600101908061172d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60e0919250810151910151145f8061171e565b915060c082015160c08201511491611718565b915060a082015160a08201511491611712565b915060808201516080820151149161170c565b9150606082015160608201511491611706565b9150604082015160408201511491611700565b91506020820151602082015114916116fa565b63c55e5e335f526004601cfd5b7f4eec80e6000000000000000000000000000000000000000000000000000000005f5260043560045260245ffd5b5060043515156113a5565b7fd86ad9cf000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff5f5416331415611389565b34611c83576040600319360112611c8357611ebb61216e565b60243567ffffffffffffffff8111611c8357611edb9036906004016121b4565b9190611ee5612486565b603083036120f857604051926040840184811067ffffffffffffffff8211176120cb57604052611f163682846123a1565b845273ffffffffffffffffffffffffffffffffffffffff6020850193600185521692835f52600460205260405f20945194855167ffffffffffffffff81116120cb57611f628254612213565b601f811161207a575b506020601f8211600114611ff4579080600193927f472da4d064218fa97032725fbcff922201fa643fed0765b5ffe0ceef63d7b3dc98995f92611fe9575b50505f1982851b9260031b1c19161781555b019051151560ff60ff198354169116179055611fe46040519283926020845260208401916123d7565b0390a2005b015190508980611fa9565b601f19821690835f52805f20915f5b81811061206257509183917f472da4d064218fa97032725fbcff922201fa643fed0765b5ffe0ceef63d7b3dc999a6001969587951061204a575b505050811b018155611fbb565b01515f1960f88460031b161c1916905589808061203d565b9192602060018192868e015181550194019201612003565b81811115611f6b57825f5260205f20601f830160051c90602084106120c3575b81601f9101920160051c03905f5b8281106120b6575050611f6b565b5f828201556001016120a8565b5f915061209a565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f88a808ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b34611c83575f600319360112611c835760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203611c8357565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203611c8357565b9181601f84011215611c835782359167ffffffffffffffff8311611c835760208381860195010111611c8357565b9181601f84011215611c835782359167ffffffffffffffff8311611c83576020808501948460051b010111611c8357565b90600182811c9216801561225a575b602083101461222d57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612222565b6080810190811067ffffffffffffffff8211176120cb57604052565b610100810190811067ffffffffffffffff8211176120cb57604052565b90601f601f19910116810190811067ffffffffffffffff8211176120cb57604052565b9060405191825f8254926122d384612213565b808452936001811690811561233e57506001146122fa575b506122f89250038361229d565b565b90505f9291925260205f20905f915b8183106123225750509060206122f8928201015f6122eb565b6020919350806001915483858901015201910190918492612309565b602093506122f895925060ff1991501682840152151560051b8201015f6122eb565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b67ffffffffffffffff81116120cb57601f01601f191660200190565b9291926123ad82612385565b916123bb604051938461229d565b829481845281830111611c83578281602093845f960137010152565b601f8260209493601f1993818652868601375f8582860101520116010190565b916020908281520191905f905b8082106124115750505090565b90919283359073ffffffffffffffffffffffffffffffffffffffff8216809203611c8357602081600193829352019401920190612404565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311611c835760209260051b809284830137010190565b73ffffffffffffffffffffffffffffffffffffffff5f541633036124a657565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b6002600154146124e3576002600155565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b9080601f83011215611c8357816020612526933591016123a1565b90565b9081610100910312611c835760e06040519161254483612280565b805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b6040519061259b82612264565b5f6060838281528260208201528260408201520152565b604051906125bf82612280565b5f60e0838281528260208201528260408201528260608201528260808201528260a08201528260c08201520152565b8051156125fb5760200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8051600110156125fb5760400190565b9081537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e60018201527f554c5f2300000000000000000000000000000000000000000000000000000000602182015260250190565b6020915f9160025afa60203d141615611c83575f5190565b906101006040928383606083015e60055afa60403d141615611c8357565b9060806101009260115afa6101003d1416156126db57565b6389083b915f526004601cfd5b6126f061258e565b506040810180516060830191825191801580612784575b61277d577f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab8311156127755760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab03905290565b60ff5f612738565b5050505090565b50821561270756fea26469706673582212203246b35261e5d236579f5dba729cd9ff8271475dbfa222de86a10e0dfcec9db864736f6c63430008210033"` +> **bytecode**: `string` = `"0x60a03461017957601f612f1938819003918201601f19168301916001600160401b0383118484101761017d578084926060946040528339810103126101795761004781610191565b90610060604061005960208401610191565b9201610191565b3315610166575f8054336001600160a01b0319821681178355604051959290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001805560036009556007600a556001600160a01b0316918215610140576001600160a01b0316908115610153576001600160a01b03169182156101405760805260018060a01b0319600254161760025560018060a01b03196003541617600355612d7390816101a682396080518181816101e601528181611536015281816116a7015281816121d201526125ae0152f35b82634726455360e11b5f5260045260245ffd5b50634726455360e11b5f5260045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101795756fe60806040526004361015610011575f80fd5b5f3560e01c806306433b1b146101b45780630d8b9eab146101af5780632399c309146101aa578063300b0b35146101a55780633b60288a146101a057806353f10a4b1461019b57806354fd4d50146101965780635ae48ba4146101915780635e1a03a21461018c5780636578b0cc14610187578063714897df14610182578063715018a61461017d5780637f39a939146101785780638da5cb5b14610173578063a3c570931461016e578063a74c1ca814610169578063a9ea199214610164578063aded17c51461015f578063b33a3a621461015a578063bc8efe7514610155578063c2e7cbdd14610150578063c5246bf51461014b578063c85501bb14610146578063e79e973914610141578063f2fde38b1461013c5763fc3c298e14610137575f80fd5b611359565b6112d9565b611263565b611246565b611194565b6110cd565b6110a7565b610fdd565b610d1d565b610cbb565b610c87565b610c49565b610c24565b610ade565b610a87565b610a6c565b6109c1565b61060f565b6105e9565b61058a565b61056d565b61053e565b610436565b6102bc565b61020a565b6101c7565b5f9103126101c357565b5f80fd5b346101c3575f3660031901126101c35760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101c3575f3660031901126101c357602060ff600b54166040519015158152f35b6001600160a01b038116036101c357565b6044359060ff821682036101c357565b60a4359060ff821682036101c357565b9181601f840112156101c35782359167ffffffffffffffff83116101c3576020808501948460051b0101116101c357565b9181601f840112156101c35782359167ffffffffffffffff83116101c357602083818601950101116101c357565b346101c35760e03660031901126101c3576004356024356102dc8161022c565b6102e461023d565b9160643567ffffffffffffffff81116101c35761030590369060040161025d565b60843567ffffffffffffffff81116101c35761032590369060040161025d565b9160a4359360c4359767ffffffffffffffff89116101c35761034e61035699369060040161028e565b9890976114a2565b005b634e487b7160e01b5f52604160045260245ffd5b6060810190811067ffffffffffffffff82111761038857604052565b610358565b6080810190811067ffffffffffffffff82111761038857604052565b610100810190811067ffffffffffffffff82111761038857604052565b90601f8019910116810190811067ffffffffffffffff82111761038857604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b926104246060939695926080865260808601906103e8565b95602085015260408401521515910152565b346101c35760203660031901126101c3576004355f52600660205260405f206040515f82548060011c91600182168015610534575b602084108114610520578385528492602084019190811561050757506001146104c9575b5061049c925003826103c6565b6104c56002830154926104b86004600383015492015460ff1690565b906040519485948561040c565b0390f35b90506104d8855f5260205f2090565b905f915b8483106104f0575061049c9350015f61048f565b8054828401528593506020909201916001016104dc565b60ff191682525061049c93151560051b0190505f61048f565b634e487b7160e01b5f52602260045260245ffd5b92607f169261046b565b346101c35760203660031901126101c3576004355f526007602052602060ff60405f2054166040519015158152f35b346101c3575f3660031901126101c3576020600a54604051908152f35b346101c3575f3660031901126101c3576104c56040516105ab6040826103c6565b601381527f424c5341676772656761746f722d342e312e300000000000000000000000000060208201526040519182916020835260208301906103e8565b346101c3575f3660031901126101c35760206001600160a01b0360025416604051908152f35b346101c35760a03660031901126101c35760243560043561062f8261022c565b60443567ffffffffffffffff81116101c35761064f90369060040161028e565b9060643560843567ffffffffffffffff81116101c35761067390369060040161028e565b9561067c611b89565b61069d6106916003546001600160a01b031690565b6001600160a01b031690565b331415806109a4575b610991576001600160a01b038116968715610975578615610966576106dd6106d6885f52600760205260405f2090565b5460ff1690565b61095157600954841061090b57600d84116108c5575f93849361075e92610705368a8a6118ca565b8051602091820120604080519283018d81526001600160a01b038916918401919091526060830191909152608082018590524660a0830152906107558160c081015b03601f1981018352826103c6565b51902091611c4e565b604051828161076e818989611900565b03925af161077a61190d565b90156108a357506107a3610796845f52600760205260405f2090565b805460ff19166001179055565b6107b86106916003546001600160a01b031690565b80610811575b506107ef610805917ff75669458e39b3e450bebdf8e3f8396a4ca0b4057017be244aa5af43321b28079336916118ca565b8051602091820120604051908152918291820190565b0390a361035660018055565b6001600160a01b031690813b156101c35760405163424a3d7760e01b815260048101859052915f908390602490829084905af190811561089e577ff75669458e39b3e450bebdf8e3f8396a4ca0b4057017be244aa5af43321b280793610805936107ef93610884575b50935091506107be565b806108925f610898936103c6565b806101b9565b5f61087a565b61181b565b60405163020c65b360e11b81529081906108c190866004840161193c565b0390fd5b6040516305519d6f60e51b815260206004820152601560248201527f5468726573686f6c642065786365656473206d617800000000000000000000006044820152606490fd5b6040516305519d6f60e51b815260206004820152601760248201527f5468726573686f6c642062656c6f77206d696e696d756d0000000000000000006044820152606490fd5b632776407360e11b5f52600487905260245b5ffd5b630992f7ad60e01b5f5260045ffd5b63d08525e960e01b5f526001600160a01b03821660045260245ffd5b63d86ad9cf60e01b5f523360045260245ffd5b506109b96106916001600160a01b035f541690565b3314156106a6565b346101c35760203660031901126101c3576001600160a01b036004356109e68161022c565b6109ee611db9565b168015610a3757600354816001600160a01b0382167fea8290e94fa93ea70e8ae04f89229012a6a3afb80b6b604792bb931c09cafcba5f80a36001600160a01b03191617600355005b6040516305519d6f60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b6044820152606490fd5b346101c3575f3660031901126101c3576020604051600d8152f35b346101c3575f3660031901126101c357610a9f611db9565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101c35760203660031901126101c357600435610afa611db9565b60028110610bde57600d8111610b9857600a548111610b5257600954604080519182526020820183905261035692917fb06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b9190a1600955565b6040516305519d6f60e51b815260206004820152601f60248201527f6d696e5468726573686f6c64203e2064656661756c745468726573686f6c64006044820152606490fd5b6040516305519d6f60e51b815260206004820152600f60248201527f5468726573686f6c64203e204d617800000000000000000000000000000000006044820152606490fd5b6040516305519d6f60e51b815260206004820152601560248201527f4d696e207468726573686f6c6420746f6f206c6f7700000000000000000000006044820152606490fd5b346101c3575f3660031901126101c35760206001600160a01b035f5416604051908152f35b346101c35760203660031901126101c35760043560ff81168091036101c3575f52600560205260206001600160a01b0360405f205416604051908152f35b346101c35760203660031901126101c3576004355f526008602052602060405f2054604051908152f35b801515036101c357565b346101c35760203660031901126101c3577f1a8b72448c86ca4cfd93a54c5ef39ab3afd44079dd8c7f304d6892dd8c52ed136020600435610cfb81610cb1565b610d03611db9565b151560ff19600b541660ff821617600b55604051908152a1005b346101c3576101c03660031901126101c357600435610d3b8161022c565b60803660231901126101c357610d4f61024d565b906101003660c31901126101c357816001600160a01b038216928315610fc95760ff82168015908115610fbe575b50610fa857610d966106915f546001600160a01b031690565b3314610f985750610db0610dac600b5460ff1690565b1590565b610f895782330361099157610dc5908261219d565b610dcd611ddf565b610dd8610dac612401565b610f7a57610de5816124f8565b905b6004610e04826001600160a01b03165f52600460205260405f2090565b0154600881901c60ff169081610f69575b50610f4857610e42610691610e358460ff165f52600560205260405f2090565b546001600160a01b031690565b838115159182610f5e575b5050610f485790610f2060ff92610ef0610e6561188f565b610e6e36611953565b815260ff8516602082015260016040820152610e9b836001600160a01b03165f52600460205260405f2090565b600460409160608451805183556020810151600184015584810151600284015501516003820155019160ff60208201511660ff198454161783550151151561ff00825491151560081b169061ff001916179055565b610f058360ff165f52600560205260405f2090565b906001600160a01b03166001600160a01b0319825416179055565b16907f544d98ba9bb0b5ddc2f49ab57954b76f6ff7ffba5e89a9bcb73bbf77ffa31ed35f80a3005b63558bc2f160e01b5f5260ff821660045260245ffd5b14159050835f610e4d565b60ff8481169116141590505f610e15565b6339c93aa560e11b5f5260045ffd5b632564727160e21b5f5260045ffd5b919050610fa3611ddf565b610de7565b63839797cd60e01b5f5260ff821660045260245ffd5b600d9150115f610d7d565b634726455360e11b5f90815260045260245ffd5b346101c35760203660031901126101c3576001600160a01b036004356110028161022c565b61100a611db9565b16805f526004602052600460405f200180549060ff8260081c16156110945761104461103860ff9360ff1690565b825461ff001916909255565b61106c61105c8260ff165f52600560205260405f2090565b80546001600160a01b0319169055565b16907f2cd272f77807374f441a41070466b148ec96b0a2426251231e1f61c1161f61b55f80a3005b8263590a9e9d60e11b5f5260045260245ffd5b346101c3575f3660031901126101c35760206001600160a01b0360035416604051908152f35b346101c35760203660031901126101c3576001600160a01b036004356110f28161022c565b6110fa6119c7565b50165f5260046020526040805f206104c561115161114b845161111c8161036c565b6004611127866119eb565b9586835201549060ff8083169283602084015260081c161515968791015260ff1690565b93151590565b60405193849384919260ff60a0929594606060c0860197805187526020810151602088015260408101516040880152015160608601521660808401521515910152565b346101c35760203660031901126101c3576004356111b0611db9565b600954811061120057600d8111610b9857600a54604080519182526020820183905261035692917fb06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b9190a1600a55565b6040516305519d6f60e51b815260206004820152601260248201527f42656c6f77206d696e5468726573686f6c6400000000000000000000000000006044820152606490fd5b346101c3575f3660031901126101c3576020600954604051908152f35b346101c35760203660031901126101c3576001600160a01b036004356112888161022c565b611290611db9565b168015610a3757600254816001600160a01b0382167f1f7cd67c986d0cce4aa6f69075b5278a05438ef2a5d1abf6eeded51ba81232455f80a36001600160a01b03191617600255005b346101c35760203660031901126101c3576001600160a01b036004356112fe8161022c565b611306611db9565b168015611346576001600160a01b035f548282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b346101c35760803660031901126101c35760043560443560243560643567ffffffffffffffff81116101c35761139390369060040161028e565b9091801561149357600954841061090b57600d84116108c5576113b59061258c565b84819592951061147e576104c561146c87876113f56107476113f06113dc8a8c018c611a82565b946040519283916020830160209181520190565b6129f4565b61143f611400611a97565b92611409611b13565b94611412612b74565b61141b86611b67565b5261142585611b67565b5061142f86611b67565b5261143985611b67565b50612bf4565b61144883611b79565b5261145282611b79565b5061145c83611b79565b5261146682611b79565b50612c98565b60405190151581529081906020820190565b636b01174760e11b5f5260045260245260445ffd5b637489a07960e11b5f5260045ffd5b9896919493929097956114b3611b89565b6114c86106916003546001600160a01b031690565b33141580611729575b610991578915610966576114f06106d68b5f52600760205260405f2090565b611715576115268983611518896107478f89888d8d604051988997602089019b46978d6117c6565b519020600a54908a8a611c4e565b8315611698576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b156101c3575f92838c6115868c8c898b986040519d8e9a8b998a98631b02e44f60e01b8a5260048a01611846565b03925af192831561089e577f5ce6898a418ad55caa812016e4cdd4a200158714e584a9627d17df3369316ef393611684575b50604080519182526020820192909252a15b6001600160a01b038416611671575b505050506115f2610796825f52600760205260405f2090565b6116076106916003546001600160a01b031690565b8061161a575b505061161860018055565b565b6001600160a01b0316803b156101c35760405163424a3d7760e01b815260048101929092525f908290602490829084905af1801561089e5761165d575b8061160d565b806108925f61166b936103c6565b5f611657565b61167b9385611d01565b5f8080806115d9565b806108925f611692936103c6565b5f6115b8565b50505050506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b156101c35760405163424a3d7760e01b815260048101879052905f908290602490829084905af1801561089e57611701575b506115ca565b806108925f61170f936103c6565b5f6116fb565b632776407360e11b5f5260048a905260245ffd5b5061173e6106916001600160a01b035f541690565b3314156114d1565b916020908281520191905f5b81811061175f5750505090565b9091926020806001926001600160a01b03873561177b8161022c565b168152019401929101611752565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116101c35760209260051b809284830137010190565b9593909460ff60c098946001600160a01b0361180395611811999e9d9c9e8b521660208a015216604088015260e0606088015260e0870191611746565b918483036080860152611789565b9460a08201520152565b6040513d5f823e3d90fd5b908060209392818452848401375f828201840152601f01601f1916010190565b939161186b906118799461188c9a98999793875260a0602088015260a0870191611746565b918483036040860152611789565b9360608201526080818503910152611826565b90565b604051906116186060836103c6565b60405190611618610180836103c6565b67ffffffffffffffff811161038857601f01601f191660200190565b9291926118d6826118ae565b916118e460405193846103c6565b8294818452818301116101c3578281602093845f960137010152565b908092918237015f815290565b3d15611937573d9061191e826118ae565b9161192c60405193846103c6565b82523d5f602084013e565b606090565b60409061188c9392815281602082015201906103e8565b60809060231901126101c3576040519061196c8261038d565b6024358252604435602083015260643560408301526084356060830152565b91908260809103126101c3576040516119a38161038d565b60608082948035845260208101356020850152604081013560408501520135910152565b604051906119d48261038d565b5f6060838281528260208201528260408201520152565b906040516119f88161038d565b6060600382948054845260018101546020850152600281015460408501520154910152565b9190826101009103126101c357604051611a36816103a9565b60e0808294803584526020810135602085015260408101356040850152606081013560608501526080810135608085015260a081013560a085015260c081013560c08501520135910152565b90610100828203126101c35761188c91611a1d565b60405160609190611aa883826103c6565b6002815291601f1901825f5b828110611ac057505050565b602090611acb6119c7565b82828501015201611ab4565b60405190611ae4826103a9565b5f60e0838281528260208201528260408201528260608201528260808201528260a08201528260c08201520152565b60405160609190611b2483826103c6565b6002815291601f1901825f5b828110611b3c57505050565b602090611b47611ad7565b82828501015201611b30565b634e487b7160e01b5f52603260045260245ffd5b805115611b745760200190565b611b53565b805160011015611b745760400190565b600260015414611b9a576002600155565b633ee5aeb560e01b5f5260045ffd5b91906040838203126101c35782359260208101359067ffffffffffffffff82116101c357019080601f830112156101c35781602061188c933591016118ca565b90816101009103126101c35760e060405191611c04836103a9565b805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b611c5d91939293810190611ba9565b90600954831061090b57600d83116108c557611c789061258c565b83819492941061147e57505091610dac916113f56107476113f06113dc87602080611ca89a518301019101611be9565b611cae57565b63729d0f6b60e01b5f5260045ffd5b9391906001600160a01b031684526003811015611ced5783606091602061188c9601528160408201520191611826565b634e487b7160e01b5f52602160045260245ffd5b92919360ff8516906003821015611ced57611d2a6106916106916002546001600160a01b031690565b803b156101c357611d56945f8094604051978895869485936303ce96a160e11b85528a60048601611cbd565b03925af190811561089e577f85137418138b73abf7daf3f3556f050e536be403436e0ee7649eaee69d1faaca926001600160a01b0392611da5575b5060405160ff9590951685521692602090a3565b806108925f611db3936103c6565b5f611d91565b6001600160a01b035f54163303611dcc57565b63118cdaa760e01b5f523360045260245ffd5b602435801580611f5e575b80611f54575b80611f4a575b611f3b5760443560643591608435925f806040516020810190611e50816107478a888b8b88929091610100949284526020840152604083015260608201525f60808201525f60a08201525f60c08201525f60e08201520190565b5190600b5afa611e5e61190d565b5015611f3b57604080516020810193845290810193909352606083015260808201929092527f73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff0000000160a08201525f918291611eba8160c08101610747565b5190600c5afa611ec861190d565b9015611f0e576080815103611f0e57602081015160408201519160806060820151910151911592831593611f31575b508215611f27575b508115611f1d575b50611f0e57565b6318a2a1df60e31b5f5260045ffd5b905015155f611f07565b151591505f611eff565b151592505f611ef7565b631d3d531b60e21b5f5260045ffd5b5060843515611df6565b5060643515611df0565b5060443515611dea565b519061161882610cb1565b908160209103126101c3575161188c81610cb1565b908160209103126101c3575161188c8161022c565b519063ffffffff821682036101c357565b519061ffff821682036101c357565b929192611fc9826118ae565b91611fd760405193846103c6565b8294818452818301116101c3578281602093845f96015e010152565b9080601f830112156101c357815161188c92602001611fbd565b51906116188261022c565b6020818303126101c35780519067ffffffffffffffff82116101c3570190610180828203126101c35761204961189e565b91805183526020810151602084015261206460408201611f9d565b604084015261207560608201611f9d565b606084015261208660808201611f9d565b608084015261209760a08201611f9d565b60a08401526120a860c08201611fae565b60c08401526120b960e08201611f68565b60e084015261010081015161010084015261012081015167ffffffffffffffff81116101c357610160926120ee918301611ff3565b610120840152612101610140820161200d565b610140840152015161016082015290565b51906fffffffffffffffffffffffffffffffff821682036101c357565b919060a0838203126101c35761214483612112565b9261215160208201612112565b92604082015165ffffffffffff811681036101c3579260608301519260808101519067ffffffffffffffff82116101c357019080601f830112156101c357815161188c92602001611fbd565b604051632474521560e21b81525f516020612d475f395f51905f5260048201526001600160a01b0382811660248301529192917f00000000000000000000000000000000000000000000000000000000000000001690602081604481855afa90811561089e575f916123d2575b50156123af57604051634133006760e11b8152602081600481855afa801561089e576001600160a01b03915f91612380575b50169081156123715760405163b5e936ab60e01b81525f516020612d475f395f51905f526004820152905f90829060249082905afa90811561089e575f9161234f575b50516040516318581cf760e11b81526001600160a01b03851660048201525f516020612d475f395f51905f52602482015290915f90829060449082905afa801561089e576fffffffffffffffffffffffffffffffff915f91612329575b50168181106122eb5750505050565b604051632fd6c42560e01b815260ff9390931660048401526001600160a01b0393909316602483015260448201929092526064810191909152608490fd5b61234591503d805f833e61233d81836103c6565b81019061212f565b505050505f6122dc565b61236b91503d805f833e61236381836103c6565b810190612018565b5f61227f565b63204cba0960e01b5f5260045ffd5b6123a2915060203d6020116123a8575b61239a81836103c6565b810190611f88565b5f61223c565b503d612390565b630945cae160e31b5f5260ff82166004526001600160a01b03831660245260445ffd5b6123f4915060203d6020116123fa575b6123ec81836103c6565b810190611f73565b5f61220a565b503d6123e2565b61188c61246160243560443560643560843591604051937f424c53313233383147315f584d443a5348412d3235365f504f505f76313a00006020860152603e850152605e840152607e830152609e820152609e81526113f060be826103c6565b612469611a97565b612471611b13565b9161247a612b74565b61248383611b67565b5261248d82611b67565b506124993660c4611a1d565b6124a284611b67565b526124ac83611b67565b5061143f6124bb36602461198b565b612bf4565b634e487b7160e01b5f52601160045260245ffd5b60ff1660ff81146124e55760010190565b6124c0565b90600182018092116124e557565b6001600160a01b03165f526004602052600460405f20015460ff8160081c16612574575060015b600d60ff8216111561254657610963600e5b63839797cd60e01b5f5260ff16600452602490565b612561610691610e358360ff165f52600560205260405f2090565b1561188c5761256f906124d4565b61251f565b60ff1690565b60ff5f199116019060ff82116124e557565b6125946119c7565b915f9180600d1c6128da57604051634133006760e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169190602081600481865afa801561089e576001600160a01b03915f916128bb575b50169182156123715760405163b5e936ab60e01b81525f516020612d475f395f51905f5260048201525f81602481855afa90811561089e575f916128a1575b5092909251915f936001925b600d60ff8516111561265a5750505050501561149357565b919397909296946001856126706125748b61257a565b1c16156128935761268f610e358960ff165f52600560205260405f2090565b916001600160a01b0383161561287d576126ba836001600160a01b03165f52600460205260405f2090565b926126d0610dac600486015460ff9060081c1690565b61286757604051632474521560e21b81525f516020612d475f395f51905f5260048201526001600160a01b03821660248201526020816044818a5afa90811561089e575f91612849575b5015612827576040516318581cf760e11b81526001600160a01b03821660048201525f516020612d475f395f51905f5260248201525f81604481895afa801561089e576fffffffffffffffffffffffffffffffff915f91612809575b50168b81106127d1575050816127af575050612791906119eb565b966127a66127a06001966124ea565b976124d4565b92909391612642565b6127cb6127a0916127c56127a694999c956119eb565b90612d0d565b996124ea565b604051632fd6c42560e01b815260ff8c1660048201526001600160a01b039290921660248301526044820152606481018b9052608490fd5b61281d91503d805f833e61233d81836103c6565b505050505f612776565b630945cae160e31b5f5260ff8a166004526001600160a01b031660245260445ffd5b612861915060203d81116123fa576123ec81836103c6565b5f61271a565b63173ec76f60e31b5f5260ff8a1660045260245ffd5b63173ec76f60e31b5f5260ff891660045260245ffd5b94966127a6909891986124d4565b6128b591503d805f833e61236381836103c6565b5f612636565b6128d4915060203d6020116123a85761239a81836103c6565b5f6125f7565b610963600e612531565b5f81537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e600182015263554c5f2360e01b602182015260250190565b600181537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e600182015263554c5f2360e01b602182015260250190565b9081537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e600182015263554c5f2360e01b602182015260250190565b6020915f9160025afa60203d1416156101c3575f5190565b906101006040928383606083015e60055afa60403d1416156101c357565b9060806101009260115afa6101003d1416156129e757565b6389083b915f526004601cfd5b906129fd611ad7565b916040516101008101916040368437612a4581519161014084019281602001845e518301600160f81b61014082015283612a3d61014260ff1993016128e4565b030184612999565b9283602052838152610120830193612a6b60ff1985612a6388612920565b030183612999565b8452600260016020865b8051851886520191612a9660ff1988612a8e848c61295d565b030186612999565b8352019160098314612aae5791602060019192612a75565b5050506040612b36926020612b4e96838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e0840152612b1283826129b1565b612b1f60408401826129b1565b612b2c60808401826129b1565b60c08301906129b1565b612b4084826129cf565b8361010001906080016129cf565b6101008261020081600d5afa6101003d141615612b6757565b63c55e5e335f526004601cfd5b612b7c6119c7565b906f17f1d3a73197d7942695638c4fa9ac0f82527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208301526f08b3f481e3aaa0f1a09e30ed741d8ae460408301527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e16060830152565b612bfc6119c7565b506040810180516060830191825191801580612c90575b612c89577f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab831115612c815760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab03905290565b60ff5f612c44565b5050505090565b508215612c13565b919082519160405193808303915f5b82868214612cd85790610100602060019301946080602084610180028c0192828951855e8901015191015e01612ca7565b505094602092505f9150846101800290600f5afa9160203d14915114161615612d00575f5190565b634df45e2f5f526004601cfd5b919060809081612d1b6119c7565b94855e8184015e60808261010081600b5afa60803d141615612d3957565b63d6cc76eb5f526004601cfdfe3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514da164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/BLSHelpers.md b/api/@aastar/core/variables/BLSHelpers.md index afdefb14b..fdff0d04a 100644 --- a/api/@aastar/core/variables/BLSHelpers.md +++ b/api/@aastar/core/variables/BLSHelpers.md @@ -1,6 +1,6 @@ > `const` **BLSHelpers**: `object` -Defined in: [packages/core/src/crypto/blsSigner.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/crypto/blsSigner.ts#L76) +Defined in: [packages/core/src/crypto/blsSigner.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L76) Helper functions for creating BLS proofs for Registry and BLSAggregator operations @@ -60,6 +60,38 @@ Proof structure: (bytes pkG1, bytes sigG2, bytes msgG2, uint256 signerMask) `` `0x${string}` `` +### ~~encodeDVTProof()~~ + +> **encodeDVTProof**(`signerMask`, `aggregatedSignature`): `` `0x${string}` `` + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `signerMask` | `bigint` | Bitmask of contributing slots (see [slotsToSignerMask](#slotstosignermask)). | +| `aggregatedSignature` | `` `0x${string}` `` | The BLS12-381 aggregated G2 signature (`sigG2`). | + +#### Returns + +`` `0x${string}` `` + +#### Deprecated + +SUPERSEDED by the explicit-`nodeIds` DVT wire (airaccount-contract +#110, LIVE-verified). The DEPLOYED verifier decodes an explicit `nodeIds` list + +256-byte `blsSig`, NOT this `(signerMask, sigG2)` ABI tuple. Use +import('./dvtWire').encodeDVTVerifierProof (verifier-level) or +import('./dvtWire').encodeDVTAccountSignature (account-level) instead. +Retained for backward compatibility only. + +Encode a DVT co-sign proof (early `signerMask` design, hub #42, decision B). + +Under decision B the on-chain verifier recomputes `msgG2 = hashToG2(userOpHash)` +itself and rebuilds the aggregate public key from `signerMask` → registered +keys, so the proof carries ONLY `(signerMask, sigG2)`. pkG1 and msgG2 are NOT +included — this is intentionally narrower than the v3 [encodeBLSProof](#encodeblsproof) +still used by the slash/reputation path. + ### encodeReputationProof() > **encodeReputationProof**(`signature`, `publicKey`, `signerMask`): `` `0x${string}` `` @@ -78,3 +110,38 @@ Matches format: (signature, publicKey, signerMask) #### Returns `` `0x${string}` `` + +### ~~slotsToSignerMask()~~ + +> **slotsToSignerMask**(`slots`): `bigint` + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `slots` | `number`[] | Registration slots (1-indexed, `>= 1`) of the contributing signers. | + +#### Returns + +`bigint` + +The uint256 signerMask. + +#### Deprecated + +SUPERSEDED by the explicit-`nodeIds` DVT wire (airaccount-contract +#110, LIVE-verified). The DEPLOYED `AAStarBLSAlgorithm` verifier takes an explicit +list of `bytes32` `nodeId`s, NOT a `signerMask` bitmask — `signerMask` was an early +design that the landed contract did not adopt. Use +import('./dvtWire').encodeDVTAccountSignature / +import('./dvtWire').encodeDVTVerifierProof instead. Retained for backward +compatibility with the legacy aggregator path only. + +Build a DVT co-sign `signerMask` from registration slots (frozen DVT program +spec, hub YetAnotherAA-Validator#42). + +The on-chain BLSAggregator addresses signers by REGISTRATION SLOT, not by +key-array index: bit `i` (LSB = 0) corresponds to slot `i + 1` (1-indexed) → +`validatorAtSlot[i + 1]`. So a validator registered at slot `s` sets bit `s - 1`. +Using a 0-indexed array position instead makes the contract rebuild the WRONG +aggregate public key → verification always fails. diff --git a/api/@aastar/core/variables/BLSValidatorABI.md b/api/@aastar/core/variables/BLSValidatorABI.md index 70229bdda..690d230f9 100644 --- a/api/@aastar/core/variables/BLSValidatorABI.md +++ b/api/@aastar/core/variables/BLSValidatorABI.md @@ -1,3 +1,3 @@ > `const` **BLSValidatorABI**: `any` -Defined in: [packages/core/src/abis/index.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L87) +Defined in: [packages/core/src/abis/index.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L125) diff --git a/api/@aastar/core/variables/BLSValidatorArtifact.md b/api/@aastar/core/variables/BLSValidatorArtifact.md index 1a1af0292..09c13d707 100644 --- a/api/@aastar/core/variables/BLSValidatorArtifact.md +++ b/api/@aastar/core/variables/BLSValidatorArtifact.md @@ -1,6 +1,6 @@ > `const` **BLSValidatorArtifact**: `object` = `BLSValidatorABIData` -Defined in: [packages/core/src/abis/index.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L88) +Defined in: [packages/core/src/abis/index.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L126) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:88](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60808060405234601557610ae4908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c806354fd4d50146100bb5763b8e72af61461002f575f80fd5b346100b75760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100b75760043567ffffffffffffffff81116100b75761007e90369060040161016a565b6024359067ffffffffffffffff82116100b7576020926100a56100ad93369060040161016a565b9290916103ca565b6040519015158152f35b5f80fd5b346100b7575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100b75760406100f481610206565b906012825260208201917f424c5356616c696461746f722d302e332e32000000000000000000000000000083527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8351948593602085525180918160208701528686015e5f85828601015201168101030190f35b9181601f840112156100b75782359167ffffffffffffffff83116100b757602083818601950101116100b757565b60405190610100820182811067ffffffffffffffff8211176101b957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051906080820182811067ffffffffffffffff8211176101b957604052565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff8211176101b957604052565b92919267ffffffffffffffff82116101b95761028d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601610206565b93828552828201116100b757815f926020928387013784010152565b9080601f830112156100b7578160206102c49335910161024a565b90565b90816101009103126100b75760e06102dd610198565b91805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b6103306101e6565b905f82525f60208301525f60408301525f6060830152565b610350610198565b905f82525f60208301525f60408301525f60608301525f60808301525f60a08301525f60c08301525f60e0830152565b80511561038d5760200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b80516001101561038d5760400190565b93929060c081106109a75781156109a75784016080858203126100b757843567ffffffffffffffff81116100b757816104049187016102a9565b94602081013567ffffffffffffffff81116100b757826104259183016102a9565b91604082013567ffffffffffffffff81116100b75761044492016102a9565b926080868051810103126100b7576104a86104986104b09360806104666101e6565b9960208101518b52604081015160208c0152606081015160408c0152015160608a0152602080825183010191016102c7565b94602080825183010191016102c7565b92369161024a565b6104b8610348565b90604051610100810191604036843761056360678383519361014082019481602001865e5181017f01000000000000000000000000000000000000000000000000000000000000006101408201525f6101428201537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e6101438201527f554c5f23000000000000000000000000000000000000000000000000000000006101638201520301846109af565b9283602052838152610120830193600185536101218401907f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e82526101418501917f554c5f2300000000000000000000000000000000000000000000000000000000835260205f60458660025afa60203d1416156100b7575f51865290916045916101458701919060026020895b8051881889520190808b537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e83527f554c5f2300000000000000000000000000000000000000000000000000000000845260205f878a60025afa60203d1416156100b7575f518252600101956009871461066f5795906020906105f1565b5050505050505060406106fb92602061071396838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e08401526106d783826109c7565b6106e460408401826109c7565b6106f160808401826109c7565b60c08301906109c7565b61070583826109e5565b8261010001906080016109e5565b6101008161020081600d5afa6101003d14161561099a5780518251149081610987575b81610974575b81610961575b8161094e575b8161093b575b81610928575b81610916575b501561090f5761076a6060610206565b60028152936040925f5b8481106108f857506107866060610206565b93600285525f5b8181106108e157505090610845916107a3610328565b6f17f1d3a73197d7942695638c4fa9ac0f81527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1606082015261082188610380565b5261082b87610380565b5061083585610380565b5261083f84610380565b50610a0a565b61084e856103ba565b52610858846103ba565b50610862826103ba565b5261086c816103ba565b508291835192604051948303915f5b828682146108ac5790610100602060019301946080602084610180028c0192828951855e8901015191015e0161087b565b505094602092505f9150846101800290600f5afa9160203d149151141616156108d4575f5190565b634df45e2f5f526004601cfd5b6020906108ec610348565b8282890101520161078d565b602090610903610328565b82828a01015201610774565b505f925050565b60e09150015160e0820151145f61075a565b905060c081015160c08301511490610754565b905060a081015160a0830151149061074e565b9050608081015160808301511490610748565b9050606081015160608301511490610742565b905060408101516040830151149061073c565b9050602081015160208301511490610736565b63c55e5e335f526004601cfd5b505f93505050565b6020915f9160025afa60203d1416156100b7575f5190565b906101006040928383606083015e60055afa60403d1416156100b757565b9060806101009260115afa6101003d1416156109fd57565b6389083b915f526004601cfd5b610a12610328565b506040810180516060830191825191801580610aa6575b610a9f577f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab831115610a975760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab03905290565b60ff5f610a5a565b5050505090565b508215610a2956fea26469706673582212201009eff984a0e8599c516f860f3f2d5ebe1d257bb06b20ba0d4f59e9b88dcdd664736f6c63430008210033"` +> **bytecode**: `string` = `"0x608080604052346015576109b5908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c806354fd4d501461009d5763b8e72af61461002f575f80fd5b346100995760403660031901126100995760043567ffffffffffffffff811161009957610060903690600401610110565b6024359067ffffffffffffffff82116100995760209261008761008f933690600401610110565b929091610302565b6040519015158152f35b5f80fd5b34610099575f3660031901126100995760406100b881610193565b906012825260208201917f424c5356616c696461746f722d302e332e32000000000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b9181601f840112156100995782359167ffffffffffffffff8311610099576020838186019501011161009957565b60405190610100820182811067ffffffffffffffff82111761015f57604052565b634e487b7160e01b5f52604160045260245ffd5b604051906080820182811067ffffffffffffffff82111761015f57604052565b6040519190601f01601f1916820167ffffffffffffffff81118382101761015f57604052565b92919267ffffffffffffffff821161015f576101de601f8301601f1916602001610193565b938285528282011161009957815f926020928387013784010152565b9080601f8301121561009957816020610215933591016101b9565b90565b90816101009103126100995760e061022e61013e565b91805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b610281610173565b905f82525f60208301525f60408301525f6060830152565b6102a161013e565b905f82525f60208301525f60408301525f60608301525f60808301525f60a08301525f60c08301525f60e0830152565b8051156102de5760200190565b634e487b7160e01b5f52603260045260245ffd5b8051600110156102de5760400190565b93929060c0811061087857811561087857840160808582031261009957843567ffffffffffffffff8111610099578161033c9187016101fa565b94602081013567ffffffffffffffff8111610099578261035d9183016101fa565b91604082013567ffffffffffffffff81116100995761037c92016101fa565b92608086805181010312610099576103e06103d06103e893608061039e610173565b9960208101518b52604081015160208c0152606081015160408c0152015160608a015260208082518301019101610218565b9460208082518301019101610218565b9236916101b9565b6103f0610299565b90604051610100810191604036843761046660678383519361014082019481602001865e518101600160f81b6101408201525f6101428201537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e61014382015263554c5f2360e01b610163820152030184610880565b9283602052838152610120830193600185536101218401907f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e825261014185019163554c5f2360e01b835260205f60458660025afa60203d141615610099575f51865290916045916101458701919060026020895b8051881889520190808b537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e835263554c5f2360e01b845260205f878a60025afa60203d141615610099575f51825260010195600987146105405795906020906104db565b5050505050505060406105cc9260206105e496838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e08401526105a88382610898565b6105b56040840182610898565b6105c26080840182610898565b60c0830190610898565b6105d683826108b6565b8261010001906080016108b6565b6101008161020081600d5afa6101003d14161561086b5780518251149081610858575b81610845575b81610832575b8161081f575b8161080c575b816107f9575b816107e7575b50156107e05761063b6060610193565b60028152936040925f5b8481106107c957506106576060610193565b93600285525f5b8181106107b25750509061071691610674610279565b6f17f1d3a73197d7942695638c4fa9ac0f81527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e160608201526106f2886102d1565b526106fc876102d1565b50610706856102d1565b52610710846102d1565b506108db565b61071f856102f2565b52610729846102f2565b50610733826102f2565b5261073d816102f2565b508291835192604051948303915f5b8286821461077d5790610100602060019301946080602084610180028c0192828951855e8901015191015e0161074c565b505094602092505f9150846101800290600f5afa9160203d149151141616156107a5575f5190565b634df45e2f5f526004601cfd5b6020906107bd610299565b8282890101520161065e565b6020906107d4610279565b82828a01015201610645565b505f925050565b60e09150015160e0820151145f61062b565b905060c081015160c08301511490610625565b905060a081015160a0830151149061061f565b9050608081015160808301511490610619565b9050606081015160608301511490610613565b905060408101516040830151149061060d565b9050602081015160208301511490610607565b63c55e5e335f526004601cfd5b505f93505050565b6020915f9160025afa60203d141615610099575f5190565b906101006040928383606083015e60055afa60403d14161561009957565b9060806101009260115afa6101003d1416156108ce57565b6389083b915f526004601cfd5b6108e3610279565b506040810180516060830191825191801580610977575b610970577f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab8311156109685760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab03905290565b60ff5f61092b565b5050505090565b5082156108fa56fea264697066735822122099a4bef546e35f7f419e6d425305ce27139d0f4e1e6ddc9748f154840fe1abc364736f6c63430008210033"` diff --git a/api/@aastar/core/variables/BLS_AGGREGATOR_ADDRESS.md b/api/@aastar/core/variables/BLS_AGGREGATOR_ADDRESS.md index 7703e8a08..b28638868 100644 --- a/api/@aastar/core/variables/BLS_AGGREGATOR_ADDRESS.md +++ b/api/@aastar/core/variables/BLS_AGGREGATOR_ADDRESS.md @@ -1,3 +1,3 @@ > **BLS\_AGGREGATOR\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L39) +Defined in: [packages/core/src/constants.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L39) diff --git a/api/@aastar/core/variables/BLS_POP_DST.md b/api/@aastar/core/variables/BLS_POP_DST.md new file mode 100644 index 000000000..ae23979ac --- /dev/null +++ b/api/@aastar/core/variables/BLS_POP_DST.md @@ -0,0 +1,13 @@ +> `const` **BLS\_POP\_DST**: `"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"` = `'BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_'` + +Defined in: [packages/core/src/crypto/hashToField.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L16) + +Frozen cross-repo DST (Domain Separation Tag) for the BLS-signature +Proof-of-Possession (POP) scheme. This MUST be byte-identical across: + - SuperPaymaster contracts/src/utils/BLS.sol (dstPrime) + - AAStar SDK this file + - YetAnotherAA-Validator src/utils/bls.util.ts (BLS_DST) + +NOTE: @noble/curves's `bls.G2.defaults.DST` is the `_NUL_` variant +("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_"); we deliberately override +it with the `_POP_` variant to match the on-chain contract. diff --git a/api/@aastar/core/variables/BLS_VALIDATOR_ADDRESS.md b/api/@aastar/core/variables/BLS_VALIDATOR_ADDRESS.md index 0b3710a56..8d5fafe60 100644 --- a/api/@aastar/core/variables/BLS_VALIDATOR_ADDRESS.md +++ b/api/@aastar/core/variables/BLS_VALIDATOR_ADDRESS.md @@ -1,3 +1,3 @@ > **BLS\_VALIDATOR\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L40) +Defined in: [packages/core/src/constants.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L40) diff --git a/api/@aastar/core/variables/BPS_DENOMINATOR.md b/api/@aastar/core/variables/BPS_DENOMINATOR.md index c99c74688..cea79f1ee 100644 --- a/api/@aastar/core/variables/BPS_DENOMINATOR.md +++ b/api/@aastar/core/variables/BPS_DENOMINATOR.md @@ -1,3 +1,3 @@ > `const` **BPS\_DENOMINATOR**: `10000` = `10000` -Defined in: [packages/core/src/constants.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L82) +Defined in: [packages/core/src/constants.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L88) diff --git a/api/@aastar/core/variables/BRANDING.md b/api/@aastar/core/variables/BRANDING.md index d0281896b..e28fe83e1 100644 --- a/api/@aastar/core/variables/BRANDING.md +++ b/api/@aastar/core/variables/BRANDING.md @@ -1,6 +1,6 @@ > `const` **BRANDING**: `object` -Defined in: [packages/core/src/branding.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/branding.ts#L5) +Defined in: [packages/core/src/branding.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/branding.ts#L5) AAStar Community Branding Configuration diff --git a/api/@aastar/core/variables/BREAD_COMMUNITY.md b/api/@aastar/core/variables/BREAD_COMMUNITY.md index db1231b77..428cb66ff 100644 --- a/api/@aastar/core/variables/BREAD_COMMUNITY.md +++ b/api/@aastar/core/variables/BREAD_COMMUNITY.md @@ -1,6 +1,6 @@ > `const` **BREAD\_COMMUNITY**: [`CommunityConfig`](../interfaces/CommunityConfig.md) -Defined in: [packages/core/src/communities.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L53) +Defined in: [packages/core/src/communities.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L53) Bread Community - Independent AOA Paymaster mode diff --git a/api/@aastar/core/variables/CANONICAL_ADDRESSES.md b/api/@aastar/core/variables/CANONICAL_ADDRESSES.md new file mode 100644 index 000000000..e8fc0150a --- /dev/null +++ b/api/@aastar/core/variables/CANONICAL_ADDRESSES.md @@ -0,0 +1,449 @@ +> `const` **CANONICAL\_ADDRESSES**: `object` + +Defined in: [packages/core/src/addresses.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L17) + +## Type Declaration + +### 10 + +> `readonly` **10**: `object` + +#### 10.aaStarBLSAggregator + +> `readonly` **aaStarBLSAggregator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.aaStarBLSAlgorithm + +> `readonly` **aaStarBLSAlgorithm**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.aaStarValidator + +> `readonly` **aaStarValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentRegistry + +> `readonly` **agentRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentValidationRegistry + +> `readonly` **agentValidationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountDelegate + +> `readonly` **airAccountDelegate**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountExtension + +> `readonly` **airAccountExtension**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountFactoryV7 + +> `readonly` **airAccountFactoryV7**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountV7Impl + +> `readonly` **airAccountV7Impl**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.aPNTs + +> `readonly` **aPNTs**: `"0x0B41C78081B5A141eb4C3C7E7FD8E58A7Bde553B"` = `"0x0B41C78081B5A141eb4C3C7E7FD8E58A7Bde553B"` + +#### 10.blsAggregator + +> `readonly` **blsAggregator**: `"0x1C305372ecc5a36CBef1FA371392234bCD55eB19"` = `"0x1C305372ecc5a36CBef1FA371392234bCD55eB19"` + +#### 10.blsValidator + +> `readonly` **blsValidator**: `"0xA88ADec5A8dc422B57488272d5aD5913d728942A"` = `"0xA88ADec5A8dc422B57488272d5aD5913d728942A"` + +#### 10.calldataParserRegistry + +> `readonly` **calldataParserRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.dvtValidator + +> `readonly` **dvtValidator**: `"0x31Ede6454a56293f7cf2323CA5d5F9a6230558Fb"` = `"0x31Ede6454a56293f7cf2323CA5d5F9a6230558Fb"` + +#### 10.entryPoint + +> `readonly` **entryPoint**: `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 10.forceExitModule + +> `readonly` **forceExitModule**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.gToken + +> `readonly` **gToken**: `"0x8d6Fe002dDacCcFBD377F684EC1825f2E1ab7ef6"` = `"0x8d6Fe002dDacCcFBD377F684EC1825f2E1ab7ef6"` + +#### 10.microPaymentChannel + +> `readonly` **microPaymentChannel**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.paymasterFactory + +> `readonly` **paymasterFactory**: `"0x58A7F6E44a57028A255794119F8b37124c9a7eB8"` = `"0x58A7F6E44a57028A255794119F8b37124c9a7eB8"` + +#### 10.paymasterV4 + +> `readonly` **paymasterV4**: `"0x67a70a578E142b950987081e7016906ae4F56Df4"` = `"0x67a70a578E142b950987081e7016906ae4F56Df4"` + +#### 10.paymasterV4Impl + +> `readonly` **paymasterV4Impl**: `"0xc4dd13F7825409EEC13FBCBdD9D8f6d618207cca"` = `"0xc4dd13F7825409EEC13FBCBdD9D8f6d618207cca"` + +#### 10.pnts + +> `readonly` **pnts**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.policyRegistry + +> `readonly` **policyRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.priceFeed + +> `readonly` **priceFeed**: `"0x13e3Ee699D1909E989722E753853AE30b17e08c5"` = `"0x13e3Ee699D1909E989722E753853AE30b17e08c5"` + +#### 10.registry + +> `readonly` **registry**: `"0x997686219F31405503D32728B1f094F115EF24e7"` = `"0x997686219F31405503D32728B1f094F115EF24e7"` + +#### 10.reputationSystem + +> `readonly` **reputationSystem**: `"0xA9560898dC0eE4F9Ed3F1db17dbf74dE65e925c2"` = `"0xA9560898dC0eE4F9Ed3F1db17dbf74dE65e925c2"` + +#### 10.sbt + +> `readonly` **sbt**: `"0x28eBFc5fc03B1d7648254AbF1C7B39DbFdef1a94"` = `"0x28eBFc5fc03B1d7648254AbF1C7B39DbFdef1a94"` + +#### 10.sessionKeyValidator + +> `readonly` **sessionKeyValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` = `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` + +#### 10.staking + +> `readonly` **staking**: `"0x7A1216C2d814D2389698C64eD23AA1aA9Eb6343E"` = `"0x7A1216C2d814D2389698C64eD23AA1aA9Eb6343E"` + +#### 10.superPaymaster + +> `readonly` **superPaymaster**: `"0xA2c9A6e95f19f5D2a364CBCbB5f0b32B1B4d140E"` = `"0xA2c9A6e95f19f5D2a364CBCbB5f0b32B1B4d140E"` + +#### 10.timelockController + +> `readonly` **timelockController**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.x402Facilitator + +> `readonly` **x402Facilitator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"0x864971a26384d9DCC7115f0bBC428e2623F28b6e"` = `"0x864971a26384d9DCC7115f0bBC428e2623F28b6e"` + +### 11155111 + +> `readonly` **11155111**: `object` + +#### 11155111.aaStarBLSAggregator + +> `readonly` **aaStarBLSAggregator**: `"0x77f7bf95B8602b7851f392F412257539242947e0"` = `"0x77f7bf95B8602b7851f392F412257539242947e0"` + +#### 11155111.aaStarBLSAlgorithm + +> `readonly` **aaStarBLSAlgorithm**: `"0x68c381Ad3A2e3380F22840008027E9Ec2783F43A"` = `"0x68c381Ad3A2e3380F22840008027E9Ec2783F43A"` + +#### 11155111.aaStarValidator + +> `readonly` **aaStarValidator**: `"0xC20A986Bcd5bF5Cc2fE5fFde6b155B8419E0389e"` = `"0xC20A986Bcd5bF5Cc2fE5fFde6b155B8419E0389e"` + +#### 11155111.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `"0x8004A818BFB912233c491871b3d84c89A494BD9e"` = `"0x8004A818BFB912233c491871b3d84c89A494BD9e"` + +#### 11155111.agentRegistry + +> `readonly` **agentRegistry**: `"0x3895b3E6fEf4e121E6289dC7881A0eEd5283C652"` = `"0x3895b3E6fEf4e121E6289dC7881A0eEd5283C652"` + +#### 11155111.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `"0x8004B663056A597Dffe9eCcC1965A193B7388713"` = `"0x8004B663056A597Dffe9eCcC1965A193B7388713"` + +#### 11155111.agentValidationRegistry + +> `readonly` **agentValidationRegistry**: `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"` = `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"` + +#### 11155111.airAccountDelegate + +> `readonly` **airAccountDelegate**: `"0xA8D7f70c9D36bC4a4eb14F0dCEE19053FCB3309f"` = `"0xA8D7f70c9D36bC4a4eb14F0dCEE19053FCB3309f"` + +#### 11155111.airAccountExtension + +> `readonly` **airAccountExtension**: `"0xD61C0F3DE6D98070E9986743d35A56d56855A249"` = `"0xD61C0F3DE6D98070E9986743d35A56d56855A249"` + +#### 11155111.airAccountFactoryV7 + +> `readonly` **airAccountFactoryV7**: `"0x52c5190E7308Ea9B149157FF016cC99B6C6bf984"` = `"0x52c5190E7308Ea9B149157FF016cC99B6C6bf984"` + +#### 11155111.airAccountV7Impl + +> `readonly` **airAccountV7Impl**: `"0x7fe62d512f0b8238DE6Ff17175DcE40eA312bBF2"` = `"0x7fe62d512f0b8238DE6Ff17175DcE40eA312bBF2"` + +#### 11155111.aPNTs + +> `readonly` **aPNTs**: `"0x9e66B457E0ABb1F139FD8A596d00f784eBA2873b"` = `"0x9e66B457E0ABb1F139FD8A596d00f784eBA2873b"` + +#### 11155111.blsAggregator + +> `readonly` **blsAggregator**: `"0x15387e161c1b3dAe7c66Fbd5c1F32837B58B2e79"` = `"0x15387e161c1b3dAe7c66Fbd5c1F32837B58B2e79"` + +#### 11155111.blsValidator + +> `readonly` **blsValidator**: `"0x0A71C5a32b8CBC517523D2C88b539Ab22AeF0654"` = `"0x0A71C5a32b8CBC517523D2C88b539Ab22AeF0654"` + +#### 11155111.calldataParserRegistry + +> `readonly` **calldataParserRegistry**: `"0xb8Af1C039dF88F6bD9fE36Ca683492a3c09e7D17"` = `"0xb8Af1C039dF88F6bD9fE36Ca683492a3c09e7D17"` + +#### 11155111.dvtValidator + +> `readonly` **dvtValidator**: `"0x19BA9829C784E4A41b68960b9c0bA55f83718997"` = `"0x19BA9829C784E4A41b68960b9c0bA55f83718997"` + +#### 11155111.entryPoint + +> `readonly` **entryPoint**: `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 11155111.forceExitModule + +> `readonly` **forceExitModule**: `"0xd882a16Ea37Be463D1885EF4a397Dbbf157dC211"` = `"0xd882a16Ea37Be463D1885EF4a397Dbbf157dC211"` + +#### 11155111.gToken + +> `readonly` **gToken**: `"0x20a051502a7AE6e40cfFd6EBe59057538E698984"` = `"0x20a051502a7AE6e40cfFd6EBe59057538E698984"` + +#### 11155111.microPaymentChannel + +> `readonly` **microPaymentChannel**: `"0x405851A141Cde827E33247d4D4089Af2814c2FF5"` = `"0x405851A141Cde827E33247d4D4089Af2814c2FF5"` + +#### 11155111.paymasterFactory + +> `readonly` **paymasterFactory**: `"0x0Aa06EA5295eeD4D48c93c594Db1CBf3626971A5"` = `"0x0Aa06EA5295eeD4D48c93c594Db1CBf3626971A5"` + +#### 11155111.paymasterV4 + +> `readonly` **paymasterV4**: `"0x1f0D4eF151a79948070D387BaC43b1321F0c41e3"` = `"0x1f0D4eF151a79948070D387BaC43b1321F0c41e3"` + +#### 11155111.paymasterV4Impl + +> `readonly` **paymasterV4Impl**: `"0x59DCA5861aaDA602fE1BFbfcc36DFAc36C58623d"` = `"0x59DCA5861aaDA602fE1BFbfcc36DFAc36C58623d"` + +#### 11155111.pnts + +> `readonly` **pnts**: `"0xC687f8a115D308ECD39658a8EE33bC3c8F75EE31"` = `"0xC687f8a115D308ECD39658a8EE33bC3c8F75EE31"` + +#### 11155111.policyRegistry + +> `readonly` **policyRegistry**: `"0x8c2488d46d5447418558c38AA6441720df656094"` = `"0x8c2488d46d5447418558c38AA6441720df656094"` + +#### 11155111.priceFeed + +> `readonly` **priceFeed**: `"0x694AA1769357215DE4FAC081bf1f309aDC325306"` = `"0x694AA1769357215DE4FAC081bf1f309aDC325306"` + +#### 11155111.registry + +> `readonly` **registry**: `"0x3F920B25f8b65988359C372F66F036E48adFc556"` = `"0x3F920B25f8b65988359C372F66F036E48adFc556"` + +#### 11155111.reputationSystem + +> `readonly` **reputationSystem**: `"0x7fEd690E1663755e24a1C9d6164336809d68a578"` = `"0x7fEd690E1663755e24a1C9d6164336809d68a578"` + +#### 11155111.sbt + +> `readonly` **sbt**: `"0x072A0D12f4212B6baD7c6d0A633eaffbDE9105bF"` = `"0x072A0D12f4212B6baD7c6d0A633eaffbDE9105bF"` + +#### 11155111.sessionKeyValidator + +> `readonly` **sessionKeyValidator**: `"0x70de2e36004d6Ddc24DEB80e1Ef76c03EdC0c2AE"` = `"0x70de2e36004d6Ddc24DEB80e1Ef76c03EdC0c2AE"` + +#### 11155111.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` = `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` + +#### 11155111.staking + +> `readonly` **staking**: `"0x3B363598746Ea57314d4869B160940948c569D48"` = `"0x3B363598746Ea57314d4869B160940948c569D48"` + +#### 11155111.superPaymaster + +> `readonly` **superPaymaster**: `"0x030025f40d509b1a99547bAEb3795bD27F7182b7"` = `"0x030025f40d509b1a99547bAEb3795bD27F7182b7"` + +#### 11155111.timelockController + +> `readonly` **timelockController**: `"0xB734df3c0A1809bc06708512363D368Ac51dF1A2"` = `"0xB734df3c0A1809bc06708512363D368Ac51dF1A2"` + +#### 11155111.x402Facilitator + +> `readonly` **x402Facilitator**: `"0x326Fc3413c8A0185b0179B971C69813B6dFD971B"` = `"0x326Fc3413c8A0185b0179B971C69813B6dFD971B"` + +#### 11155111.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"0xCec3655525a112882E74Fb7C26AcB267a07724cb"` = `"0xCec3655525a112882E74Fb7C26AcB267a07724cb"` + +### 11155420 + +> `readonly` **11155420**: `object` + +#### 11155420.aaStarBLSAggregator + +> `readonly` **aaStarBLSAggregator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.aaStarBLSAlgorithm + +> `readonly` **aaStarBLSAlgorithm**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.aaStarValidator + +> `readonly` **aaStarValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentRegistry + +> `readonly` **agentRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentValidationRegistry + +> `readonly` **agentValidationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountDelegate + +> `readonly` **airAccountDelegate**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountExtension + +> `readonly` **airAccountExtension**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountFactoryV7 + +> `readonly` **airAccountFactoryV7**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountV7Impl + +> `readonly` **airAccountV7Impl**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.aPNTs + +> `readonly` **aPNTs**: `"0x3BBcA92Ad828b3dD619c980Ba09f929b9d2BC440"` = `"0x3BBcA92Ad828b3dD619c980Ba09f929b9d2BC440"` + +#### 11155420.blsAggregator + +> `readonly` **blsAggregator**: `"0x6e06b17b1a4D2D973F7E3e026e24b4393315736c"` = `"0x6e06b17b1a4D2D973F7E3e026e24b4393315736c"` + +#### 11155420.blsValidator + +> `readonly` **blsValidator**: `"0x260fa905CcE1f5b29Afe9d627c01fAAE4A66A7F5"` = `"0x260fa905CcE1f5b29Afe9d627c01fAAE4A66A7F5"` + +#### 11155420.calldataParserRegistry + +> `readonly` **calldataParserRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.dvtValidator + +> `readonly` **dvtValidator**: `"0x0087cA806109E150438116cAA414580BB5fa9195"` = `"0x0087cA806109E150438116cAA414580BB5fa9195"` + +#### 11155420.entryPoint + +> `readonly` **entryPoint**: `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 11155420.forceExitModule + +> `readonly` **forceExitModule**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.gToken + +> `readonly` **gToken**: `"0xC341c88453372021d0221834307613c2e99fE718"` = `"0xC341c88453372021d0221834307613c2e99fE718"` + +#### 11155420.microPaymentChannel + +> `readonly` **microPaymentChannel**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.paymasterFactory + +> `readonly` **paymasterFactory**: `"0x1e3b9d12eAc27867a523d0537902441B0E7D98d8"` = `"0x1e3b9d12eAc27867a523d0537902441B0E7D98d8"` + +#### 11155420.paymasterV4 + +> `readonly` **paymasterV4**: `"0xf250416C940605a1D423ccd059668219cf7D80ea"` = `"0xf250416C940605a1D423ccd059668219cf7D80ea"` + +#### 11155420.paymasterV4Impl + +> `readonly` **paymasterV4Impl**: `"0x906123080207F250B1C9F299991512Cb31f35b2f"` = `"0x906123080207F250B1C9F299991512Cb31f35b2f"` + +#### 11155420.pnts + +> `readonly` **pnts**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.policyRegistry + +> `readonly` **policyRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.priceFeed + +> `readonly` **priceFeed**: `"0x61Ec26aA57019C486B10502285c5A3D4A4750AD7"` = `"0x61Ec26aA57019C486B10502285c5A3D4A4750AD7"` + +#### 11155420.registry + +> `readonly` **registry**: `"0xcf6860Ab57de8669756997e414D9c52B6e301972"` = `"0xcf6860Ab57de8669756997e414D9c52B6e301972"` + +#### 11155420.reputationSystem + +> `readonly` **reputationSystem**: `"0x891EC0f84D9275839B8dAf74e87B23F2DBd7f9c9"` = `"0x891EC0f84D9275839B8dAf74e87B23F2DBd7f9c9"` + +#### 11155420.sbt + +> `readonly` **sbt**: `"0x2c3Ca1553dC1B8870381E8E56C7b3e3A3ae162f0"` = `"0x2c3Ca1553dC1B8870381E8E56C7b3e3A3ae162f0"` + +#### 11155420.sessionKeyValidator + +> `readonly` **sessionKeyValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `"0x91E6060613810449d098b0b5EC8b51A0fe8C8985"` = `"0x91E6060613810449d098b0b5EC8b51A0fe8C8985"` + +#### 11155420.staking + +> `readonly` **staking**: `"0x5f57B931C849e8E255F22755506eB2255aB22a7C"` = `"0x5f57B931C849e8E255F22755506eB2255aB22a7C"` + +#### 11155420.superPaymaster + +> `readonly` **superPaymaster**: `"0x9eC1FE8134A1C05aD34ba2E4e8758dAe0a009B94"` = `"0x9eC1FE8134A1C05aD34ba2E4e8758dAe0a009B94"` + +#### 11155420.timelockController + +> `readonly` **timelockController**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.x402Facilitator + +> `readonly` **x402Facilitator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"0x7792a49C9E91e0E9B631B27D885d15e971B7482A"` = `"0x7792a49C9E91e0E9B631B27D885d15e971B7482A"` diff --git a/api/@aastar/core/variables/CHAIN_MAINNET.md b/api/@aastar/core/variables/CHAIN_MAINNET.md index b2eef4a33..1654b4b2b 100644 --- a/api/@aastar/core/variables/CHAIN_MAINNET.md +++ b/api/@aastar/core/variables/CHAIN_MAINNET.md @@ -1,3 +1,3 @@ > `const` **CHAIN\_MAINNET**: `1` = `1` -Defined in: [packages/core/src/constants.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L96) +Defined in: [packages/core/src/constants.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L102) diff --git a/api/@aastar/core/variables/CHAIN_SEPOLIA.md b/api/@aastar/core/variables/CHAIN_SEPOLIA.md index 156fe87b6..da734e235 100644 --- a/api/@aastar/core/variables/CHAIN_SEPOLIA.md +++ b/api/@aastar/core/variables/CHAIN_SEPOLIA.md @@ -1,3 +1,3 @@ > `const` **CHAIN\_SEPOLIA**: `11155111` = `11155111` -Defined in: [packages/core/src/constants.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L95) +Defined in: [packages/core/src/constants.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L101) diff --git a/api/@aastar/core/variables/COMMUNITIES.md b/api/@aastar/core/variables/COMMUNITIES.md index 4e6458f08..17e2fe727 100644 --- a/api/@aastar/core/variables/COMMUNITIES.md +++ b/api/@aastar/core/variables/COMMUNITIES.md @@ -1,5 +1,5 @@ > `const` **COMMUNITIES**: `Record`\<`string`, [`CommunityConfig`](../interfaces/CommunityConfig.md)\> -Defined in: [packages/core/src/communities.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/communities.ts#L69) +Defined in: [packages/core/src/communities.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L69) All communities indexed by address diff --git a/api/@aastar/core/variables/COMMUNITY_OWNERS.md b/api/@aastar/core/variables/COMMUNITY_OWNERS.md index 5cf81699c..f578e7221 100644 --- a/api/@aastar/core/variables/COMMUNITY_OWNERS.md +++ b/api/@aastar/core/variables/COMMUNITY_OWNERS.md @@ -1,6 +1,6 @@ > `const` **COMMUNITY\_OWNERS**: `object` -Defined in: [packages/core/src/contract-addresses.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L93) +Defined in: [packages/core/src/contract-addresses.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L99) Community Owner Addresses diff --git a/api/@aastar/core/variables/CONTRACTS.md b/api/@aastar/core/variables/CONTRACTS.md index a1b7f90cc..6e7b7ecad 100644 --- a/api/@aastar/core/variables/CONTRACTS.md +++ b/api/@aastar/core/variables/CONTRACTS.md @@ -1,6 +1,6 @@ > `const` **CONTRACTS**: `object` -Defined in: [packages/core/src/contracts.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L101) +Defined in: [packages/core/src/contracts.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L101) All supported networks @@ -70,6 +70,14 @@ BreadCommunity - Test community for development (registered: 2025-11-03) > `readonly` **core**: `object` = `CORE_ADDRESSES` +#### sepolia.core.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +#### sepolia.core.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + #### sepolia.core.aPNTs > `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` @@ -90,6 +98,10 @@ BreadCommunity - Test community for development (registered: 2025-11-03) > `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` +#### sepolia.core.microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + #### sepolia.core.mySBT > `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` diff --git a/api/@aastar/core/variables/CONTRACT_METADATA.md b/api/@aastar/core/variables/CONTRACT_METADATA.md index b5874c485..7d5b5e2e2 100644 --- a/api/@aastar/core/variables/CONTRACT_METADATA.md +++ b/api/@aastar/core/variables/CONTRACT_METADATA.md @@ -1,6 +1,6 @@ > `const` **CONTRACT\_METADATA**: `object` -Defined in: [packages/core/src/contracts.ts:332](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L332) +Defined in: [packages/core/src/contracts.ts:332](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L332) Contract deployment metadata diff --git a/api/@aastar/core/variables/CONTRACT_SRC_HASH.md b/api/@aastar/core/variables/CONTRACT_SRC_HASH.md index e57412fc3..bc5944115 100644 --- a/api/@aastar/core/variables/CONTRACT_SRC_HASH.md +++ b/api/@aastar/core/variables/CONTRACT_SRC_HASH.md @@ -1,5 +1,5 @@ > **CONTRACT\_SRC\_HASH**: `any` -Defined in: [packages/core/src/constants.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L28) +Defined in: [packages/core/src/constants.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L28) Contract Addresses (Priority: ENV > Local Config > Canonical Defaults) diff --git a/api/@aastar/core/variables/CORE_ADDRESSES.md b/api/@aastar/core/variables/CORE_ADDRESSES.md index 405b204ce..f8e473d7c 100644 --- a/api/@aastar/core/variables/CORE_ADDRESSES.md +++ b/api/@aastar/core/variables/CORE_ADDRESSES.md @@ -1,11 +1,19 @@ > `const` **CORE\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L29) +Defined in: [packages/core/src/contract-addresses.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L32) Core System Addresses ## Type Declaration +### agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +### agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + ### aPNTs > `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` @@ -26,6 +34,10 @@ Core System Addresses > `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` +### microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + ### mySBT > `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` diff --git a/api/@aastar/core/variables/CalldataParserRegistryABI.md b/api/@aastar/core/variables/CalldataParserRegistryABI.md new file mode 100644 index 000000000..62df73266 --- /dev/null +++ b/api/@aastar/core/variables/CalldataParserRegistryABI.md @@ -0,0 +1,3 @@ +> `const` **CalldataParserRegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:220](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L220) diff --git a/api/@aastar/core/variables/CalldataParserRegistryArtifact.md b/api/@aastar/core/variables/CalldataParserRegistryArtifact.md new file mode 100644 index 000000000..88075eb6e --- /dev/null +++ b/api/@aastar/core/variables/CalldataParserRegistryArtifact.md @@ -0,0 +1,9 @@ +> `const` **CalldataParserRegistryArtifact**: `object` = `CalldataParserRegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:221](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L221) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/core/variables/DEFAULT_ADMIN_ROLE.md b/api/@aastar/core/variables/DEFAULT_ADMIN_ROLE.md index 84ba4046d..e858005f6 100644 --- a/api/@aastar/core/variables/DEFAULT_ADMIN_ROLE.md +++ b/api/@aastar/core/variables/DEFAULT_ADMIN_ROLE.md @@ -1,6 +1,6 @@ > `const` **DEFAULT\_ADMIN\_ROLE**: [`Hash`](https://viem.sh/docs/index.html) = `'0x0000000000000000000000000000000000000000000000000000000000000000'` -Defined in: [packages/core/src/roles.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L16) +Defined in: [packages/core/src/roles.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L16) Default Admin Role (OpenZeppelin AccessControl) diff --git a/api/@aastar/core/variables/DEFAULT_APNTS_PRICE_USD.md b/api/@aastar/core/variables/DEFAULT_APNTS_PRICE_USD.md index a27acf647..c00d65180 100644 --- a/api/@aastar/core/variables/DEFAULT_APNTS_PRICE_USD.md +++ b/api/@aastar/core/variables/DEFAULT_APNTS_PRICE_USD.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_APNTS\_PRICE\_USD**: `"0.02"` = `"0.02"` -Defined in: [packages/core/src/constants.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L94) +Defined in: [packages/core/src/constants.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L100) diff --git a/api/@aastar/core/variables/DEFAULT_CALL_GAS_LIMIT.md b/api/@aastar/core/variables/DEFAULT_CALL_GAS_LIMIT.md index adf2c4f59..a79b86c65 100644 --- a/api/@aastar/core/variables/DEFAULT_CALL_GAS_LIMIT.md +++ b/api/@aastar/core/variables/DEFAULT_CALL_GAS_LIMIT.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_CALL\_GAS\_LIMIT**: `100000n` = `100000n` -Defined in: [packages/core/src/constants.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L100) +Defined in: [packages/core/src/constants.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L106) diff --git a/api/@aastar/core/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md b/api/@aastar/core/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md index 5039d63a4..b9d67d173 100644 --- a/api/@aastar/core/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md +++ b/api/@aastar/core/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_GAS\_TOKEN\_MINT\_AMOUNT**: `"100"` = `"100"` -Defined in: [packages/core/src/constants.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L83) +Defined in: [packages/core/src/constants.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L89) diff --git a/api/@aastar/core/variables/DEFAULT_PRE_VERIFICATION_GAS.md b/api/@aastar/core/variables/DEFAULT_PRE_VERIFICATION_GAS.md index 9aee65ffc..add190f39 100644 --- a/api/@aastar/core/variables/DEFAULT_PRE_VERIFICATION_GAS.md +++ b/api/@aastar/core/variables/DEFAULT_PRE_VERIFICATION_GAS.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_PRE\_VERIFICATION\_GAS**: `50000n` = `50000n` -Defined in: [packages/core/src/constants.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L101) +Defined in: [packages/core/src/constants.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L107) diff --git a/api/@aastar/core/variables/DEFAULT_TIMEOUT_MS.md b/api/@aastar/core/variables/DEFAULT_TIMEOUT_MS.md index 8d0aef0c1..40ffd8c09 100644 --- a/api/@aastar/core/variables/DEFAULT_TIMEOUT_MS.md +++ b/api/@aastar/core/variables/DEFAULT_TIMEOUT_MS.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_TIMEOUT\_MS**: `30000` = `30000` -Defined in: [packages/core/src/constants.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L102) +Defined in: [packages/core/src/constants.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L108) diff --git a/api/@aastar/core/variables/DEFAULT_TOKEN_NAME.md b/api/@aastar/core/variables/DEFAULT_TOKEN_NAME.md index 0435c7a50..859f5c9eb 100644 --- a/api/@aastar/core/variables/DEFAULT_TOKEN_NAME.md +++ b/api/@aastar/core/variables/DEFAULT_TOKEN_NAME.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_TOKEN\_NAME**: `"Governance Token"` = `'Governance Token'` -Defined in: [packages/core/src/constants.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L98) +Defined in: [packages/core/src/constants.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L104) diff --git a/api/@aastar/core/variables/DEFAULT_TOKEN_SYMBOL.md b/api/@aastar/core/variables/DEFAULT_TOKEN_SYMBOL.md index 8ec2ee5d5..fec27c763 100644 --- a/api/@aastar/core/variables/DEFAULT_TOKEN_SYMBOL.md +++ b/api/@aastar/core/variables/DEFAULT_TOKEN_SYMBOL.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_TOKEN\_SYMBOL**: `"GT"` = `'GT'` -Defined in: [packages/core/src/constants.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L97) +Defined in: [packages/core/src/constants.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L103) diff --git a/api/@aastar/core/variables/DEFAULT_USDT_MINT_AMOUNT.md b/api/@aastar/core/variables/DEFAULT_USDT_MINT_AMOUNT.md index 8c85d82fd..475e03b57 100644 --- a/api/@aastar/core/variables/DEFAULT_USDT_MINT_AMOUNT.md +++ b/api/@aastar/core/variables/DEFAULT_USDT_MINT_AMOUNT.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_USDT\_MINT\_AMOUNT**: `"10"` = `"10"` -Defined in: [packages/core/src/constants.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L84) +Defined in: [packages/core/src/constants.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L90) diff --git a/api/@aastar/core/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md b/api/@aastar/core/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md index fca2bcb39..2370cb75f 100644 --- a/api/@aastar/core/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md +++ b/api/@aastar/core/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md @@ -1,3 +1,3 @@ > `const` **DEFAULT\_VERIFICATION\_GAS\_LIMIT**: `200000n` = `200000n` -Defined in: [packages/core/src/constants.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L99) +Defined in: [packages/core/src/constants.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L105) diff --git a/api/@aastar/core/variables/DVTValidatorABI.md b/api/@aastar/core/variables/DVTValidatorABI.md index 82622e25a..44dc59686 100644 --- a/api/@aastar/core/variables/DVTValidatorABI.md +++ b/api/@aastar/core/variables/DVTValidatorABI.md @@ -1,3 +1,3 @@ > `const` **DVTValidatorABI**: `any` -Defined in: [packages/core/src/abis/index.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L81) +Defined in: [packages/core/src/abis/index.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L119) diff --git a/api/@aastar/core/variables/DVTValidatorArtifact.md b/api/@aastar/core/variables/DVTValidatorArtifact.md index 4ac76b96a..4dcb8deca 100644 --- a/api/@aastar/core/variables/DVTValidatorArtifact.md +++ b/api/@aastar/core/variables/DVTValidatorArtifact.md @@ -1,6 +1,6 @@ > `const` **DVTValidatorArtifact**: `object` = `DVTValidatorABIData` -Defined in: [packages/core/src/abis/index.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L82) +Defined in: [packages/core/src/abis/index.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L120) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:82](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60a0346100cf57601f610f8038819003918201601f19168301916001600160401b038311848410176100d3578084926020946040528339810103126100cf57516001600160a01b038116908190036100cf5733156100bc575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600455608052610e9890816100e8823960805181610b3f0152f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c908163013cf08b14610b635750806306433b1b14610b1357806308f41334146108b65780632ab09d1414610898578063424a3d77146107a75780634d238c8e1461073857806354fd4d5014610696578063715018a6146106185780638da5cb5b146105e55780638e24bc9a1461026c578063bc95910114610208578063c06f58e8146101d4578063f2fde38b146101045763facd743b146100b8575f80fd5b346101015760206003193601126101015760ff604060209273ffffffffffffffffffffffffffffffffffffffff6100ed610df3565b168152600284522054166040519015158152f35b80fd5b50346101015760206003193601126101015773ffffffffffffffffffffffffffffffffffffffff610133610df3565b61013b610e16565b1680156101a85773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b5034610101578060031936011261010157602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346101015760206003193601126101015773ffffffffffffffffffffffffffffffffffffffff610237610df3565b61023f610e16565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600154161760015580f35b503461010157606060031936011261010157610286610df3565b60243560ff81168082036105e15760443567ffffffffffffffff81116105dd576102b4903690600401610dc5565b949094338252600260205260ff604083205416156105b557600454947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff861461058857600190818701600455868452600360205273ffffffffffffffffffffffffffffffffffffffff60408520911695867fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782557fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff000000000000000000000000000000000000000083549260a01b169116178155019167ffffffffffffffff821161055b576103aa8354610c92565b601f8111610509575b5090816020978795949391601f8411600114610444579289949281927f876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b1355235979592610439575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b604051908152a3604051908152f35b013590505f806103f8565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084168584528a8420935b8181106104ef57509260019285927f876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b135523598968d9896106104b7575b505050811b01905561042a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88560031b161c199101351690555f80806104aa565b8284013585558a9850600190940193918b01918b01610470565b828111156103b3579683825260208220601f840160051c9060208510610553575b810198601f0160051c03825b818110610545575050966103b3565b80846001928c015501610536565b83915061052a565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6004827f2ec5b449000000000000000000000000000000000000000000000000000000008152fd5b8480fd5b8380fd5b503461010157806003193601126101015773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b5034610101578060031936011261010157610631610e16565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346101015780600319360112610101576040516040810181811067ffffffffffffffff82111761070b576107079250604052601281527f44565456616c696461746f722d302e332e3200000000000000000000000000006020820152604051918291602083526020830190610d51565b0390f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b50346101015760206003193601126101015773ffffffffffffffffffffffffffffffffffffffff610767610df3565b61076f610e16565b16815260026020526040812060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905580f35b50346101015760206003193601126101015760043573ffffffffffffffffffffffffffffffffffffffff60015416330361083a5780825260036020526002604083200160017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8280a280f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f6e6c7920424c532041676772656761746f72000000000000000000000000006044820152fd5b50346101015780600319360112610101576020600454604051908152f35b5034610aaf5760a0600319360112610aaf5760043560243567ffffffffffffffff8111610aaf576108eb903690600401610d94565b60443567ffffffffffffffff8111610aaf5761090b903690600401610d94565b91909260843567ffffffffffffffff8111610aaf5761092e903690600401610dc5565b949091865f52600360205260405f209360ff600286015416610aeb5773ffffffffffffffffffffffffffffffffffffffff60015416945497853b15610aaf57819060ff6040519a7f2399c309000000000000000000000000000000000000000000000000000000008c5260e48c019260048d015273ffffffffffffffffffffffffffffffffffffffff811660248d015260a01c1660448b015260e060648b015252610104880191905f905b808210610ab3575050506003198782030160848801528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8511610aaf578660208196947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8a5f9b8c988698889b60051b809289830137019460643560a489015260031987898803010160c489015281878701526040860137878580838701010152011601010301925af18015610aa457610a96575080f35b610aa291505f90610ce3565b005b6040513d5f823e3d90fd5b5f80fd5b90919283359073ffffffffffffffffffffffffffffffffffffffff8216809203610aaf576020816001938293520194019201906109d9565b7f997a3f56000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610aaf575f600319360112610aaf57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610aaf576020600319360112610aaf576004355f52600360205260405f2090815490600183015f90805490610b9882610c92565b8085529160018116908115610c4d5750600114610c10575b505060ff60028195610bc785610c04950386610ce3565b01541691604051948473ffffffffffffffffffffffffffffffffffffffff879616865260a01c166020850152608060408501526080840190610d51565b90151560608301520390f35b5f908152602081209092505b818310610c33575050810160200160ff6002610bb0565b600181602092949394548385880101520191019190610c1c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208087019190915292151560051b8501909201925060ff915060029050610bb0565b90600182811c92168015610cd9575b6020831014610cac57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610ca1565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610d2457604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b9181601f84011215610aaf5782359167ffffffffffffffff8311610aaf576020808501948460051b010111610aaf57565b9181601f84011215610aaf5782359167ffffffffffffffff8311610aaf5760208381860195010111610aaf57565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610aaf57565b73ffffffffffffffffffffffffffffffffffffffff5f54163303610e3657565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea26469706673582212203c109cfaafc36e5fe2ac49a746f73f7df035a32881c425f5a6ea9da4652ee34764736f6c63430008210033"` +> **bytecode**: `string` = `"0x60a0346100e457601f61161f38819003918201601f19168301916001600160401b038311848410176100e8578084926020946040528339810103126100e457516001600160a01b038116908190036100e45733156100d1575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600160045560805261152290816100fd82396080518181816105b60152818161098001528181610e2f01526112cb0152f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c908163013cf08b14610e535750806306433b1b14610e1057806308f4133414610bc55780632ab09d1414610ba7578063349a2c261461091f57806340a141ff14610892578063424a3d77146108005780634d238c8e1461058a57806354fd4d5014610525578063715018a6146104d35780638da5cb5b146104ad5780638e24bc9a14610244578063bc959101146101c7578063c06f58e8146101a0578063f2fde38b1461010d5763facd743b146100ce575f80fd5b3461010a57602036600319011261010a5760ff60406020926001600160a01b036100f6611057565b168152600284522054166040519015158152f35b80fd5b503461010a57602036600319011261010a576001600160a01b0361012f611057565b6101376114cf565b16801561018c57815473ffffffffffffffffffffffffffffffffffffffff198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b503461010a578060031936011261010a5760206001600160a01b0360015416604051908152f35b503461010a57602036600319011261010a576101e1611057565b6101e96114cf565b6001600160a01b03600154911690816001600160a01b0382167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48580a373ffffffffffffffffffffffffffffffffffffffff19161760015580f35b503461010a57606036600319011261010a5761025e611057565b60243560ff81168082036104a95760443567ffffffffffffffff81116104a55761028c903690600401611029565b939094610298336112a3565b600454945f198614610491576001868101600455868352600360205260408320805474ffffffffffffffffffffffffffffffffffffffffff19166001600160a01b039590951694851760a09790971b60ff60a01b1696909617865592949283019167ffffffffffffffff821161047d576103128354610f66565b601f811161042b575b509081602098889695949391601f84116001146103a05792808b96937f876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b135523598969360029692610395575b50508160011b915f199060031b1c19161790555b01805461ffff1916610100179055604051908152a3604051908152f35b013590505f80610364565b91601f1984168584528b8420935b8181106104115750938b96937f876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b135523598969360019383600298106103f8575b505050811b019055610378565b01355f19600384901b60f8161c191690555f80806103eb565b8284013585558b9950600190940193918c01918c016103ae565b8281111561031b579783825260208220601f840160051c9060208510610475575b810199601f0160051c03825b8181106104675750509761031b565b80846001928d015501610458565b83915061044c565b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b82526011600452602482fd5b8480fd5b8380fd5b503461010a578060031936011261010a576001600160a01b036020915416604051908152f35b503461010a578060031936011261010a576104ec6114cf565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461010a578060031936011261010a5750610586604051610548604082610f9e565b601281527f44565456616c696461746f722d302e362e3000000000000000000000000000006020820152604051918291602083526020830190610fd4565b0390f35b503461010a57602036600319011261010a576105a4611057565b6105ac6114cf565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160a01b0360405192632474521560e21b84525f5160206114f65f395f51905f5260048501521691826024820152602081604481855afa90811561073c5784916107c6575b50156107b757604051634133006760e11b8152602081600481855afa801561073c576001600160a01b03918591610788575b50169081156107795783806024926040519384809263b5e936ab60e01b82525f5160206114f65f395f51905f5260048301525afa91821561076c578192610747575b5060449192604051928380926318581cf760e11b82528760048301525f5160206114f65f395f51905f5260248301525afa801561073c576001600160801b03918591610716575b50169051908181106107005750508152600260205260408120805460ff1916600117905580f35b630208a00560e01b845260045260245250604490fd5b61073291503d8087833e61072a8183610f9e565b810190611232565b505050505f6106d9565b6040513d86823e3d90fd5b60449250610766903d8084833e61075e8183610f9e565b8101906110f0565b91610692565b50604051903d90823e3d90fd5b63204cba0960e01b8452600484fd5b6107aa915060203d6020116107b0575b6107a28183610f9e565b81019061107a565b5f610650565b503d610798565b638453659560e01b8352600483fd5b90506020813d6020116107f8575b816107e160209383610f9e565b810103126104a9576107f29061106d565b5f61061e565b3d91506107d4565b503461010a57602036600319011261010a576004356001600160a01b0360015416330361088357808252600360205260026040832001805460ff8160081c16156108745760ff191660011790557f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8280a280f35b636ce3c70160e11b8452600484fd5b63598c379b60e11b8252600482fd5b503461010a57602036600319011261010a576001600160a01b036108b4611057565b6108bc6114cf565b16808252600260205260ff6040832054161561090d57808252600260205260408220805460ff191690557fe1434e25d6611e0db941968fdc97811c982ac1602e951637d206f5fdda9dd8f18280a280f35b6337603bef60e01b8252600452602490fd5b503461010a57602036600319011261010a576001600160a01b03610941611057565b16808252600260205260ff6040832054161561090d57604051632474521560e21b81525f5160206114f65f395f51905f526004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082604481845afa91821561073c578492610b6b575b50604051634133006760e11b8152602081600481855afa8015610b15576001600160a01b03918691610b4c575b5016908115610b3d5784806024926040519384809263b5e936ab60e01b82525f5160206114f65f395f51905f5260048301525afa91821561076c578192610b20575b5060449192604051928380926318581cf760e11b82528860048301525f5160206114f65f395f51905f5260248301525afa918215610b155783918693610af5575b5081610ae0575b50610acc577f367bc3cec9a81b642b69cb2ec83e77eb3f403ab741030d9d98afc27999443077916001600160801b03604092858752600260205283872060ff19815416905583519215158352166020820152a280f35b63c23285bd60e01b84526004839052602484fd5b9050516001600160801b03821610155f610a76565b610b0a9193503d8088833e61072a8183610f9e565b50505050915f610a6f565b6040513d87823e3d90fd5b60449250610b37903d8084833e61075e8183610f9e565b91610a2e565b63204cba0960e01b8552600485fd5b610b65915060203d6020116107b0576107a28183610f9e565b5f6109ec565b9091506020813d602011610b9f575b81610b8760209383610f9e565b810103126104a957610b989061106d565b905f6109bf565b3d9150610b7a565b503461010a578060031936011261010a576020600454604051908152f35b5034610d8f5760a0366003190112610d8f5760043560243567ffffffffffffffff8111610d8f57610bfa903690600401610ff8565b9060443567ffffffffffffffff8111610d8f57610c1b903690600401610ff8565b60849391933567ffffffffffffffff8111610d8f57610c3e903690600401611029565b90916001600160a01b03600154169384331415808091610df9575b610dea57610ddc575b875f52600360205260405f20600281015460ff8160081c1615610dcd5760ff16610dbe575497853b15610d8f57819060ff6040519a632399c30960e01b8c5260e48c019260048d01526001600160a01b03811660248d015260a01c1660448b015260e060648b015252610104880195905f905b808210610d93575050508685036003190160848801528085527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111610d8f57866020819694845f99958a968598859760051b809287830137019260643560a487015260031985878603010160c48701528185850152604084013781810183018301869052601f01601f191601010301925af18015610d8457610d76575080f35b610d8291505f90610f9e565b005b6040513d5f823e3d90fd5b5f80fd5b9091968735906001600160a01b038216809203610d8f57602081600193829352019801920190610cd5565b634cbd1fab60e11b5f5260045ffd5b636ce3c70160e11b5f5260045ffd5b610de5336112a3565b610c62565b631a75945360e21b5f5260045ffd5b50335f52600260205260ff60405f20541615610c59565b34610d8f575f366003190112610d8f5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610d8f576020366003190112610d8f576004355f52600360205260405f2090815490600183015f90805490610e8882610f66565b8085529160018116908115610f3e5750600114610f00575b5050610ee6600260ff95610eb78588950386610f9e565b01549260405195856001600160a01b03889716875260a01c16602086015260a0604086015260a0850190610fd4565b918181161515606085015260081c16151560808301520390f35b5f908152602081209092505b818310610f245750508101602001610ee66002610ea0565b600181602092949394548385880101520191019190610f0c565b60ff191660208087019190915292151560051b85019092019250610ee6915060029050610ea0565b90600182811c92168015610f94575b6020831014610f8057565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610f75565b90601f8019910116810190811067ffffffffffffffff821117610fc057604052565b634e487b7160e01b5f52604160045260245ffd5b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f84011215610d8f5782359167ffffffffffffffff8311610d8f576020808501948460051b010111610d8f57565b9181601f84011215610d8f5782359167ffffffffffffffff8311610d8f5760208381860195010111610d8f57565b600435906001600160a01b0382168203610d8f57565b51908115158203610d8f57565b90816020910312610d8f57516001600160a01b0381168103610d8f5790565b519063ffffffff82168203610d8f57565b92919267ffffffffffffffff8211610fc057604051916110d4601f8201601f191660200184610f9e565b829481845281830111610d8f578281602093845f96015e010152565b602081830312610d8f5780519067ffffffffffffffff8211610d8f570161018081830312610d8f5760405191610180830183811067ffffffffffffffff821117610fc057604052815183526020820151602084015261115160408301611099565b604084015261116260608301611099565b606084015261117360808301611099565b608084015261118460a08301611099565b60a084015260c082015161ffff81168103610d8f5760c08401526111aa60e0830161106d565b60e084015261010082015161010084015261012082015167ffffffffffffffff8111610d8f5782019080601f83011215610d8f5781516111ec926020016110aa565b610120830152610140810151906001600160a01b0382168203610d8f5761016091610140840152015161016082015290565b51906001600160801b0382168203610d8f57565b919060a083820312610d8f576112478361121e565b926112546020820161121e565b92604082015165ffffffffffff81168103610d8f579260608301519260808101519067ffffffffffffffff8211610d8f57019080601f83011215610d8f5781516112a0926020016110aa565b90565b6001600160a01b0316805f52600260205260ff60405f205416156114bd576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690604051632474521560e21b81525f5160206114f65f395f51905f526004820152816024820152602081604481865afa908115610d84575f91611483575b501561147157604051634133006760e11b8152602081600481865afa8015610d84576001600160a01b03915f91611452575b5016908115611443575f6024936040519485809263b5e936ab60e01b82525f5160206114f65f395f51905f5260048301525afa928315610d84575f93611425575b505f906044604051809481936318581cf760e11b835260048301525f5160206114f65f395f51905f5260248301525afa8015610d84576001600160801b03915f91611407575b50169051908181106113f2575050565b630208a00560e01b5f5260045260245260445ffd5b61141b91503d805f833e61072a8183610f9e565b505050505f6113e2565b5f91935061143c903d8084833e61075e8183610f9e565b929061139c565b63204cba0960e01b5f5260045ffd5b61146b915060203d6020116107b0576107a28183610f9e565b5f61135b565b636264d57f60e01b5f5260045260245ffd5b90506020813d6020116114b5575b8161149e60209383610f9e565b81010312610d8f576114af9061106d565b5f611329565b3d9150611491565b6337603bef60e01b5f5260045260245ffd5b6001600160a01b035f541633036114e257565b63118cdaa760e01b5f523360045260245ffdfe3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514da164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/DVT_TIER_T2.md b/api/@aastar/core/variables/DVT_TIER_T2.md new file mode 100644 index 000000000..b4e30398c --- /dev/null +++ b/api/@aastar/core/variables/DVT_TIER_T2.md @@ -0,0 +1,5 @@ +> `const` **DVT\_TIER\_T2**: `4` + +Defined in: [packages/core/src/crypto/dvtWire.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L43) + +DVT account-signature tier byte: P256 primary + ≥threshold BLS aggregate (DVT co-sign). diff --git a/api/@aastar/core/variables/DVT_TIER_T3.md b/api/@aastar/core/variables/DVT_TIER_T3.md new file mode 100644 index 000000000..1b0060e7b --- /dev/null +++ b/api/@aastar/core/variables/DVT_TIER_T3.md @@ -0,0 +1,5 @@ +> `const` **DVT\_TIER\_T3**: `5` + +Defined in: [packages/core/src/crypto/dvtWire.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L45) + +DVT account-signature tier byte: T2 + a trailing 65-byte guardian ECDSA signature. diff --git a/api/@aastar/core/variables/DVT_VALIDATOR_ADDRESS.md b/api/@aastar/core/variables/DVT_VALIDATOR_ADDRESS.md index 4d75d43e1..7a98f9764 100644 --- a/api/@aastar/core/variables/DVT_VALIDATOR_ADDRESS.md +++ b/api/@aastar/core/variables/DVT_VALIDATOR_ADDRESS.md @@ -1,3 +1,3 @@ > **DVT\_VALIDATOR\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L41) +Defined in: [packages/core/src/constants.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L41) diff --git a/api/@aastar/core/variables/ENTRY_POINT_ADDRESS.md b/api/@aastar/core/variables/ENTRY_POINT_ADDRESS.md index 3eddcdac5..0bfede0ec 100644 --- a/api/@aastar/core/variables/ENTRY_POINT_ADDRESS.md +++ b/api/@aastar/core/variables/ENTRY_POINT_ADDRESS.md @@ -1,3 +1,3 @@ > **ENTRY\_POINT\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L42) +Defined in: [packages/core/src/constants.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L42) diff --git a/api/@aastar/core/variables/EntryPointABI.md b/api/@aastar/core/variables/EntryPointABI.md index a2c61008e..b921b9608 100644 --- a/api/@aastar/core/variables/EntryPointABI.md +++ b/api/@aastar/core/variables/EntryPointABI.md @@ -1,3 +1,3 @@ > `const` **EntryPointABI**: `any` -Defined in: [packages/core/src/abis/index.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L57) +Defined in: [packages/core/src/abis/index.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L86) diff --git a/api/@aastar/core/variables/EntryPointArtifact.md b/api/@aastar/core/variables/EntryPointArtifact.md index f76cc0bd0..d5846a23b 100644 --- a/api/@aastar/core/variables/EntryPointArtifact.md +++ b/api/@aastar/core/variables/EntryPointArtifact.md @@ -1,6 +1,6 @@ > `const` **EntryPointArtifact**: `object` = `EntryPointABIData` -Defined in: [packages/core/src/abis/index.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L58) +Defined in: [packages/core/src/abis/index.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L87) ## Type Declaration diff --git a/api/@aastar/core/variables/FAUCET_API_URL.md b/api/@aastar/core/variables/FAUCET_API_URL.md index 8af0616d6..01d40a8b0 100644 --- a/api/@aastar/core/variables/FAUCET_API_URL.md +++ b/api/@aastar/core/variables/FAUCET_API_URL.md @@ -1,5 +1,5 @@ > `const` **FAUCET\_API\_URL**: `"https://faucet-aastar.vercel.app"` = `"https://faucet-aastar.vercel.app"` -Defined in: [packages/core/src/constants.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L79) +Defined in: [packages/core/src/constants.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L85) Common Constants diff --git a/api/@aastar/core/variables/ForceExitModuleABI.md b/api/@aastar/core/variables/ForceExitModuleABI.md new file mode 100644 index 000000000..d32fe3e10 --- /dev/null +++ b/api/@aastar/core/variables/ForceExitModuleABI.md @@ -0,0 +1,3 @@ +> `const` **ForceExitModuleABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L197) diff --git a/api/@aastar/core/variables/ForceExitModuleArtifact.md b/api/@aastar/core/variables/ForceExitModuleArtifact.md new file mode 100644 index 000000000..91082a5eb --- /dev/null +++ b/api/@aastar/core/variables/ForceExitModuleArtifact.md @@ -0,0 +1,3 @@ +> `const` **ForceExitModuleArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `ForceExitModuleABIData` + +Defined in: [packages/core/src/abis/index.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L198) diff --git a/api/@aastar/core/variables/GTOKEN_ADDRESS.md b/api/@aastar/core/variables/GTOKEN_ADDRESS.md index c7b2e0f05..772eac406 100644 --- a/api/@aastar/core/variables/GTOKEN_ADDRESS.md +++ b/api/@aastar/core/variables/GTOKEN_ADDRESS.md @@ -1,3 +1,3 @@ > **GTOKEN\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L30) +Defined in: [packages/core/src/constants.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L30) diff --git a/api/@aastar/core/variables/GTOKEN_STAKING_ADDRESS.md b/api/@aastar/core/variables/GTOKEN_STAKING_ADDRESS.md index a923d35d0..b3dba75c4 100644 --- a/api/@aastar/core/variables/GTOKEN_STAKING_ADDRESS.md +++ b/api/@aastar/core/variables/GTOKEN_STAKING_ADDRESS.md @@ -1,3 +1,3 @@ > **GTOKEN\_STAKING\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L31) +Defined in: [packages/core/src/constants.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L31) diff --git a/api/@aastar/core/variables/GTokenABI.md b/api/@aastar/core/variables/GTokenABI.md index fe061d3e3..783dc7be8 100644 --- a/api/@aastar/core/variables/GTokenABI.md +++ b/api/@aastar/core/variables/GTokenABI.md @@ -1,3 +1,3 @@ > `const` **GTokenABI**: `any` -Defined in: [packages/core/src/abis/index.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L40) +Defined in: [packages/core/src/abis/index.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L62) diff --git a/api/@aastar/core/variables/GTokenArtifact.md b/api/@aastar/core/variables/GTokenArtifact.md index ee707b82c..09f8ef2dc 100644 --- a/api/@aastar/core/variables/GTokenArtifact.md +++ b/api/@aastar/core/variables/GTokenArtifact.md @@ -1,6 +1,6 @@ > `const` **GTokenArtifact**: `object` = `GTokenABIData` -Defined in: [packages/core/src/abis/index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L41) +Defined in: [packages/core/src/abis/index.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L63) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:41](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60a0604052346103c6576111426020813803918261001c816103ca565b9384928339810103126103c6575161003460406103ca565b90601082526f23b7bb32b93730b731b2902a37b5b2b760811b602083015261005c60406103ca565b600681526523aa37b5b2b760d11b602082015282519091906001600160401b0381116102cc57600354600181811c911680156103bc575b60208210146102ae57601f811161034e575b506020601f82116001146102eb57819293945f926102e0575b50508160011b915f199060031b1c1916176003555b81516001600160401b0381116102cc57600454600181811c911680156102c2575b60208210146102ae57601f8111610240575b50602092601f82116001146101df57928192935f926101d4575b50508160011b915f199060031b1c1916176004555b80156101c15760805233156101ae5760058054336001600160a01b03198216811790925560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3610d5290816103f082396080518181816105fb015281816106c401526106f90152f35b631e4fbdf760e01b5f525f60045260245ffd5b63392e1e2760e01b5f525f60045260245ffd5b015190505f80610120565b601f1982169360045f52805f20915f5b8681106102285750836001959610610210575b505050811b01600455610135565b01515f1960f88460031b161c191690555f8080610202565b919260206001819286850151815501940192016101ef565b818111156101065760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b602084106102a6575b81601f9101920160051c03905f5b828110610299575050610106565b5f8282015560010161028b565b5f915061027d565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100f4565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100be565b601f1982169060035f52805f20915f5b8181106103365750958360019596971061031e575b505050811b016003556100d3565b01515f1960f88460031b161c191690555f8080610310565b9192602060018192868b0151815501940192016102fb565b818111156100a55760035f52601f820160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b602084106103b4575b81601f9101920160051c03905f5b8281106103a75750506100a5565b5f82820155600101610399565b5f915061038b565b90607f1690610093565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102cc5760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde031461088657508063095ea7b31461079f57806318160ddd1461078257806323b872dd1461074a578063313ce5671461072f578063349f0b90146106e7578063355274ea146106ad57806340c10f191461056957806342966c681461054c57806354fd4d50146104b757806370a0823114610473578063715018a6146103f557806379cc6790146103c35780638da5cb5b1461039057806395d89b4114610255578063a9059cbb14610224578063dd62ed3e146101b65763f2fde38b146100e2575f80fd5b346101b25760206003193601126101b25773ffffffffffffffffffffffffffffffffffffffff610110610986565b610118610c25565b1680156101865773ffffffffffffffffffffffffffffffffffffffff600554827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f1e4fbdf7000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b346101b25760406003193601126101b2576101cf610986565b73ffffffffffffffffffffffffffffffffffffffff6101ec6109a9565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b346101b25760406003193601126101b25761024a610240610986565b6024359033610b2f565b602060405160018152f35b346101b2575f6003193601126101b2576040515f6004548060011c90600181168015610386575b6020831081146103595782855290811561031757506001146102b9575b6102b5836102a9818503826109cc565b6040519182918261093e565b0390f35b91905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b915f905b8082106102fd575090915081016020016102a9610299565b9192600181602092548385880101520191019092916102e5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b840190910191506102a99050610299565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f169161027c565b346101b2575f6003193601126101b257602073ffffffffffffffffffffffffffffffffffffffff60055416604051908152f35b346101b25760406003193601126101b2576103f36103df610986565b602435906103ee823383610a0d565b610c72565b005b346101b2575f6003193601126101b25761040d610c25565b5f73ffffffffffffffffffffffffffffffffffffffff6005547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101b25760206003193601126101b25773ffffffffffffffffffffffffffffffffffffffff6104a1610986565b165f525f602052602060405f2054604051908152f35b346101b2575f6003193601126101b257604051604081019080821067ffffffffffffffff83111761051f576102b591604052600c81527f47546f6b656e2d322e312e32000000000000000000000000000000000000000060208201526040519182918261093e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b346101b25760206003193601126101b2576103f360043533610c72565b346101b25760406003193601126101b257610582610986565b73ffffffffffffffffffffffffffffffffffffffff602435916105a3610c25565b1690811561068157600254908082018092116106545760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a37f000000000000000000000000000000000000000000000000000000000000000060025481811161062657005b7f9e79f854000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b346101b2575f6003193601126101b25760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101b2575f6003193601126101b2577f0000000000000000000000000000000000000000000000000000000000000000600254810390811161065457602090604051908152f35b346101b2575f6003193601126101b257602060405160128152f35b346101b25760606003193601126101b25761024a610766610986565b61076e6109a9565b6044359161077d833383610a0d565b610b2f565b346101b2575f6003193601126101b2576020600254604051908152f35b346101b25760406003193601126101b2576107b8610986565b60243590331561085a5773ffffffffffffffffffffffffffffffffffffffff1690811561082e57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b346101b2575f6003193601126101b2575f6003548060011c90600181168015610934575b6020831081146103595782855290811561031757506001146108d6576102b5836102a9818503826109cc565b91905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b915f905b80821061091a575090915081016020016102a9610299565b919260018160209254838588010152019101909291610902565b91607f16916108aa565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101b257565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101b257565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761051f57604052565b73ffffffffffffffffffffffffffffffffffffffff909291921691825f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff82165f5260205260405f2054927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8403610a84575b50505050565b828410610ae557801561085a5773ffffffffffffffffffffffffffffffffffffffff82161561082e575f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f5260205260405f20910390555f808080610a7e565b5073ffffffffffffffffffffffffffffffffffffffff83917ffb8f41b2000000000000000000000000000000000000000000000000000000005f521660045260245260445260645ffd5b73ffffffffffffffffffffffffffffffffffffffff16908115610bf95773ffffffffffffffffffffffffffffffffffffffff1691821561068157815f525f60205260405f2054818110610bc757817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff600554163303610c4657565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b90919073ffffffffffffffffffffffffffffffffffffffff168015610bf957805f525f60205260405f2054838110610ce9576020845f94957fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef938587528684520360408620558060025403600255604051908152a3565b91507fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffdfea26469706673582212200de962b538a5ce14e10fc74e638266bdab2cdff1fc7cfe5d19e0948d33e714a264736f6c63430008210033"` +> **bytecode**: `string` = `"0x60a0604052346103c657610e076020813803918261001c816103ca565b9384928339810103126103c6575161003460406103ca565b90601082526f23b7bb32b93730b731b2902a37b5b2b760811b602083015261005c60406103ca565b600681526523aa37b5b2b760d11b602082015282519091906001600160401b0381116102cc57600354600181811c911680156103bc575b60208210146102ae57601f811161034e575b506020601f82116001146102eb57819293945f926102e0575b50508160011b915f199060031b1c1916176003555b81516001600160401b0381116102cc57600454600181811c911680156102c2575b60208210146102ae57601f8111610240575b50602092601f82116001146101df57928192935f926101d4575b50508160011b915f199060031b1c1916176004555b80156101c15760805233156101ae5760058054336001600160a01b03198216811790925560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3610a1790816103f082396080518181816104db01528181610559015261058e0152f35b631e4fbdf760e01b5f525f60045260245ffd5b63392e1e2760e01b5f525f60045260245ffd5b015190505f80610120565b601f1982169360045f52805f20915f5b8681106102285750836001959610610210575b505050811b01600455610135565b01515f1960f88460031b161c191690555f8080610202565b919260206001819286850151815501940192016101ef565b818111156101065760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b602084106102a6575b81601f9101920160051c03905f5b828110610299575050610106565b5f8282015560010161028b565b5f915061027d565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100f4565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100be565b601f1982169060035f52805f20915f5b8181106103365750958360019596971061031e575b505050811b016003556100d3565b01515f1960f88460031b161c191690555f8080610310565b9192602060018192868b0151815501940192016102fb565b818111156100a55760035f52601f820160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b602084106103b4575b81601f9101920160051c03905f5b8281106103a75750506100a5565b5f82820155600101610399565b5f915061038b565b90607f1690610093565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102cc5760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106dc57508063095ea7b31461063457806318160ddd1461061757806323b872dd146105df578063313ce567146105c4578063349f0b901461057c578063355274ea1461054257806340c10f191461045657806342966c681461043957806354fd4d50146103ce57806370a0823114610397578063715018a61461034557806379cc6790146103135780638da5cb5b146102ed57806395d89b41146101e9578063a9059cbb146101b8578063dd62ed3e146101645763f2fde38b146100e2575f80fd5b34610160576020366003190112610160576001600160a01b036101036107be565b61010b61095f565b16801561014d576001600160a01b03600554828219821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b346101605760403660031901126101605761017d6107be565b6001600160a01b0361018d6107d4565b91165f5260016020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b34610160576040366003190112610160576101de6101d46107be565b60243590336108b5565b602060405160018152f35b34610160575f366003190112610160576040515f6004548060011c906001811680156102e3575b6020831081146102cf578285529081156102ab575060011461024d575b6102498361023d818503826107ea565b60405191829182610794565b0390f35b91905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b915f905b8082106102915750909150810160200161023d61022d565b919260018160209254838588010152019101909291610279565b60ff191660208086019190915291151560051b8401909101915061023d905061022d565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610210565b34610160575f3660031901126101605760206001600160a01b0360055416604051908152f35b346101605760403660031901126101605761034361032f6107be565b6024359061033e82338361080c565b610986565b005b34610160575f3660031901126101605761035d61095f565b5f6001600160a01b0360055481198116600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610160576020366003190112610160576001600160a01b036103b86107be565b165f525f602052602060405f2054604051908152f35b34610160575f36600319011261016057604051604081019080821067ffffffffffffffff8311176104255761024991604052600c81526b23aa37b5b2b716991718971960a11b602082015260405191829182610794565b634e487b7160e01b5f52604160045260245ffd5b346101605760203660031901126101605761034360043533610986565b346101605760403660031901126101605761046f6107be565b6001600160a01b036024359161048361095f565b1690811561052f576002549080820180921161051b5760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a37f000000000000000000000000000000000000000000000000000000000000000060025481811161050657005b63279e7e1560e21b5f5260045260245260445ffd5b634e487b7160e01b5f52601160045260245ffd5b63ec442f0560e01b5f525f60045260245ffd5b34610160575f3660031901126101605760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610160575f366003190112610160577f0000000000000000000000000000000000000000000000000000000000000000600254810390811161051b57602090604051908152f35b34610160575f36600319011261016057602060405160128152f35b34610160576060366003190112610160576101de6105fb6107be565b6106036107d4565b6044359161061283338361080c565b6108b5565b34610160575f366003190112610160576020600254604051908152f35b346101605760403660031901126101605761064d6107be565b6024359033156106c9576001600160a01b03169081156106b657335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b34610160575f366003190112610160575f6003548060011c9060018116801561078a575b6020831081146102cf578285529081156102ab575060011461072c576102498361023d818503826107ea565b91905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b915f905b8082106107705750909150810160200161023d61022d565b919260018160209254838588010152019101909291610758565b91607f1691610700565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361016057565b602435906001600160a01b038216820361016057565b90601f8019910116810190811067ffffffffffffffff82111761042557604052565b6001600160a01b03909291921691825f52600160205260405f206001600160a01b0382165f5260205260405f2054925f19840361084a575b50505050565b8284106108915780156106c9576001600160a01b038216156106b6575f5260016020526001600160a01b0360405f2091165f5260205260405f20910390555f808080610844565b506001600160a01b038391637dc7a0d960e11b5f521660045260245260445260645ffd5b6001600160a01b031690811561094c576001600160a01b031691821561052f57815f525f60205260405f205481811061093357817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b634b637e8f60e11b5f525f60045260245ffd5b6001600160a01b0360055416330361097357565b63118cdaa760e01b5f523360045260245ffd5b9091906001600160a01b0316801561094c57805f525f60205260405f20548381106109f0576020845f94957fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef938587528684520360408620558060025403600255604051908152a3565b915063391434e360e21b5f5260045260245260445260645ffdfea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/GTokenAuthorizationABI.md b/api/@aastar/core/variables/GTokenAuthorizationABI.md new file mode 100644 index 000000000..3e6e335a5 --- /dev/null +++ b/api/@aastar/core/variables/GTokenAuthorizationABI.md @@ -0,0 +1,3 @@ +> `const` **GTokenAuthorizationABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L69) diff --git a/api/@aastar/core/variables/GTokenAuthorizationArtifact.md b/api/@aastar/core/variables/GTokenAuthorizationArtifact.md new file mode 100644 index 000000000..9feb5b46f --- /dev/null +++ b/api/@aastar/core/variables/GTokenAuthorizationArtifact.md @@ -0,0 +1,3 @@ +> `const` **GTokenAuthorizationArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `GTokenAuthorizationABIData` + +Defined in: [packages/core/src/abis/index.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L70) diff --git a/api/@aastar/core/variables/GTokenStakingABI.md b/api/@aastar/core/variables/GTokenStakingABI.md index 9b0f1aae7..627d4a98b 100644 --- a/api/@aastar/core/variables/GTokenStakingABI.md +++ b/api/@aastar/core/variables/GTokenStakingABI.md @@ -1,3 +1,3 @@ > `const` **GTokenStakingABI**: `any` -Defined in: [packages/core/src/abis/index.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L43) +Defined in: [packages/core/src/abis/index.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L72) diff --git a/api/@aastar/core/variables/GTokenStakingArtifact.md b/api/@aastar/core/variables/GTokenStakingArtifact.md index 0c281ea98..8b1fe7e1f 100644 --- a/api/@aastar/core/variables/GTokenStakingArtifact.md +++ b/api/@aastar/core/variables/GTokenStakingArtifact.md @@ -1,6 +1,6 @@ > `const` **GTokenStakingArtifact**: `object` = `GTokenStakingABIData` -Defined in: [packages/core/src/abis/index.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L44) +Defined in: [packages/core/src/abis/index.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L73) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:44](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60a03461019c57601f6128f638819003918201601f19168301916001600160401b038311848410176101a057808492604094855283398101031261019c57610052602061004b836101b4565b92016101b4565b60015f5533156101895760018054336001600160a01b0319821681179092556040519391906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160a01b031691821561015657506001600160a01b031690811561011e57608052600380546001600160a01b03191691909117905560405161272d90816101c982396080518181816105ec0152818161118d0152818161129e015281816116280152818161193b01528181611d360152611d800152f35b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420547265617375727960801b6044820152606490fd5b62461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21023aa37b5b2b760911b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361019c5756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b1461205f5750806316934fc414611ff657806330b039ee14611f4d57806336cb2b8214611ecc578063374e4d7314611ad45780634bcb80a21461188257806354fd4d501461181f57806361d027b3146117ec578063678b3ee2146114af5780636d265c111461144a5780636da12d0c146113e857806370a08231146113a3578063715018a6146113255780637c50309f146112c25780637f6b337b14611272578063817b1cd2146112555780638da5cb5b146112225780638f7648481461102d57806391b65cd614610dc157806394e2b21e14610d8e578063a0821be314610d6a578063a91ee0dc14610ca2578063aed2d90814610c58578063b4d81fb314610b8e578063befa570e1461052b578063d64c66aa14610455578063f0f442601461038d578063f2fde38b146102bb5763f50102c01461015d575f80fd5b346102b85760406003193601126102b85760809073ffffffffffffffffffffffffffffffffffffffff61018e61208f565b82606060405161019d81612168565b8281528260208201528260408201520152169081815260056020526040812060243582526020526040812091604051906101d68261214c565b83546fffffffffffffffffffffffffffffffff81168352851c602083015261021e600365ffffffffffff600187015416956040850196875260028101546060860152016121a7565b858301528252600460205265ffffffffffff6fffffffffffffffffffffffffffffffff604084209260405161025281612168565b8454815260606003600187015496876020850152600281015460408501520154910152511693511690606060405161028981612168565b858152602081019283526040810193845201928352604051938452516020840152516040830152516060820152f35b80fd5b50346102b85760206003193601126102b85773ffffffffffffffffffffffffffffffffffffffff6102ea61208f565b6102f2612439565b1680156103615773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b50346102b85760206003193601126102b85773ffffffffffffffffffffffffffffffffffffffff6103bc61208f565b6103c4612439565b1680156103f7577fffffffffffffffffffffffff0000000000000000000000000000000000000000600354161760035580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c6964205472656173757279000000000000000000000000000000006044820152fd5b50346102b85760606003193601126102b85773ffffffffffffffffffffffffffffffffffffffff6002541633141580610509575b6104ab5760043581526007602052604081206024358155600160443591015580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e617574686f72697a656400000000000000000000000000000000000000006044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610489565b5034610acd5760a0600319360112610acd5761054561208f565b6064359160243591608435906044359073ffffffffffffffffffffffffffffffffffffffff83168303610acd5761057a612486565b73ffffffffffffffffffffffffffffffffffffffff600254163303610b2f5773ffffffffffffffffffffffffffffffffffffffff1691825f52600560205260405f20855f526020526fffffffffffffffffffffffffffffffff60405f205416610ad1576106146105ea8784612335565b7f00000000000000000000000000000000000000000000000000000000000000009230908461251f565b856109e7575b50818352600460205260408320610632828254612335565b905581835260046020526002604084200154156109d1575b6fffffffffffffffffffffffffffffffff8111610972576fffffffffffffffffffffffffffffffff851161097257604051946106858661214c565b6fffffffffffffffffffffffffffffffff82168652602086016fffffffffffffffffffffffffffffffff821681526003604088019765ffffffffffff4216895260608101888152602099604051946106dd8c87612184565b8986526080848101968752898b5260058d526040808c208d8d528e528b2094519151901b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116178355516001830180547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001665ffffffffffff9290921691909117905551600282015591518051919092019167ffffffffffffffff821161094557819061079f84546120b2565b601f8111610905575b508990601f83116001146108a557889261089a575b50505f198260011b9260031b1c19161790555b82845260068652604084208054906801000000000000000082101561086d57869360019695938561084261082c866060968c7fe4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c990181556122b8565b81939154905f199060031b92831b921b19161790565b905561085082600854612335565b60085560405191825289820152426040820152a355604051908152f35b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b015190505f806107bd565b8489528a892092601f1916895b8c8282106108ef5750509084600195949392106108d7575b505050811b0190556107d0565b01515f1960f88460031b161c191690555f80806108ca565b60018596829396860151815501950193016108b2565b828111156107a8578489528a892061093791601f850160051c908d861061093d575b601f82910160051c0391016122fa565b5f6107a8565b8b9150610927565b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f416d6f756e7420657863656564732075696e74313238000000000000000000006044820152606490fd5b818352600460205242600260408520015561064a565b73ffffffffffffffffffffffffffffffffffffffff16803b15610acd575f80916024604051809481937f42966c680000000000000000000000000000000000000000000000000000000083528b60048401525af18015610ac257610aad575b5083827fbbd5bd0123b04ed83c5d79cf2f6fca38e7b242f17f09d9eea712fb1cbe2fb861608060405189815260406020820152600a60408201527f456e747279204275726e000000000000000000000000000000000000000000006060820152a35f61061a565b610aba9193505f90612184565b5f915f610a46565b6040513d5f823e3d90fd5b5f80fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f526f6c6520616c7265616479206c6f636b6564000000000000000000000000006044820152fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f6e6c79205265676973747279000000000000000000000000000000000000006044820152606490fd5b34610acd576040600319360112610acd576040610ba961208f565b73ffffffffffffffffffffffffffffffffffffffff60243591165f526005602052815f20815f526020526fffffffffffffffffffffffffffffffff825f205416905f526007602052815f2090612710610c1e845193610c0785612103565b602060018254928388520154950194855283612315565b049151808310610c50575b50808211610c48575b81610c3c91612328565b82519182526020820152f35b905080610c32565b915083610c29565b34610acd576020600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff610c8661208f565b165f526009602052602060ff60405f2054166040519015158152f35b34610acd576020600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff610cd061208f565b610cd8612439565b168015610d0c577fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002555f80f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f496e76616c6964205265676973747279000000000000000000000000000000006044820152fd5b34610acd576020600319360112610acd57610d8361208f565b5060206040515f8152f35b34610acd576020600319360112610acd576004355f5260076020526040805f206001815491015482519182526020820152f35b34610acd576020600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff610def61208f565b16805f52600660205260405f2090604051808360208295549384815201905f5260205f20925f5b818110611014575050610e2b92500383612184565b815191601f19610e53610e3d8561240d565b94610e4b6040519687612184565b80865261240d565b015f5b818110610fde5750505f5b8151811015610f0057600190835f52600560205260405f20610e838285612425565b515f5260205260405f20610edf600360405192610e9f8461214c565b80546fffffffffffffffffffffffffffffffff8116855260801c602085015265ffffffffffff8682015416604085015260028101546060850152016121a7565b6080820152610eee8287612425565b52610ef98186612425565b5001610e61565b836040518091602082016020835281518091526040830190602060408260051b8601019301915f905b828210610f3857505050500390f35b91936020610fce827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865260a060808a516fffffffffffffffffffffffffffffffff81511684526fffffffffffffffffffffffffffffffff86820151168685015265ffffffffffff6040820151166040850152606081015160608501520151918160808201520190612265565b9601920192018594939192610f29565b602090604051610fed8161214c565b5f81525f838201525f60408201525f60608201526060608082015282828801015201610e56565b8454835260019485019487945060209093019201610e16565b34610acd576080600319360112610acd5761104661208f565b6044359060643567ffffffffffffffff8111610acd5761106a90369060040161228a565b90335f52600960205260ff60405f205416156111c4576111bf73ffffffffffffffffffffffffffffffffffffffff7f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa074941694855f52600560205260405f206024355f5260205260405f206fffffffffffffffffffffffffffffffff611101818354166110f8858210156123a8565b82851690612342565b167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055855f52600460205260405f2061115d828254611147828210156123a8565b60018401611156838254612335565b9055612328565b905561116b81600854612328565b6008556111b18173ffffffffffffffffffffffffffffffffffffffff600354167f00000000000000000000000000000000000000000000000000000000000000006124bd565b604051938493429285612374565b0390a2005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4e6f7420617574686f72697a656420736c6173686572000000000000000000006044820152fd5b34610acd575f600319360112610acd57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b34610acd575f600319360112610acd576020600854604051908152f35b34610acd575f600319360112610acd57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610acd576040600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff6112f061208f565b165f52600560205260405f206024355f5260205260206fffffffffffffffffffffffffffffffff60405f205416604051908152f35b34610acd575f600319360112610acd5761133d612439565b5f73ffffffffffffffffffffffffffffffffffffffff6001547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610acd576020600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff6113d161208f565b165f526004602052602060405f2054604051908152f35b34610acd576040600319360112610acd5761140161208f565b73ffffffffffffffffffffffffffffffffffffffff60243591165f52600660205260405f208054821015610acd5760209161143b916122b8565b90549060031b1c604051908152f35b34610acd576040600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff61147861208f565b165f52600560205260405f206024355f5260205260206fffffffffffffffffffffffffffffffff60405f2054161515604051908152f35b34610acd576060600319360112610acd576114c861208f565b60243560443567ffffffffffffffff8111610acd576114eb90369060040161228a565b90926114f5612486565b73ffffffffffffffffffffffffffffffffffffffff60025416331415806117d5575b6117775773ffffffffffffffffffffffffffffffffffffffff1690815f52600460205260405f208054938481115f146117715750835b8461159b575b50506020937f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa0749161158c60405192839242918885612374565b0390a260015f55604051908152f35b846115af9160018401611156838254612335565b81556115bd84600854612328565b600855825f5260066020526115d78460405f209254612335565b8015918215611655575b5050506020937f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa0749161164c8573ffffffffffffffffffffffffffffffffffffffff600354167f00000000000000000000000000000000000000000000000000000000000000006124bd565b91819550611553565b9193909294955f5b835481101561173e57825f52600560205260405f2061167c82866122b8565b90549060031b1c5f5260205260405f20906fffffffffffffffffffffffffffffffff825416916116ac8a84612315565b9288611711576116dc6fffffffffffffffffffffffffffffffff91896001960481811161170a575b831690612342565b167fffffffffffffffffffffffffffffffff000000000000000000000000000000008254161790550161165d565b50806116d4565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50959490935091508490507f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa07460206115e1565b9361154d565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4f6e6c79205265676973747279206f7220617574686f72697a656400000000006044820152fd5b50335f52600960205260ff60405f20541615611517565b34610acd575f600319360112610acd57602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b34610acd575f600319360112610acd5761187e604051611840604082612184565b600d81527f5374616b696e672d332e312e32000000000000000000000000000000000000006020820152604051918291602083526020830190612265565b0390f35b34610acd576080600319360112610acd5761189b61208f565b60243590604435906064359073ffffffffffffffffffffffffffffffffffffffff82168203610acd576118cc612486565b73ffffffffffffffffffffffffffffffffffffffff600254163303610b2f5773ffffffffffffffffffffffffffffffffffffffff1691825f52600560205260405f20845f5260205260405f20916fffffffffffffffffffffffffffffffff83541615611a76578161195f9130907f000000000000000000000000000000000000000000000000000000000000000061251f565b6fffffffffffffffffffffffffffffffff81166fffffffffffffffffffffffffffffffff83541601906fffffffffffffffffffffffffffffffff8211611a495765ffffffffffff60017fe4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c946fffffffffffffffffffffffffffffffff606095167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416178155865f52600460205260405f20611a1d858254612335565b9055611a2b84600854612335565b6008550154166040519182525f60208301526040820152a360015f55005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f526f6c65206e6f74206c6f636b656400000000000000000000000000000000006044820152fd5b34610acd576040600319360112610acd57611aed61208f565b60243590611af9612486565b73ffffffffffffffffffffffffffffffffffffffff600254163303610b2f5773ffffffffffffffffffffffffffffffffffffffff811691825f52600560205260405f20815f5260205260405f2065ffffffffffff60018201541615611e6e576fffffffffffffffffffffffffffffffff90541690835f52600560205260405f20815f52602052600360405f205f81555f60018201555f600282015501611b9f81546120b2565b9081611e2a575b5050835f52600660205260405f20935f5b855480821015611dfa5783611bcc83896122b8565b90549060031b1c14611be15750600101611bb7565b5f1981969394959601908111611a495761082c611c01611c0f92896122b8565b90549060031b1c92886122b8565b90558454908115611dcd576020955f197f9cadbc33680e22a2f04ed8eb0d7cc7f218ee9231b3473ed05904c7ec5e2d483d930190611c4d82826122b8565b5f1982549160031b1b19169055555b825f526004865260405f20611c72868254612328565b9055825f526004865260405f205415611db8575b611c9285600854612328565b600855835f526007865260405f20612710611cc960405192611cb384612103565b8960018254928387520154940193845288612315565b049051808210611db0575b50858111611da9575b611d21611cea8288612328565b96879383611d61575b8480611d30575b50506040519384934292859094939260609260808301968352602083015260408201520152565b0390a360015f55604051908152f35b611d5a917f00000000000000000000000000000000000000000000000000000000000000006124bd565b8984611cfa565b611da48473ffffffffffffffffffffffffffffffffffffffff600354167f00000000000000000000000000000000000000000000000000000000000000006124bd565b611cf3565b5084611cdd565b905087611cd4565b825f52600486525f6001604082200155611c86565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5050909192602094507f9cadbc33680e22a2f04ed8eb0d7cc7f218ee9231b3473ed05904c7ec5e2d483d90611c5c565b81601f5f9311600114611e415750555b8480611ba6565b81835260208320611e5e91601f0160051c5f1901906001016122fa565b8082528160208120915555611e3a565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f206c6f636b20666f756e64000000000000000000000000000000000000006044820152fd5b34610acd576040600319360112610acd57611ee561208f565b60243590811515809203610acd5773ffffffffffffffffffffffffffffffffffffffff90611f11612439565b165f52600960205260405f209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691161790555f80f35b34610acd576040600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff611f7b61208f565b165f52600560205260405f206024355f5260205260405f20805461187e65ffffffffffff60018401541692611fb76003600283015492016121a7565b9060405194846fffffffffffffffffffffffffffffffff879616865260801c60208601526040850152606084015260a0608084015260a0830190612265565b34610acd576020600319360112610acd5773ffffffffffffffffffffffffffffffffffffffff61202461208f565b165f90815260046020908152604091829020805460018201546002830154600390930154855192835293820152928301526060820152608090f35b34610acd575f600319360112610acd5760209073ffffffffffffffffffffffffffffffffffffffff600254168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610acd57565b90600182811c921680156120f9575b60208310146120cc57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f16916120c1565b6040810190811067ffffffffffffffff82111761211f57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761211f57604052565b6080810190811067ffffffffffffffff82111761211f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761211f57604052565b9060405191825f8254926121ba846120b2565b808452936001811690811561222557506001146121e1575b506121df92500383612184565b565b90505f9291925260205f20905f915b8183106122095750509060206121df928201015f6121d2565b60209193508060019154838589010152019101909184926121f0565b602093506121df9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f6121d2565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b9181601f84011215610acd5782359167ffffffffffffffff8311610acd5760208381860195010111610acd57565b80548210156122cd575f5260205f2001905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5b82811061230857505050565b5f828201556001016122fc565b81810292918115918404141715611a4957565b91908203918211611a4957565b91908201809211611a4957565b906fffffffffffffffffffffffffffffffff809116911603906fffffffffffffffffffffffffffffffff8211611a4957565b949392601f81601f19926040956080958a52606060208b01528160608b0152858a01375f84828a0101520116850101930152565b156123af57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e74207374616b6500000000000000000000000000006044820152fd5b67ffffffffffffffff811161211f5760051b60200190565b80518210156122cd5760209160051b010190565b73ffffffffffffffffffffffffffffffffffffffff60015416330361245a57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b60025f54146124955760025f55565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b6121df9273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb00000000000000000000000000000000000000000000000000000000602086015216602484015260448301526044825261251a606483612184565b612586565b90919273ffffffffffffffffffffffffffffffffffffffff6121df9481604051957f23b872dd00000000000000000000000000000000000000000000000000000000602088015216602486015216604484015260648301526064825261251a608483612184565b5f73ffffffffffffffffffffffffffffffffffffffff8192169260208151910182855af13d15612652573d67ffffffffffffffff811161211f576125ed916020601f19601f84011601916125dd6040519384612184565b82523d5f602084013e5b8361265e565b805190811515918261262e575b50506126035750565b7f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b8192509060209181010312610acd5760200151801590811503610acd575f806125fa565b6125ed906060906125e7565b9061269b575080511561267357805190602001fd5b7f1425ea42000000000000000000000000000000000000000000000000000000005f5260045ffd5b815115806126ee575b6126ac575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b156126a456fea264697066735822122025cb3e229da914f7a0654b01bf22e64244a8848c0e3c57f8cabdee7f26162afa64736f6c63430008210033"` +> **bytecode**: `string` = `"0x60c03461019e57601f61253038819003918201601f19168301916001600160401b038311848410176101a25780849260609460405283398101031261019e57610047816101b6565b906100606040610059602084016101b6565b92016101b6565b9060015f55331561018b5760018054336001600160a01b0319821681179092556040519491906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160a01b031690811561017c576001600160a01b031690811561017c576001600160a01b0383161561017c57608052600280546001600160a01b03191691909117905560a05261236590816101cb82396080518181816109c701528181610abb01528181610edb0152818161127f015281816115530152818161158e01528181611bef0152611c58015260a0518181816103c9015281816105ca01528181610cab0152818161121e015281816113b2015281816117c0015281816120e101526121b40152f35b63e6c4247b60e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361019e5756fe6080806040526004361015610012575f80fd5b5f3560e01c90816306433b1b146117a35750806316934fc41461173d57806330b039ee146116aa57806336cb2b821461162c578063374e4d73146113845780634bcb80a2146111d957806354fd4d501461118657806361d027b314611160578063678b3ee214610c5a5780636d265c1114610c0b5780636da12d0c14610bb657806370a0823114610b7e578063715018a614610b2c5780637c50309f14610adf5780637f6b337b14610a9c578063817b1cd214610a7f57806384747ba814610a5a5780638da5cb5b14610a345780638f7648481461087f57806391b65cd61461065657806394e2b21e146106235780639e9093da1461058b578063a0821be314610567578063aed2d9081461052a578063b4d81fb314610476578063d64c66aa146103a5578063f0f4426014610317578063f2fde38b146102995763f50102c01461015b575f80fd5b346102955760403660031901126102955760806001600160a01b0361017e6117e4565b5f606060405161018d8161187e565b828152826020820152826040820152015216805f52600460205260405f206024355f5260205260405f2090604051906101c582611862565b82546001600160801b0381168352841c6020830152610204600365ffffffffffff600186015416946040850195865260028101546060860152016118bc565b848301525f52600360205265ffffffffffff6001600160801b0360405f209260405161022f8161187e565b8454815260606003600187015496876020850152600281015460408501520154910152511692511660606040516102658161187e565b848152602081019384526040810192835201915f8352604051938452516020840152516040830152516060820152f35b5f80fd5b34610295576020366003190112610295576001600160a01b036102ba6117e4565b6102c2611f60565b168015610304576001600160a01b03600154828219821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610295576020366003190112610295576001600160a01b036103386117e4565b610340611f60565b16801561039657600254816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a5f80a373ffffffffffffffffffffffffffffffffffffffff191617600255005b63e6c4247b60e01b5f5260045ffd5b34610295576060366003190112610295576004356024356044356001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633141580610461575b610453576107d08211610444577fc80e6b66eb58558814d2cbd504bae3d3ed4eb316287800124c793081728599ad91604091845f526006602052806001845f20848155015582519182526020820152a2005b63cd4e616760e01b5f5260045ffd5b6282b42960e81b5f5260045ffd5b506001600160a01b03600154163314156103f2565b346102955760403660031901126102955760406104916117e4565b6001600160a01b0360243591165f526004602052815f20815f526020526001600160801b03825f205416905f526006602052815f20906127106104f08451936104d985611832565b6020600182549283885201549501948552836119f2565b049151808310610522575b5080821161051a575b8161050e91611a05565b82519182526020820152f35b905080610504565b9150836104fb565b34610295576020366003190112610295576001600160a01b0361054b6117e4565b165f526008602052602060ff60405f2054166040519015158152f35b34610295576020366003190112610295576105806117e4565b5060206040515f8152f35b346102955760a0366003190112610295576105a46117e4565b608435906001600160a01b0382168203610295576105c0611f87565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633036106145760209161060891606435906044359060243590611a9e565b60015f55604051908152f35b6310f5403960e31b5f5260045ffd5b34610295576020366003190112610295576004355f5260066020526040805f206001815491015482519182526020820152f35b34610295576020366003190112610295576001600160a01b036106776117e4565b16805f52600560205260405f2090604051808360208295549384815201905f5260205f20925f5b8181106108665750506106b39250038361189a565b8151916106bf83611a1f565b926106cd604051948561189a565b8084526106dc601f1991611a1f565b015f5b8181106108305750505f5b815181101561078057600190835f52600460205260405f2061070c8285611a57565b515f5260205260405f2061075f60036040519261072884611862565b80546001600160801b038116855260801c602085015265ffffffffffff8682015416604085015260028101546060850152016118bc565b608082015261076e8287611a57565b526107798186611a57565b50016106ea565b836040518091602082016020835281518091526040830190602060408260051b8601019301915f905b8282106107b857505050500390f35b919360019193955060206108208192603f198a820301865260a060808a516001600160801b0381511684526001600160801b0386820151168685015265ffffffffffff604082015116604085015260608101516060850152015191816080820152019061195c565b96019201920185949391926107a9565b60209060405161083f81611862565b5f81525f838201525f60408201525f606082015260606080820152828288010152016106df565b845483526001948501948794506020909301920161069e565b34610295576080366003190112610295576108986117e4565b60443560243560643567ffffffffffffffff8111610295576108be903690600401611980565b6108c9949194611f87565b335f52600860205260ff60405f20541615610a25576001600160a01b03821690815f52600460205260405f20845f5260205260405f20906001600160801b03825416868110610a16576109276001600160801b039182891690611a37565b166001600160801b0319835416178255825f52600360205260405f2096875497878910610a16576001600160801b037f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa074948261099a8b610a019d60016109f99701610993838254611a12565b9055611a05565b90556109a88a600754611a05565b6007555416978815610a07575b6109eb816001600160a01b03600254167f000000000000000000000000000000000000000000000000000000000000000061205c565b604051938493429285611a6b565b0390a26121a8565b60015f55005b610a118888611fe0565b6109b5565b6378de4a6960e11b5f5260045ffd5b63a4bc77a760e01b5f5260045ffd5b34610295575f3660031901126102955760206001600160a01b0360015416604051908152f35b34610295575f3660031901126102955760206040516a115eec47f6cf7e350000008152f35b34610295575f366003190112610295576020600754604051908152f35b34610295575f3660031901126102955760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610295576040366003190112610295576001600160a01b03610b006117e4565b165f52600460205260405f206024355f5260205260206001600160801b0360405f205416604051908152f35b34610295575f36600319011261029557610b44611f60565b5f6001600160a01b0360015481198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610295576020366003190112610295576001600160a01b03610b9f6117e4565b165f526003602052602060405f2054604051908152f35b3461029557604036600319011261029557610bcf6117e4565b6001600160a01b0360243591165f52600560205260405f20805482101561029557602091610bfc916119ae565b90549060031b1c604051908152f35b34610295576040366003190112610295576001600160a01b03610c2c6117e4565b165f52600460205260405f206024355f5260205260206001600160801b0360405f2054161515604051908152f35b3461029557606036600319011261029557610c736117e4565b60243560443567ffffffffffffffff811161029557610c96903690600401611980565b610ca1939193611f87565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633141580611149575b61113a576001600160a01b03821691825f52600360205260405f20908154948581115f146111345750845b85610d4e575b5050506020937f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa07491610d3f60405192839242918885611a6b565b0390a260015f55604051908152f35b85610d6791600185989796949501610993838254611a12565b8555610d7584600754611a05565b600755825f526005602052610d8f8460405f209654611a12565b855490610d9b82611a1f565b96610da9604051988961189a565b828852601f19610db884611a1f565b013660208a0137610dc883611a1f565b92610dd6604051948561189a565b808452610de5601f1991611a1f565b0136602085013781158015610f66575b505050835f52600560205260405f20955f955b875480881015610ebf57865f52600460205260405f20610e28898b6119ae565b90549060031b1c5f526020526001600160801b0360405f205416155f14610eac575f198101908111610e9857610e5e90896119ae565b90549060031b1c610e88610e72898b6119ae565b819391549060031b91821b915f19901b19161790565b9055610e9388611fa5565b610e08565b634e487b7160e01b5f52601160045260245ffd5b50955f198114610e985760010195610e08565b50939791955093919550610eff836001600160a01b03600254167f000000000000000000000000000000000000000000000000000000000000000061205c565b5f5b8451811015610f335780610f2d610f1a60019388611a57565b51610f25838a611a57565b51908b6121a8565b01610f01565b50955090939092509050837f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa0746020610d05565b9296989791949590935f965f5b8654811015611043578b90845f52600460205260405f20610f94828a6119ae565b90549060031b1c5f5260205260405f2099610fba6001600160801b038c541693846119f2565b8861102f576001936001600160801b03928d8d610ff7940492808411611027575b610fe9869182861690611a37565b168519825416179055611a12565b9a611002838b6119ae565b90549060031b1c611013848a611a57565b525416611020828d611a57565b5201610f73565b925082610fdb565b634e487b7160e01b5f52601260045260245ffd5b5096909992935061105991955097939782611a05565b9487545b8015158061112b575b1561111857855f52600460205260405f205f19820190828211610e985761108d828c6119ae565b90549060031b1c5f5260205260405f20906001600160801b0382541691826110c1575b5050508015610e98575f190161105d565b906110ff6001600160801b03611105959b93858511155f1461110e57816110ed86975b82891690611a37565b1682198254161781555416918c611a57565b52611a05565b958a80806110b0565b816110ed876110e4565b5093945094909550959095878080610df5565b50861515611066565b94610cff565b6338796dcd60e11b5f5260045ffd5b50335f52600860205260ff60405f20541615610cd4565b34610295575f3660031901126102955760206001600160a01b0360025416604051908152f35b34610295575f366003190112610295576111d56040516111a760408261189a565b600d81526c05374616b696e672d342e322e3609c1b602082015260405191829160208352602083019061195c565b0390f35b34610295576080366003190112610295576111f26117e4565b604435906024356064356001600160a01b038116810361029557611214611f87565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610614576001600160a01b03831690815f52600460205260405f20835f5260205260405f20906001600160801b038254161561137557856112a39130907f0000000000000000000000000000000000000000000000000000000000000000612248565b6112af85600754611a12565b946a115eec47f6cf7e350000008611611366576001600160801b0381166001600160801b0383541601926001600160801b038411610e98577fe4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c60608693610a01996001600160801b038098168819885416178755845f52600360205260405f2061133a838254611a12565b905560075565ffffffffffff6001870154166040519182525f60208301526040820152a35416916121a8565b6301d0b12b60e11b5f5260045ffd5b63454c458960e11b5f5260045ffd5b346102955760403660031901126102955761139d6117e4565b6024356113a8611f87565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610614576001600160a01b038216805f52600460205260405f20825f5260205260405f209165ffffffffffff6001840154161561161d5760209381610608937f9cadbc33680e22a2f04ed8eb0d7cc7f218ee9231b3473ed05904c7ec5e2d483d6001600160801b03611544975416825f526004895260405f20845f528952600360405f205f81555f60018201555f60028201550161147281546117fa565b90816115db575b50506114858486611fe0565b825f526003895260405f2061149b828254611a05565b9055825f526003895260405f2054156115c6575b6114bb81600754611a05565b600755835f526006895260405f206127106114f2604051926114dc84611832565b8c600182549283875201549401938452846119f2565b0490518082106115be575b508181116115b7575b6115108183611a05565b9889928261157c575b8361154c575b6040519384934292859094939260609260808301968352602083015260408201520152565b0390a36120d7565b61157784897f000000000000000000000000000000000000000000000000000000000000000061205c565b61151f565b6115b2836001600160a01b03600254167f000000000000000000000000000000000000000000000000000000000000000061205c565b611519565b5080611506565b90508a6114fd565b825f52600389525f60016040822001556114af565b81601f5f93116001146115f25750555b8980611479565b8183528b832061160e91601f0160051c841901906001016119d7565b808252818b81209155556115eb565b63f90e998d60e01b5f5260045ffd5b34610295576040366003190112610295576116456117e4565b602435908115158092036102955760206001600160a01b037fe0a56452e1e2337147f048c582bc931e7c341d221b44961f32dec8b73fd669bc92611687611f60565b1692835f526008825260405f2060ff1981541660ff8316179055604051908152a2005b34610295576040366003190112610295576001600160a01b036116cb6117e4565b165f52600460205260405f206024355f5260205260405f2080546111d565ffffffffffff600184015416926117076003600283015492016118bc565b9060405194846001600160801b03879616865260801c60208601526040850152606084015260a0608084015260a083019061195c565b34610295576020366003190112610295576001600160a01b0361175e6117e4565b165f52600360205260405f2080546111d56001830154926003600282015491015490604051948594859094939260609260808301968352602083015260408201520152565b34610295575f366003190112610295576020906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600435906001600160a01b038216820361029557565b90600182811c92168015611828575b602083101461181457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611809565b6040810190811067ffffffffffffffff82111761184e57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761184e57604052565b6080810190811067ffffffffffffffff82111761184e57604052565b90601f8019910116810190811067ffffffffffffffff82111761184e57604052565b9060405191825f8254926118cf846117fa565b808452936001811690811561193a57506001146118f6575b506118f49250038361189a565b565b90505f9291925260205f20905f915b81831061191e5750509060206118f4928201015f6118e7565b6020919350806001915483858901015201910190918492611905565b9050602092506118f494915060ff191682840152151560051b8201015f6118e7565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156102955782359167ffffffffffffffff8311610295576020838186019501011161029557565b80548210156119c3575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b5f5b8281106119e557505050565b5f828201556001016119d9565b81810292918115918404141715610e9857565b91908203918211610e9857565b91908201809211610e9857565b67ffffffffffffffff811161184e5760051b60200190565b906001600160801b03809116911603906001600160801b038211610e9857565b80518210156119c35760209160051b010190565b94939280604093608093885260606020890152816060890152838801375f828288010152601f8019910116850101930152565b9390809392611aad8482611a12565b93811594851594859182611c81575b80611be4575b5082611b9d575b50611b55575b505050611b1d575b611b1757600754604051916001600160a01b0360208401941684526040830152436060830152608082015260808152611b1160a08261189a565b51902090565b50505f90565b6001600160a01b0383165f52600460205260405f20825f52602052611b506001600160801b0360405f20541683856121a8565b611ad7565b60405191825260208201524260408201527fe4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c60606001600160a01b03881692a3825f80611acf565b846001600160a01b036040519285845216917ffd8455407fc2a5f2a6f1ea576385d9201fe1b9bd1b3ecb8bdab57d320cfbb47560206001600160a01b038d1692a45f611ac9565b8215611c4457611c177f000000000000000000000000000000000000000000000000000000000000000091308484612248565b8380611c27575b50505b5f611ac2565b611c3d916001600160a01b03600254169061205c565b5f83611c1e565b50611c7c836001600160a01b0360025416837f0000000000000000000000000000000000000000000000000000000000000000612248565b611c21565b915093506001600160a01b038816805f52600460205260405f20885f526020526001600160801b0360405f205416611f51576001600160801b038411611f42576001600160801b038311611f4257611cdb84600754611a12565b6a115eec47f6cf7e35000000811161136657600755805f52600360205260405f20611d07858254611a12565b9055805f526003602052600260405f20015415611f2c575b60405190611d2c82611862565b6001600160801b038516825288600360208401936001600160801b03871685526040810165ffffffffffff42168152606082019084825260209660405195611d74898861189a565b5f808852608086810198895289825260048b526040808320938352928b5291902094519151901b6fffffffffffffffffffffffffffffffff19166001600160801b03919091161783555160018301805465ffffffffffff191665ffffffffffff9290921691909117905551600282015591518051919092019167ffffffffffffffff821161184e57611e0683546117fa565b601f8111611eeb575b508490601f8311600114611e8457600595949392915f9183611e79575b50508160011b915f199060031b1c19161790555b5f525260405f20938454916801000000000000000083101561184e5788611e72610e7285839960018c980181556119ae565b9055611abc565b015190505f80611e2c565b90601f19831691845f52865f20925f5b818110611ed457509160019391856005999897969410611ebc575b505050811b019055611e40565b01515f1960f88460031b161c191690555f8080611eaf565b929388600181928786015181550195019301611e94565b82811115611e0f57611f1e90845f52865f2090601f850160051c90888610611f24575b601f82910160051c0391016119d7565b5f611e0f565b5f9150611f0e565b805f52600360205242600260405f200155611d1f565b6354ada05560e01b5f5260045ffd5b631c9493ab60e31b5f5260045ffd5b6001600160a01b03600154163303611f7457565b63118cdaa760e01b5f523360045260245ffd5b60025f5414611f965760025f55565b633ee5aeb560e01b5f5260045ffd5b80548015611fcc575f190190611fbb82826119ae565b8154905f199060031b1b1916905555565b634e487b7160e01b5f52603160045260245ffd5b6001600160a01b03165f52600560205260405f20905f5b825480821015612056578261200c83866119ae565b90549060031b1c146120215750600101611ff7565b5f1981019392508311610e985761204f610e726120416118f495856119ae565b90549060031b1c92846119ae565b9055611fa5565b50505050565b6118f4926001600160a01b036040519363a9059cbb60e01b602086015216602484015260448301526044825261209360648361189a565b612289565b3d156120d2573d9067ffffffffffffffff821161184e57604051916120c7601f8201601f19166020018461189a565b82523d5f602084013e565b606090565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169182156121a357823b15610295576001600160a01b0360405192637d960e3760e01b845216600483015260248201525f60448201525f8160648183865af19081612193575b50612190577fb095d4d7990b498e886fe544495d08fafb40e2675fd41d78e8abf3778ebcada461218b612177612098565b60405191829160208352602083019061195c565b0390a2565b50565b5f61219d9161189a565b5f612146565b505050565b90916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692831561205657833b15610295576001600160a01b0360405193637d960e3760e01b8552166004840152602483015260448201525f8160648183865af190816121935750612190577fb095d4d7990b498e886fe544495d08fafb40e2675fd41d78e8abf3778ebcada461218b612177612098565b9091926001600160a01b036118f49481604051956323b872dd60e01b602088015216602486015216604484015260648301526064825261209360848361189a565b5f806001600160a01b036122b293169360208151910182865af16122ab612098565b90836122fe565b80519081151591826122da575b50506122c85750565b635274afe760e01b5f5260045260245ffd5b81925090602091810103126102955760200151801590811503610295575f806122bf565b90612322575080511561231357805190602001fd5b630a12f52160e11b5f5260045ffd5b8151158061234f575b612333575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b1561232b56fea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/INITIAL_ROLE_STAKES.md b/api/@aastar/core/variables/INITIAL_ROLE_STAKES.md index 816466169..62726a043 100644 --- a/api/@aastar/core/variables/INITIAL_ROLE_STAKES.md +++ b/api/@aastar/core/variables/INITIAL_ROLE_STAKES.md @@ -1,12 +1,12 @@ > `const` **INITIAL\_ROLE\_STAKES**: `object` -Defined in: [packages/core/src/roles.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L172) +Defined in: [packages/core/src/roles.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L172) Exact stake requirements from Registry.sol constructor (lines 92-100) ## Index Signature -\[`key`: `string`\]: \{ `additionalRequirement?`: `undefined`; `entryBurn`: `"3 GT"`; `exitFeePercent`: `"10%"`; `line`: `92`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; \} \| \{ `additionalRequirement`: `"aPNTs collateral in SuperPaymaster"`; `entryBurn`: `"5 GT"`; `exitFeePercent`: `"10%"`; `line`: `93`; `lockDuration`: `"30 days"`; `minExitFee`: `"2 GT"`; `minStake`: `"50 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `entryBurn`: `"3 GT"`; `exitFeePercent`: `"10%"`; `line`: `94`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `entryBurn`: `"2 GT"`; `exitFeePercent`: `"10%"`; `line`: `95`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"20 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `entryBurn`: `"10 GT"`; `exitFeePercent`: `"10%"`; `line`: `98`; `lockDuration`: `"30 days"`; `minExitFee`: `"5 GT"`; `minStake`: `"100 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `entryBurn`: `"3 GT"`; `exitFeePercent`: `"5%"`; `line`: `99`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; \} \| \{ `additionalRequirement`: `"Must hold MySBT from community"`; `entryBurn`: `"0.05 GT"`; `exitFeePercent`: `"10%"`; `line`: `100`; `lockDuration`: `"7 days"`; `minExitFee`: `"0.05 GT"`; `minStake`: `"0.3 GT"`; \} +\[`key`: `string`\]: \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `92`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; `ticketPrice`: `"3 GT"`; \} \| \{ `additionalRequirement`: `"aPNTs collateral in SuperPaymaster"`; `exitFeePercent`: `"10%"`; `line`: `93`; `lockDuration`: `"30 days"`; `minExitFee`: `"2 GT"`; `minStake`: `"50 GT"`; `ticketPrice`: `"5 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `94`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; `ticketPrice`: `"3 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `95`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"20 GT"`; `ticketPrice`: `"2 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `98`; `lockDuration`: `"30 days"`; `minExitFee`: `"5 GT"`; `minStake`: `"100 GT"`; `ticketPrice`: `"10 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"5%"`; `line`: `99`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; `ticketPrice`: `"3 GT"`; \} \| \{ `additionalRequirement`: `"Must hold MySBT from community"`; `exitFeePercent`: `"10%"`; `line`: `100`; `lockDuration`: `"7 days"`; `minExitFee`: `"0.05 GT"`; `minStake`: `"0.3 GT"`; `ticketPrice`: `"0.05 GT"`; \} ## Warning diff --git a/api/@aastar/core/variables/LINKS.md b/api/@aastar/core/variables/LINKS.md index eddd8448a..39674226f 100644 --- a/api/@aastar/core/variables/LINKS.md +++ b/api/@aastar/core/variables/LINKS.md @@ -1,6 +1,6 @@ > `const` **LINKS**: `object` -Defined in: [packages/core/src/branding.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/branding.ts#L24) +Defined in: [packages/core/src/branding.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/branding.ts#L24) ## Type Declaration diff --git a/api/@aastar/core/variables/MAX_SERVICE_FEE.md b/api/@aastar/core/variables/MAX_SERVICE_FEE.md index cf52b282b..eb2a8308c 100644 --- a/api/@aastar/core/variables/MAX_SERVICE_FEE.md +++ b/api/@aastar/core/variables/MAX_SERVICE_FEE.md @@ -1,3 +1,3 @@ > `const` **MAX\_SERVICE\_FEE**: `1000` = `1000` -Defined in: [packages/core/src/constants.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L81) +Defined in: [packages/core/src/constants.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L87) diff --git a/api/@aastar/core/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md b/api/@aastar/core/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md new file mode 100644 index 000000000..1524754bc --- /dev/null +++ b/api/@aastar/core/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md @@ -0,0 +1,3 @@ +> **MICRO\_PAYMENT\_CHANNEL\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L44) diff --git a/api/@aastar/core/variables/MONITORING_ADDRESSES.md b/api/@aastar/core/variables/MONITORING_ADDRESSES.md index b736b7c1c..c30c1f8be 100644 --- a/api/@aastar/core/variables/MONITORING_ADDRESSES.md +++ b/api/@aastar/core/variables/MONITORING_ADDRESSES.md @@ -1,6 +1,6 @@ > `const` **MONITORING\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L78) +Defined in: [packages/core/src/contract-addresses.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L84) Monitoring System Addresses diff --git a/api/@aastar/core/variables/MicroPaymentChannelABI.md b/api/@aastar/core/variables/MicroPaymentChannelABI.md new file mode 100644 index 000000000..eabe62132 --- /dev/null +++ b/api/@aastar/core/variables/MicroPaymentChannelABI.md @@ -0,0 +1,3 @@ +> `const` **MicroPaymentChannelABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L111) diff --git a/api/@aastar/core/variables/MicroPaymentChannelArtifact.md b/api/@aastar/core/variables/MicroPaymentChannelArtifact.md new file mode 100644 index 000000000..42a0088bd --- /dev/null +++ b/api/@aastar/core/variables/MicroPaymentChannelArtifact.md @@ -0,0 +1,13 @@ +> `const` **MicroPaymentChannelArtifact**: `object` = `MicroPaymentChannelABIData` + +Defined in: [packages/core/src/abis/index.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L112) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x61012060405234610190576117ab6020813803918261001d81610194565b93849283398101031261019057516001600160a01b0381169081900361019057306080524660a05260a06100516040610194565b6013815260208101907f4d6963726f5061796d656e744368616e6e656c0000000000000000000000000082526100876040610194565b91600583526020830191640312e302e360dc1b8352519020915190208160c0528060e052604051917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260208301526040820152466060820152306080820152206101005260015f55801561017d5760015460405191806001600160a01b0383167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160e01b03199091161760e160a21b176001556115dd90816101ce8239608051816111f8015260a0518161121b015260c051816112fc015260e05181611322015261010051816111d70152f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f3560e01c80630771c1d114610dff5780633545a60814610de35780633ab95af914610cb357806343d41c9e14610a7357806354fd4d5014610a105780636221a1f514610902578063715018a6146108b0578063783c29bb14610893578063831c2b821461076957806384b0196e1461068157806389ff9d781461062c5780638da5cb5b146106065780638ef66e271461036357806394739e8714610329578063dd573587146101ba578063e7084b7e14610190578063e8a5a066146101615763f2fde38b146100df575f80fd5b3461015d57602036600319011261015d576001600160a01b0361010061101c565b610108611358565b16801561014a576001600160a01b03600154828219821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b3461015d57602036600319011261015d576004355f526003602052602060ff60405f2054166040519015158152f35b3461015d575f36600319011261015d57602067ffffffffffffffff60015460a01c16604051908152f35b3461015d57604036600319011261015d576004356024356001600160801b0381169081810361015d576101eb611125565b825f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57825f52600260205260405f206001600160a01b0381541633036102fc5782156102ed5760048101836001600160801b03825416016001600160801b0381116102d9577f73f79dc74e3752c88c5b0df459fdf3239308f420f0ead3f9fddbdf296dc35f0e946001600160a01b0360026001600160801b0395866102a6951687198754161786550154163090339061137f565b5416906102d0604051928392839092916001600160801b0360209181604085019616845216910152565b0390a260015f55005b634e487b7160e01b5f52601160045260245ffd5b63162908e360e11b5f5260045ffd5b6309f9fa4f60e21b5f5260045ffd5b63c9f3b55960e01b5f5260045ffd5b630781f76560e21b5f5260045ffd5b3461015d575f36600319011261015d5760206040517fe97c93f01d3ef8eaba1586553df13308f236815bf4ea49c7b696895d8f5ea68a8152f35b3461015d5760a036600319011261015d5761037c61101c565b6024356001600160a01b03811680910361015d57604435906001600160801b03821680920361015d57608435926001600160a01b03841680940361015d576103c2611125565b82156102ed576001600160a01b03169182156102ed5781156102ed573383146105f757604051602081019033825284604082015283606082015260643560808201528560a08201523060c08201524660e082015260e0815261042661010082611083565b51902093845f5260026020526001600160a01b0360405f2054166105e857845f52600360205260ff60405f2054166105d95760405161046481611052565b338152602080820186815260408084018781526060850195865260808086018881525f60a0880181815260c0890182815260e08a018381528f84526002998a9052969092209851895473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03928316178b55975160018b0180548a1691831691909117905594519789018054881698861698909817909755975160038801805490961693169290921790935551925190911b6fffffffffffffffffffffffffffffffff19166001600160801b0390921691909117600483015590600501915167ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1983541617825551151581549060401b68ff0000000000000000169068ff0000000000000000191617905530813391610597928561137f565b604051918252602082015282339160407f63c68527db63abeeb27e8ea4a2417a032ac5cd83b3ffaf2700c15ba4f6c15cf091a460015f55604051908152602090f35b6323b87dad60e01b5f5260045ffd5b630ec0f14960e01b5f5260045ffd5b6376f5af9f60e11b5f5260045ffd5b3461015d575f36600319011261015d5760206001600160a01b0360015416604051908152f35b3461015d57602036600319011261015d57600435610648611125565b805f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b5761067b906110a5565b60015f55005b3461015d575f36600319011261015d5761070b60406107188151916106a68184611083565b601383527f4d6963726f5061796d656e744368616e6e656c00000000000000000000000000602084015280516106dc8282611083565b60058152640312e302e360dc1b60208201528151948594600f60f81b865260e0602087015260e0860190610ff8565b9184830390850152610ff8565b4660608301523060808301525f60a083015281810360c083015260206060519182815201906080905f5b818110610750575050500390f35b8251845285945060209384019390920191600101610742565b3461015d57602036600319011261015d575f60e060405161078981611052565b8281528260208201528260408201528260608201528260808201528260a08201528260c082015201526004355f52600260205261010060405f206040516107cf81611052565b67ffffffffffffffff806001600160801b0360a081856001600160a01b0380895416988983528180600183015416602085019081528180600285015416916040870192835260ff60e06005846003890154169760608b0198895260048101549c8b8d8f9d6080019d168d52019c60801c8d5201549e8f60c082019e8f91169052019d60401c1615158d526040519d8e52511660208d0152511660408b01525116606089015251166080870152511660a0850152511660c083015251151560e0820152f35b3461015d575f36600319011261015d576020604051620151808152f35b3461015d575f36600319011261015d576108c8611358565b5f6001600160a01b0360015481198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461015d57602036600319011261015d5760043567ffffffffffffffff81169081810361015d57610931611358565b61012c82108015610a04575b6109be577fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff907fca899dbf080b3238e556d3924f56a15f7af0a4de975d19ae28431de5754f754260406001549481519067ffffffffffffffff8760a01c1682526020820152a1911660a09190911b67ffffffffffffffff60a01b1617600155005b6040516305519d6f60e51b815260206004820152601960248201527f636c6f736554696d656f7574206f7574206f662072616e6765000000000000006044820152606490fd5b5062015180821161093d565b3461015d575f36600319011261015d57610a6f604051610a31604082611083565b601981527f4d6963726f5061796d656e744368616e6e656c2d312e322e30000000000000006020820152604051918291602083526020830190610ff8565b0390f35b3461015d57610a8136610f8f565b90610a8a611125565b835f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57835f52600260205260405f2090600182016001600160a01b038154163303610ca45760048301918254958660801c956001600160801b03821697878910610c95576001600160801b03168811610c8657610b47876001600160801b0394610b73937f3900aaf06a211844dfd71554da2fb6d449fb270e7b4b3a3c624d02329e5703259a8d9c11610c73575b505083611032565b85546001600160801b031660809390931b6fffffffffffffffffffffffffffffffff1916929092178555565b60058501805468ff00000000000000001916680100000000000000001790551680610c50575b5050610bb381546001600160801b038160801c9116611032565b916001600160801b03831680610c2d575b5050546040805160809290921c82526001600160801b03929092166020820152a2805f52600360205260405f20600160ff198254161790555f52600260205261067b60405f2060055f918281558260018201558260028201558260038201558260048201550155565b816001600160a01b03806002610c499501541691541690611143565b8580610bc4565b610c6c916001600160a01b038060028701541691541690611143565b8580610b99565b610c7f91868d8c611181565b8b80610b3f565b63770d1ccb60e01b5f5260045ffd5b6340e63d1160e11b5f5260045ffd5b630f9f8bb160e21b5f5260045ffd5b3461015d57610cc136610f8f565b91610cca611125565b835f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57835f52600260205260405f20600181016001600160a01b038154163303610ca45760048201938454908160801c916001600160801b0386169083821115610c95576001600160801b031610610c8657600284610daa87610d8f6001600160a01b0396610d897fca804f3663aaa109bfb233841bc2956ef23bf9a64db0183b7387e04c48d322b19d8f98858b9a610dc09e611181565b82611032565b99906001600160801b0382549181199060801b169116179055565b0154169154166001600160801b03851691611143565b604080516001600160801b039283168152929091166020830152819081016102d0565b3461015d575f36600319011261015d57602060405161012c8152f35b3461015d57602036600319011261015d57600435610e1b611125565b805f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57805f52600260205260405f206001600160a01b038154168033036102fc57600582019081549067ffffffffffffffff82168015610f805767ffffffffffffffff60015460a01c1681018091116102d957421115610f715784937ffca9fa5eb605eef37bc81f65aa2978fdab527c2da02ea18e1b9847445f6eca0f936801000000000000000060209468ff000000000000000019161790556001600160801b03610ef86004830154828160801c9116611032565b16809281610f53575b505050604051908152a2805f52600360205260405f20600160ff198254161790555f52600260205261067b60405f2060055f918281558260018201558260028201558260038201558260048201550155565b6001600160a01b036002610f6994015416611143565b858181610f01565b631568cfcb60e21b5f5260045ffd5b63f15dbef360e01b5f5260045ffd5b90606060031983011261015d57600435916024356001600160801b038116810361015d579160443567ffffffffffffffff811161015d578260238201121561015d5780600401359267ffffffffffffffff841161015d576024848301011161015d576024019190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361015d57565b906001600160801b03809116911603906001600160801b0382116102d957565b610100810190811067ffffffffffffffff82111761106f57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff82111761106f57604052565b805f52600260205260405f206001600160a01b0381541633036102fc5760050167ffffffffffffffff81541661112157805467ffffffffffffffff19164267ffffffffffffffff169081179091556040519081527f9fd5c1db29e4aeb4f968f62fc18602aad1cca0f99be64b456a6c4f4052d63b1490602090a2565b5050565b60025f54146111345760025f55565b633ee5aeb560e01b5f5260045ffd5b61117f926001600160a01b036040519363a9059cbb60e01b602086015216602484015260448301526044825261117a606483611083565b6113c0565b565b9392916001600160801b036040519160208301937fe97c93f01d3ef8eaba1586553df13308f236815bf4ea49c7b696895d8f5ea68a85526040840152166060820152606081526111d2608082611083565b5190207f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000030147f0000000000000000000000000000000000000000000000000000000000000000461416156112d1575b6719010000000000005f52601a52603a5260426018205f603a526112738383836001600160a01b03885416611472565b938415806112bb575b61129b575b505050501561128c57565b638baa579f60e01b5f5260045ffd5b600301546112b294506001600160a01b0316611472565b5f808080611281565b506001600160a01b03600382015416151561127c565b5060a06040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f000000000000000000000000000000000000000000000000000000000000000060208201527f0000000000000000000000000000000000000000000000000000000000000000604082015246606082015230608082015220611243565b6001600160a01b0360015416330361136c57565b63118cdaa760e01b5f523360045260245ffd5b9091926001600160a01b0361117f9481604051956323b872dd60e01b602088015216602486015216604484015260648301526064825261117a608483611083565b5f6001600160a01b038192169260208151910182855af13d15611466573d67ffffffffffffffff811161106f5760405161141a92909161140a601f8201601f191660200184611083565b82523d5f602084013e5b83611576565b8051908115159182611442575b50506114305750565b635274afe760e01b5f5260045260245ffd5b819250906020918101031261015d576020015180159081150361015d575f80611427565b61141a90606090611414565b90919392935f906001600160a01b0383161561156d576040519160048301602484019560448501916064860193873b156114dc5750936064938a80948a9b9c9460209b9a9998630b135d3f60e11b8a525260408a52523701915afa9051630b135d3f60e11b141690565b999350509395505080604014611529576041146114f95750505050565b60408092939496508101355f1a60205281375b5f526020600160805f825afa511860601b3d11915f606052604052565b507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9192939550602081013590601b8260ff1c01602052356040521660605261150c565b505f9450505050565b9061159a575080511561158b57805190602001fd5b630a12f52160e11b5f5260045ffd5b815115806115c7575b6115ab575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156115a356fea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/MySBTABI.md b/api/@aastar/core/variables/MySBTABI.md index a7967445e..c513ec7d7 100644 --- a/api/@aastar/core/variables/MySBTABI.md +++ b/api/@aastar/core/variables/MySBTABI.md @@ -1,3 +1,3 @@ > `const` **MySBTABI**: `any` -Defined in: [packages/core/src/abis/index.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L73) +Defined in: [packages/core/src/abis/index.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L107) diff --git a/api/@aastar/core/variables/MySBTArtifact.md b/api/@aastar/core/variables/MySBTArtifact.md index 214b650d9..d282e3df7 100644 --- a/api/@aastar/core/variables/MySBTArtifact.md +++ b/api/@aastar/core/variables/MySBTArtifact.md @@ -1,6 +1,6 @@ > `const` **MySBTArtifact**: `object` = `MySBTABIData` -Defined in: [packages/core/src/abis/index.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L74) +Defined in: [packages/core/src/abis/index.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L108) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:74](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60c06040523461020a576138666080813803918261001c81610438565b93849283398101031261020a576100328161045d565b9061003f6020820161045d565b61005760606100506040850161045d565b930161045d565b926100626040610438565b601981527f4d7963656c69756d20536f756c20426f756e6420546f6b656e0000000000000060208201526100966040610438565b6005815264135e54d09560da1b6020820152815190916001600160401b038211610337575f5490600182811c9216801561042e575b60208310146103195781601f8493116103b9575b50602090601f8311600114610356575f9261034b575b50508160011b915f199060031b1c1916175f555b8051906001600160401b0382116103375760015490600182811c9216801561032d575b60208310146103195781601f8493116102a3575b50602090601f831160011461023d575f92610232575b50508160011b915f199060031b1c1916176001555b600160068190556007805460ff19169055601255670429d069189e000060135567016345785d8a00006014556001600160a01b038116151580610220575b8061020e575b1561020a5760805260a052600e80546001600160a01b039283166001600160a01b031991821617909155600f80549390921692169190911790556040516133f49081610472823960805181610e00015260a05181610d850152f35b5f80fd5b506001600160a01b03841615156101af565b506001600160a01b03821615156101a9565b015190505f80610156565b60015f9081528281209350601f198516905b81811061028b5750908460019594939210610273575b505050811b0160015561016b565b01515f1960f88460031b161c191690555f8080610265565b9293602060018192878601518155019501930161024f565b828111156101405760015f52909150601f830160051c7fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660208510610311575b849392601f0160051c82900391015f5b828110610301575050610140565b5f818301558594506001016102f3565b5f91506102e3565b634e487b7160e01b5f52602260045260245ffd5b91607f169161012c565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100f5565b5f8080528281209350601f198516905b8181106103a15750908460019594939210610389575b505050811b015f55610109565b01515f1960f88460031b161c191690555f808061037c565b92936020600181928786015181550195019301610366565b828111156100df575f8052909150601f830160051c7f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56360208510610426575b849392601f0160051c82900391015f5b8281106104165750506100df565b5f81830155859450600101610408565b5f91506103f8565b91607f16916100cb565b6040519190601f01601f191682016001600160401b0381118382101761033757604052565b51906001600160a01b038216820361020a5756fe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714611c875750806306433b1b14611c6157806306fdde0314611bbf578063081812fc14611b825780630880427514611b65578063095ea7b314611a485780630f68ae40146119cc57806313966db5146119af57806323b872dd146119985780632d5a7f4f14610da95780632f7c88f514611819578063374e7fa31461159c5780633e3e68421461155c5780633f4ba83a146114a357806342842e0e1461147a5780634f8cc065146113ea57806354fd4d501461138b578063556697da1461129957806355f804b3146110df5780635afc4b5c146110a85780635bb5bf0c146110725780635c975abb146110505780636352211e1461102157806370a0823114610fb757806371eb90a114610ef557806375794a3c14610ed8578063776fafac14610e7a5780637e21579114610e245780637f6b337b14610de157806380f4b8c814610da9578063826600ce14610d665780638456cb5914610cd35780638ceebd8f14610b4d578063908c101814610b0857806395d89b4114610a3e578063a1141b07146109f9578063a22cb4651461093b578063a61096501461089f578063a91ee0dc14610806578063b88d4fde146107a6578063bead05131461076d578063bf1fb0f2146106c8578063c0d0aa69146106a2578063c580163e1461064b578063c87b56dd14610376578063ccbc10d014610350578063d977b66b1461030e578063e985e9c5146102b55763eddd0d9c14610237575f80fd5b346102b15760206003193601126102b1577fd3950a5507479ea19c5c7766f5191546ace60f0a00dc360d52ce083b58f223316004356102826001600160a01b03600f54163314611fb1565b60145490806014556102ac6040519283924291846040919493926060820195825260208201520152565b0390a1005b5f80fd5b346102b15760406003193601126102b1576102ce611d7b565b6001600160a01b036102de611d91565b91165f5260056020526001600160a01b0360405f2091165f52602052602060ff60405f2054166040519015158152f35b346102b15760406003193601126102b15761034e61032a611d7b565b610332611d91565b906103496001600160a01b03600e541633146122bc565b6132eb565b005b346102b1575f6003193601126102b15760206001600160a01b0360105416604051908152f35b346102b15760206003193601126102b15760043561039381612faa565b5060405160115490915f836103a784611f60565b9182825260208201946001811690815f1461062f57506001146105d0575b6103d192500384611eeb565b8251156105b4578092815f927a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000811015610589575b50806d04ee2d6d415b85acef8100000000600a92101561056e575b662386f26fc1000081101561055a575b6305f5e100811015610549575b61271081101561053a575b606481101561052c575b1015610522575b6001820193600a5f19602161048261046c89611f0e565b9861047a6040519a8b611eeb565b808a52611f0e565b95601f1960208a0197013688378801015b01917f30313233343536373839616263646566000000000000000000000000000000008282061a8353049081156104cf57600a905f1990610493565b5050602061050a9261051e956040519586945180918587015e840190838201905f8252519283915e01015f815203601f198101835282611eeb565b604051918291602083526020830190611d56565b0390f35b9060010190610455565b60646002910493019261044e565b61271060049104930192610444565b6305f5e10060089104930192610439565b662386f26fc100006010910493019261042c565b6d04ee2d6d415b85acef81000000006020910493019261041c565b604093507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000090049050600a610401565b50505061051e6040516105c8602082611eeb565b5f815261050a565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b8183106106135750509060206103d1928201016103c5565b6020919350806001915483858a010152019101909185926105fb565b60ff19168652506103d192151560051b820160200190506103c5565b346102b15761068b61065c36611e23565b92909150610668612ff6565b610670613169565b6106866001600160a01b03600e541633146122bc565b612df1565b600160065560408051928352901515602083015290f35b346102b1575f6003193601126102b15760206001600160a01b03600f5416604051908152f35b346102b15760206003193601126102b1575f60606040516106e881611ecf565b82815282602082015282604082015201526004355f526009602052608060405f2060405161071581611ecf565b6001600160a01b03825416918282526001600160a01b03806001830154166020840190815260606003600285015494604087019586520154940193845260405194855251166020840152516040830152516060820152f35b346102b15760206003193601126102b15761079f610789611d7b565b610791612ff6565b610799613169565b336132eb565b6001600655005b346102b15760806003193601126102b1576107bf611d7b565b6107c7611d91565b6064359167ffffffffffffffff83116102b157366023840112156102b1576107fc61034e933690602481600401359101611f2a565b9160443591612c22565b346102b15760206003193601126102b1576001600160a01b03610827611d7b565b61083682600f54163314611fb1565b1680156102b157600e54817fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600e557f724c89272c35417e239c6cd89ada342e0717632938f38b47eaacecacf291ace260206001600160a01b03604051934285521692a3005b346102b15760206003193601126102b1576108b8611d7b565b6108ce6001600160a01b03600f54163314611fb1565b6001600160a01b03601054911690817fffffffffffffffffffffffff00000000000000000000000000000000000000008216176010557fb71a92720c720f655d24a8ebbeeb4c9875d85189ca58d32cb0e6997aa5e6c29160206001600160a01b03604051934285521692a3005b346102b15760406003193601126102b157610954611d7b565b60243590811515908183036102b1576001600160a01b03169182156109cd5761099f90335f52600560205260405f20845f5260205260405f209060ff60ff1983541691151516179055565b6040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b827f5b08ba18000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b346102b15760406003193601126102b157610a12611d91565b6004355f52600b6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102b1575f6003193601126102b1576040515f600154610a5e81611f60565b8084529060018116908115610ae45750600114610a86575b61051e8361050a81850382611eeb565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b808210610aca5750909150810160200161050a610a76565b919260018160209254838588010152019101909291610ab2565b60ff191660208086019190915291151560051b8401909101915061050a9050610a76565b346102b15760406003193601126102b157610b21611d91565b6004355f52600d6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102b15760206003193601126102b1576004355f52600a60205260405f208054610b77816129ba565b91610b856040519384611eeb565b81835260208301905f5260205f205f915b838310610cb5575f85815b8151811015610bda576060610bb68284612c0e565b510151610bc6575b600101610ba1565b91610bd26001916125a5565b929050610bbe565b50610bfd610be7836129ba565b92610bf56040519485611eeb565b8084526129ba565b90601f196020840192013683375f5f5b8251811015610c66576060610c228285612c0e565b510151610c32575b600101610c0d565b90610c5e6001916001600160a01b03610c4b8587612c0e565b515116610c588289612c0e565b526125a5565b919050610c2a565b50505090604051918291602083019060208452518091526040830191905f5b818110610c93575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610c85565b60056020600192610cc5856129d2565b815201920192019190610b96565b346102b1575f6003193601126102b157610cf96001600160a01b03600f54163314611fb1565b610d01612ff6565b600160ff1960075416176007557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a16040514281527f80170b5fcdd2bf1e0660ef4b8851f86685f64d41b1a19de1471947ece8725aac60203392a2005b346102b1575f6003193601126102b15760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b15760206003193601126102b1576001600160a01b03610dca611d7b565b165f526008602052602060405f2054604051908152f35b346102b1575f6003193601126102b15760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b15760606003193601126102b157610e3d611d91565b6004355f52600c6020526001600160a01b0360405f2091165f5260205260405f206044355f52602052602060ff60405f2054166040519015158152f35b346102b15760206003193601126102b1576004355f526009602052608060405f206001600160a01b03815416906001600160a01b03600182015416906003600282015491015491604051938452602084015260408301526060820152f35b346102b1575f6003193601126102b1576020601254604051908152f35b346102b15760406003193601126102b157600435610f11611d91565b9060606080604051610f2281611eb3565b5f81525f60208201525f60408201525f838201520152805f52600b60205260405f206001600160a01b0383165f5260205260405f205490805f52600a60205260405f20548210156102b157610f8b91610f85915f52600a60205260405f20612276565b506129d2565b906001600160a01b03808351169116036102b15761051e90604051918291602083526020830190611e6a565b346102b15760206003193601126102b1576001600160a01b03610fd8611d7b565b168015610ff5575f526003602052602060405f2054604051908152f35b7f89c62b64000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b346102b15760206003193601126102b157602061103f600435612faa565b6001600160a01b0360405191168152f35b346102b1575f6003193601126102b157602060ff600754166040519015158152f35b346102b15760406003193601126102b157602061109e611090611d7b565b611098611d91565b90612b74565b6040519015158152f35b346102b15760206003193601126102b15761034e6110c4611d7b565b6110da6001600160a01b03600e541633146122bc565b612abb565b346102b15760206003193601126102b15760043567ffffffffffffffff81116102b157611110903690600401611df5565b6111266001600160a01b03600f54163314611fb1565b67ffffffffffffffff811161126c57611140601154611f60565b601f81116111fe575b505f601f8211600114611186578190611176935f9261117b575b50505f198260011b9260031b1c19161790565b601155005b013590508380611163565b601f198216927f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68915f5b8581106111e6575083600195106111cd575b505050811b01601155005b5f1960f88560031b161c199101351690558280806111c2565b909260206001819286860135815501940191016111b0565b818111156111495760115f52601f820160051c7f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c6860208410611264575b81601f9101920160051c03905f5b828110611257575050611149565b5f82820155600101611249565b5f915061123b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b346102b15760206003193601126102b1576004355f52600a60205260405f208054906112c4826129ba565b916112d26040519384611eeb565b8083526020830180925f5260205f205f915b83831061136d57848660405191829160208301906020845251809152604083019060408160051b85010192915f905b82821061132257505050500390f35b9193602061135d827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851611e6a565b9601920192018594939192611313565b6005602060019261137d856129d2565b8152019201920191906112e4565b346102b1575f6003193601126102b15761051e6040516113ac604082611eeb565b600b81527f4d795342542d332e312e320000000000000000000000000000000000000000006020820152604051918291602083526020830190611d56565b346102b15760206003193601126102b157611403611d7b565b600f54906001600160a01b038083169161141e833314611fb1565b169182156102b1577fffffffffffffffffffffffff000000000000000000000000000000000000000083911617600f557f90de8705b1aaf3966be0e8ec8acf9aed10a6d3d0d572ec8f96112409e2820c616020604051428152a3005b346102b15761034e61148b36611dbb565b906040519261149b602085611eeb565b5f8452612c22565b346102b1575f6003193601126102b1576114c96001600160a01b03600f54163314611fb1565b60075460ff8116156115345760ff19166007557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16040514281527f107553d8191d85b405879cf752997865edd48d94e20bda4dd27223c94b31a7cc60203392a2005b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b346102b15761068b61156d36611e23565b92909150611579612ff6565b611581613169565b6115976001600160a01b03600e541633146122bc565b6125cf565b346102b15760206003193601126102b1576001600160a01b036115bd611d7b565b6115c5612ff6565b6115cd613169565b6115dc82600e541633146122bc565b16805f52600860205260405f205490811515806117ff575b156102b157815f52600a60205260405f205f5b815481101561168b578060ff600361162160019486612276565b50015416611630575b01611607565b600361163c8285612276565b500160ff1981541690556001600160a01b036116588285612276565b505416857fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a361162a565b5050805f5260086020525f6040812055815f5260026020526001600160a01b0360405f2054161580156117f7575b156102b157815f5260026020526001600160a01b0360405f20541680159081156117a8575b835f52600260205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055835f827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a45061177c577f108d98610c6944880c68d31a01ab6252b635e7c7a9728687f31e68a76538c86560606013546040519081525f6020820152426040820152a36001600655005b507f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6117df845f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b805f52600360205260405f205f1981540190556116de565b5060016116b9565b50806001600160a01b0361181284612faa565b16146115f4565b346102b15760206003193601126102b157611832611d7b565b61183a612ff6565b61184333613042565b156102b1576001600160a01b03165f52600860205260405f205480156102b157805f52600b60205260405f206001600160a01b0333165f5260205260405f2054815f52600a60205260405f20548110908161196f575b50156102b157805f52600d60205260405f206001600160a01b0333165f5260205260405f2054801590811561192b575b50156102b157805f52600d60205260405f206001600160a01b0333165f5260205260405f204290556040519062093a80420482524260208301527f0bd2c5444bc0126737809a3970e1c3bc8cf29e5efb7d5448cbaa6a9c1af8120760403393a3005b905061012c810180911161194257421015826118c9565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b6119859150825f52600a60205260405f20612276565b50546001600160a01b0316331482611899565b346102b15761034e6119a936611dbb565b91612016565b346102b1575f6003193601126102b1576020601454604051908152f35b346102b15760206003193601126102b1576004356119f66001600160a01b03600f54163314611fb1565b80156102b1577f5d1f56e31e5dc1f29354822b887b1463ececf7edfad7c39216980b7dfd7ea97d9060135490806013556102ac6040519283924291846040919493926060820195825260208201520152565b346102b15760406003193601126102b157611a61611d7b565b602435611a6d81612faa565b33151580611b52575b80611b1f575b611af35781906001600160a01b0380851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f5260046020526001600160a01b0360405f2091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b7fa9fbf51f000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b506001600160a01b0381165f52600560205260405f206001600160a01b0333165f5260205260ff60405f20541615611a7c565b50336001600160a01b0382161415611a76565b346102b1575f6003193601126102b1576020601354604051908152f35b346102b15760206003193601126102b157600435611b9f81612faa565b505f52600460205260206001600160a01b0360405f205416604051908152f35b346102b1575f6003193601126102b1576040515f5f54611bde81611f60565b8084529060018116908115610ae45750600114611c055761051e8361050a81850382611eeb565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210611c475750909150810160200161050a610a76565b919260018160209254838588010152019101909291611c2f565b346102b1575f6003193601126102b15760206001600160a01b03600e5416604051908152f35b346102b15760206003193601126102b157600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036102b157817f80ac58cd0000000000000000000000000000000000000000000000000000000060209314908115611d2c575b8115611d02575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483611cfb565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150611cf4565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b600435906001600160a01b03821682036102b157565b602435906001600160a01b03821682036102b157565b35906001600160a01b03821682036102b157565b60031960609101126102b1576004356001600160a01b03811681036102b157906024356001600160a01b03811681036102b1579060443590565b9181601f840112156102b15782359167ffffffffffffffff83116102b157602083818601950101116102b157565b60606003198201126102b1576004356001600160a01b03811681036102b15791602435916044359067ffffffffffffffff82116102b157611e6691600401611df5565b9091565b9060a06080611eb0936001600160a01b03815116845260208101516020850152604081015160408501526060810151151560608501520151918160808201520190611d56565b90565b60a0810190811067ffffffffffffffff82111761126c57604052565b6080810190811067ffffffffffffffff82111761126c57604052565b90601f601f19910116810190811067ffffffffffffffff82111761126c57604052565b67ffffffffffffffff811161126c57601f01601f191660200190565b929192611f3682611f0e565b91611f446040519384611eeb565b8294818452818301116102b1578281602093845f960137010152565b90600182811c92168015611fa7575b6020831014611f7a57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611f6f565b15611fb857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f4f6e6c792044414f0000000000000000000000000000000000000000000000006044820152fd5b91906001600160a01b0316801561224a57815f5260026020526001600160a01b0360405f205416158015612243575b156102b157815f5260026020526001600160a01b0360405f20541692823315159283612175575b6001600160a01b03935085612126575b805f52600360205260405f2060018154019055815f52600260205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4168083036120f557505050565b7f64283d7b000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b61215d825f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b855f52600360205260405f205f19815401905561207c565b91929050806121ec575b1561218c5782829161206c565b82846121bd577f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f177e802f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b50338414801561221a575b8061217f5750825f526004602052336001600160a01b0360405f2054161461217f565b50835f52600560205260405f206001600160a01b0333165f5260205260ff60405f2054166121f7565b505f612045565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b805482101561228f575f52600560205f20910201905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b156122c357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f6e6c79205265676973747279000000000000000000000000000000000000006044820152fd5b1561232857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964207573657200000000000000000000000000000000000000006044820152fd5b91906040838203126102b15761239b83611da7565b9260208101359067ffffffffffffffff82116102b157019080601f830112156102b157816020611eb093359101611f2a565b91909180546801000000000000000081101561126c576123f291600182018155612276565b6125795760046080916001600160a01b0380865116167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416178155602085015160018201556040850151600282015561246360608601511515600383019060ff60ff1983541691151516179055565b0192015191825167ffffffffffffffff811161126c576124838254611f60565b601f8111612528575b506020601f82116001146124ca5781906124bb9394955f926124bf5750505f198260011b9260031b1c19161790565b9055565b015190505f80611163565b601f19821690835f52805f20915f5b818110612510575095836001959697106124f8575b505050811b019055565b01515f1960f88460031b161c191690555f80806124ee565b9192602060018192868b0151815501940192016124d9565b8181111561248c57825f5260205f20601f830160051c9060208410612571575b81601f9101920160051c03905f5b82811061256457505061248c565b5f82820155600101612556565b5f9150612548565b7f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f1981146119425760010190565b9291906125ca602091604086526040860190611d56565b930152565b929091926001600160a01b0381166125e8811515612321565b805f52600860205260405f205480155f146127a457506012549061260b826125a5565b6012558195600195818101946020828703126102b15784612788916127647ff5491bdb765a4be5a1bdc9bfd09cf61e1b89962ac33ed2e928f11a59a5e72331956001600160a01b0361265c87611da7565b16998c60038c6040519261266f84611ecf565b8c84526020840191825260408401904282526001600160a01b038060608701948386528c5f526009602052818060405f20995116167fffffffffffffffffffffffff0000000000000000000000000000000000000000895416178855511691860191167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551600284015551910155885f5260086020528460405f2055602096876040516127228282611eeb565b5f81529311612791575b5050835f52600a865260405f206040519161274683611eb3565b8b835242888401524260408401528d606084015260808301526123cd565b815f52600b845260405f206001600160a01b0389165f5284525f60408120556131a2565b604051428152a4565b61279b9250612386565b90505f8061272c565b94939150505f92808201916020818403126102b1576001600160a01b036127ca82611da7565b1692865f52600b60205260405f206001600160a01b0385165f5260205260405f2054875f52600a60205260405f2054811080612992575b6128fd5750602091826040516128178282611eeb565b5f815294116128e8575b5050855f52600a815261285e60405f206040519061283e82611eb3565b8582524284830152426040830152600160608301528460808301526123cd565b855f52600a815260405f2054905f19820191821161194257869260096128e3927fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db1094865f52600b825260405f206001600160a01b0389165f52825260405f2055855f5252600360405f20016128d381546125a5565b90556040519182914290836125b3565b0390a3565b6128f3929350612386565b9050905f80612821565b9394969550505050825f52600a60205260ff600361291e8360405f20612276565b500154161561292f575b5050905f90565b612946600391845f52600a60205260405f20612276565b5001600160ff19825416179055817fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db106060604051604081525f6040820152426020820152a35f80612928565b50875f52600a602052846001600160a01b036129b18360405f20612276565b50541614612801565b67ffffffffffffffff811161126c5760051b60200190565b906040516129df81611eb3565b600481936001600160a01b038154168352600181015460208401526002810154604084015260ff60038201541615156060840152019060405180925f90805490612a2882611f60565b8085529160018116908115612a945750600114612a55575b505060809291612a51910384611eeb565b0152565b5f908152602081209092505b818310612a78575050810160200181612a51612a40565b6020919350806001915483858901015201910190918492612a61565b60ff191660208681019190915292151560051b85019092019250839150612a519050612a40565b6001600160a01b03165f52600860205260405f2054908115612b7057815f52600a60205260405f20915f5b8354811015612b6a578060ff6003612b0060019488612276565b50015416612b0f575b01612ae6565b6003612b1b8287612276565b500160ff1981541690556001600160a01b03612b378287612276565b505416837fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a3612b09565b50509050565b9050565b6001600160a01b03165f52600860205260405f20548015612c0857805f52600b60205260405f206001600160a01b0383165f5260205260405f205490805f52600a60205260405f2054821015612c0157612bdc91610f85915f52600a60205260405f20612276565b906001600160a01b03808351169116149081612bf6575090565b606091500151151590565b5050505f90565b50505f90565b805182101561228f5760209160051b010190565b90612c2e838284612016565b803b612c3b575b50505050565b602091612c9a6001600160a01b038093169560405195869485947f150b7a020000000000000000000000000000000000000000000000000000000086523360048701521660248501526044840152608060648401526084830190611d56565b03815f865af15f9181612d94575b50612d1657503d15612d0f573d612cbe81611f0e565b90612ccc6040519283611eeb565b81523d5f602083013e5b80519081612d0a57827f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b602001fd5b6060612cd6565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a0200000000000000000000000000000000000000000000000000000000911603612d6957505f808080612c35565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091506020813d602011612de9575b81612db060209383611eeb565b810103126102b157517fffffffff00000000000000000000000000000000000000000000000000000000811681036102b157905f612ca8565b3d9150612da3565b929091926001600160a01b038116612e0a811515612321565b805f52600860205260405f205480155f14612e2d57506012549061260b826125a5565b94939150505f92808201916020818403126102b1576001600160a01b03612e5382611da7565b169260209182604051612e668282611eeb565b5f81529411612f95575b5050855f52600b815260405f206001600160a01b0384165f52815260405f2054865f52600a825260405f2054811080612f6e575b612ec45750855f52600a815261285e60405f206040519061283e82611eb3565b9091868096505f9794959752600a835260ff6003612ee58460405f20612276565b50015416612f6457612f47612f5c92600a7fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db1095875f528181526003612f2d8460405f20612276565b5001600160ff19825416179055875f525260405f20612276565b506001429101556040519182914290836125b3565b0390a3905f90565b5050505050905f90565b50865f52600a8252836001600160a01b03612f8c8360405f20612276565b50541614612ea4565b612fa0929350612386565b9050905f80612e70565b805f5260026020526001600160a01b0360405f205416908115612fcb575090565b7f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b60ff6007541661300257565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b908160209103126102b1575180151581036102b15790565b6001600160a01b03600e5416908115612c08576001600160a01b03604051917f91d148540000000000000000000000000000000000000000000000000000000083527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048401521690816024820152602081604481865afa5f9181613148575b5061314257506020906024604051809481937f6b10437f00000000000000000000000000000000000000000000000000000000835260048301525afa5f9181613111575b50611eb057505f90565b61313491925060203d60201161313b575b61312c8183611eeb565b81019061302a565b905f613107565b503d613122565b91505090565b61316291925060203d60201161313b5761312c8183611eeb565b905f6130c3565b60026006541461317a576002600655565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b6001600160a01b031690811561224a57805f5260026020526001600160a01b0360405f2054161580156132e4575b156102b157805f5260026020526001600160a01b0360405f205416908115159283613295575b805f52600360205260405f2060018154019055815f52600260205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a45061326957565b7f73c6ac6e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b6132cc825f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b825f52600360205260405f205f1981540190556131f6565b505f6131d0565b6001600160a01b03165f52600860205260405f205480156133ba57805f52600b60205260405f206001600160a01b0383165f5260205260405f2054815f52600a60205260405f20548110156133b55761334f90825f52600a60205260405f20612276565b506001600160a01b03808254169316809314806133a7575b61337057505050565b60030160ff1981541690557fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a3565b5060ff600382015416613367565b505050565b505056fea264697066735822122095c9b3591a32bc3207c17be68c9388a63758cdb83cfe60d91a3ed00981ae04ce64736f6c63430008210033"` +> **bytecode**: `string` = `"0x60e060405234610487576134146080813803918261001c8161048b565b93849283398101031261048757610032816104b0565b9061003f602082016104b0565b6100576060610050604085016104b0565b93016104b0565b92610062604061048b565b601981527f4d7963656c69756d20536f756c20426f756e6420546f6b656e000000000000006020820152610096604061048b565b6005815264135e54d09560da1b6020820152815190916001600160401b038211610386575f5490600182811c9216801561047d575b60208310146103685781601f849311610408575b50602090601f83116001146103a5575f9261039a575b50508160011b915f199060031b1c1916175f555b8051906001600160401b0382116103865760015490600182811c9216801561037c575b60208310146103685781601f8493116102f2575b50602090601f831160011461028c575f92610281575b50508160011b915f199060031b1c1916176001555b600160068190556007805460ff19169055601055670429d069189e000060115567016345785d8a00006012556001600160a01b038116158015610270575b801561025f575b801561024e575b61023f5760805260a05260c052600d80546001600160a01b0319166001600160a01b0392909216919091179055604051612f4f90816104c5823960805181610d88015260a05181610d0d015260c05181818161033a0152818161069c01528181610ffc015281816114e5015281816115470152818161187701528181611cc20152612c240152f35b63e6c4247b60e01b5f5260045ffd5b506001600160a01b038416156101b7565b506001600160a01b038316156101b0565b506001600160a01b038216156101a9565b015190505f80610156565b60015f9081528281209350601f198516905b8181106102da57509084600195949392106102c2575b505050811b0160015561016b565b01515f1960f88460031b161c191690555f80806102b4565b9293602060018192878601518155019501930161029e565b828111156101405760015f52909150601f830160051c7fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660208510610360575b849392601f0160051c82900391015f5b828110610350575050610140565b5f81830155859450600101610342565b5f9150610332565b634e487b7160e01b5f52602260045260245ffd5b91607f169161012c565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100f5565b5f8080528281209350601f198516905b8181106103f057509084600195949392106103d8575b505050811b015f55610109565b01515f1960f88460031b161c191690555f80806103cb565b929360206001819287860151815501950193016103b5565b828111156100df575f8052909150601f830160051c7f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56360208510610475575b849392601f0160051c82900391015f5b8281106104655750506100df565b5f81830155859450600101610457565b5f9150610447565b91607f16916100cb565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761038657604052565b51906001600160a01b03821682036104875756fe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714611ce65750806306433b1b14611ca357806306fdde0314611c01578063081812fc14611bc45780630880427514611ba7578063095ea7b314611abb5780630f68ae4014611a3457806313966db514611a1757806323b872dd14611a005780632d5a7f4f14610d315780632f7c88f514611785578063374e7fa3146115145780633e3e6842146114bb5780633f4ba83a1461141f57806342842e0e146113f65780634f8cc0651461136c57806354fd4d501461131f578063556697da1461124957806355f804b31461102b5780635afc4b5c14610fd95780635bb5bf0c14610fa35780635c975abb14610f815780636352211e14610f5257806370a0823114610f0157806371eb90a114610e2757806375794a3c14610e0a578063776fafac14610dac5780637f6b337b14610d6957806380f4b8c814610d31578063826600ce14610cee5780638456cb5914610c5f5780638ceebd8f14610ad9578063908c101814610a9457806395d89b41146109ca578063a1141b0714610985578063a22cb465146108e1578063a610965014610861578063a9eb37ba14610846578063b88d4fde146107e6578063bead0513146107ad578063bf1fb0f214610708578063c0d0aa69146106e2578063c580163e14610672578063c87b56dd146103a0578063ccbc10d01461037a578063d977b66b1461030f578063e985e9c5146102b65763eddd0d9c1461022c575f80fd5b346102b25760203660031901126102b2576004356001600160a01b03600d541633036102a3577fd3950a5507479ea19c5c7766f5191546ace60f0a00dc360d52ce083b58f2233190601254908060125561029e6040519283924291846040919493926060820195825260208201520152565b0390a1005b630999802f60e41b5f5260045ffd5b5f80fd5b346102b25760403660031901126102b2576102cf611d75565b6001600160a01b036102df611d8b565b91165f5260056020526001600160a01b0360405f2091165f52602052602060ff60405f2054166040519015158152f35b346102b25760403660031901126102b257610328611d75565b610330611d8b565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b5761036991612e6f565b005b6310f5403960e31b5f5260045ffd5b346102b2575f3660031901126102b25760206001600160a01b03600e5416604051908152f35b346102b25760203660031901126102b2576004356103bd81612bcc565b50604051600f5490915f836103d184611f33565b9182825260208201946001811690815f1461065657506001146105f7575b6103fb92500384611ebf565b8251156105db578092815f927a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008110156105b0575b50806d04ee2d6d415b85acef8100000000600a921015610595575b662386f26fc10000811015610581575b6305f5e100811015610570575b612710811015610561575b6064811015610553575b1015610549575b6001820193600a60216104aa61049488611ee1565b976104a2604051998a611ebf565b808952611ee1565b602088019590601f19013687378701015b5f1901917f30313233343536373839616263646566000000000000000000000000000000008282061a8353049081156104f657600a906104bb565b5050602061053192610545956040519586945180918587015e840190838201905f8252519283915e01015f815203601f198101835282611ebf565b604051918291602083526020830190611d51565b0390f35b906001019061047f565b606460029104930192610478565b6127106004910493019261046e565b6305f5e10060089104930192610463565b662386f26fc1000060109104930192610456565b6d04ee2d6d415b85acef810000000060209104930192610446565b604093507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000090049050600a61042b565b5050506105456040516105ef602082611ebf565b5f8152610531565b50600f5f90815290917f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8025b81831061063a5750509060206103fb928201016103ef565b6020919350806001915483858a01015201910190918592610622565b60ff19168652506103fb92151560051b820160200190506103ef565b346102b25761068036611e1d565b915061068a612bff565b610692612ccb565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576106cb92612a2b565b600160065560408051928352901515602083015290f35b346102b2575f3660031901126102b25760206001600160a01b03600d5416604051908152f35b346102b25760203660031901126102b2575f606060405161072881611ea3565b82815282602082015282604082015201526004355f526009602052608060405f2060405161075581611ea3565b6001600160a01b03825416918282526001600160a01b03806001830154166020840190815260606003600285015494604087019586520154940193845260405194855251166020840152516040830152516060820152f35b346102b25760203660031901126102b2576107df6107c9611d75565b6107d1612bff565b6107d9612ccb565b33612e6f565b6001600655005b346102b25760803660031901126102b2576107ff611d75565b610807611d8b565b6064359167ffffffffffffffff83116102b257366023840112156102b25761083c610369933690602481600401359101611efd565b91604435916128f1565b346102b2575f3660031901126102b257602060405160328152f35b346102b25760203660031901126102b25761087a611d75565b6001600160a01b03600d541633036102a3576001600160a01b03600e54911690816001600160a01b0319821617600e557fb71a92720c720f655d24a8ebbeeb4c9875d85189ca58d32cb0e6997aa5e6c29160206001600160a01b03604051934285521692a3005b346102b25760403660031901126102b2576108fa611d75565b60243590811515908183036102b2576001600160a01b03169182156109725761094490335f52600560205260405f20845f5260205260405f209060ff801983541691151516179055565b6040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b82630b61174360e31b5f5260045260245ffd5b346102b25760403660031901126102b25761099e611d8b565b6004355f52600b6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102b2575f3660031901126102b2576040515f6001546109ea81611f33565b8084529060018116908115610a705750600114610a12575b6105458361053181850382611ebf565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b808210610a5657509091508101602001610531610a02565b919260018160209254838588010152019101909291610a3e565b60ff191660208086019190915291151560051b840190910191506105319050610a02565b346102b25760403660031901126102b257610aad611d8b565b6004355f52600c6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102b25760203660031901126102b2576004355f52600a60205260405f208054610b0381612693565b91610b116040519384611ebf565b81835260208301905f5260205f205f915b838310610c41575f85815b8151811015610b66576040610b4282846128dd565b510151610b52575b600101610b2d565b91610b5e600191612313565b929050610b4a565b50610b89610b7383612693565b92610b816040519485611ebf565b808452612693565b602083019190601f19013683375f5f5b8251811015610bf2576040610bae82856128dd565b510151610bbe575b600101610b99565b90610bea6001916001600160a01b03610bd785876128dd565b515116610be482896128dd565b52612313565b919050610bb6565b50505090604051918291602083019060208452518091526040830191905f5b818110610c1f575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610c11565b60046020600192610c51856126ab565b815201920192019190610b22565b346102b2575f3660031901126102b2576001600160a01b03600d541633036102a357610c89612bff565b600160ff1960075416176007557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a16040514281527f80170b5fcdd2bf1e0660ef4b8851f86685f64d41b1a19de1471947ece8725aac60203392a2005b346102b2575f3660031901126102b25760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b25760203660031901126102b2576001600160a01b03610d52611d75565b165f526008602052602060405f2054604051908152f35b346102b2575f3660031901126102b25760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b25760203660031901126102b2576004355f526009602052608060405f206001600160a01b03815416906001600160a01b03600182015416906003600282015491015491604051938452602084015260408301526060820152f35b346102b2575f3660031901126102b2576020601054604051908152f35b346102b25760403660031901126102b257600435610e43611d8b565b90606080604051610e5381611ea3565b5f81525f60208201525f60408201520152805f52600b60205260405f206001600160a01b0383165f5260205260405f205490805f52600a60205260405f2054821015610ef257610eb791610eb1915f52600a60205260405f20612130565b506126ab565b906001600160a01b0380835116911603610ee35761054590604051918291602083526020830190611e64565b637554bad360e01b5f5260045ffd5b6363df817160e01b5f5260045ffd5b346102b25760203660031901126102b2576001600160a01b03610f22611d75565b168015610f3f575f526003602052602060405f2054604051908152f35b6322718ad960e21b5f525f60045260245ffd5b346102b25760203660031901126102b2576020610f70600435612bcc565b6001600160a01b0360405191168152f35b346102b2575f3660031901126102b257602060ff600754166040519015158152f35b346102b25760403660031901126102b2576020610fcf610fc1611d75565b610fc9611d8b565b90612843565b6040519015158152f35b346102b25760203660031901126102b257610ff2611d75565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576103699061278a565b346102b25760203660031901126102b25760043567ffffffffffffffff81116102b25761105c903690600401611def565b6001600160a01b03600d541633036102a35767ffffffffffffffff811161123557611088600f54611f33565b601f81116111c7575b505f91601f8211600114611123576060906110e383807fce8257866c47f4cae1c27b1b0190cb5d26540e5a908cbf35974d6f300c63e11c965f91611118575b508160011b915f199060031b1c19161790565b600f555b8260405193849260408452816040850152848401375f828201840152426020830152601f01601f19168101030190a1005b9050830135876110d0565b601f198216600f5f527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802905f5b8181106111af5750907fce8257866c47f4cae1c27b1b0190cb5d26540e5a908cbf35974d6f300c63e11c94846060949310611196575b5050600183811b01600f556110e7565b8201355f19600386901b60f8161c191690558480611186565b83860135835560209586019560019093019201611150565b8181111561109157600f5f52601f820160051c7f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8026020841061122d575b81601f9101920160051c03905f5b828110611220575050611091565b5f82820155600101611212565b5f9150611204565b634e487b7160e01b5f52604160045260245ffd5b346102b25760203660031901126102b2576004355f52600a60205260405f2080549061127482612693565b916112826040519384611ebf565b8083526020830180925f5260205f205f915b83831061130157848660405191829160208301906020845251809152604083019060408160051b85010192915f905b8282106112d257505050500390f35b919360019193955060206112f18192603f198a82030186528851611e64565b96019201920185949391926112c3565b60046020600192611311856126ab565b815201920192019190611294565b346102b2575f3660031901126102b257610545604051611340604082611ebf565b600b81526a04d795342542d332e322e360ac1b6020820152604051918291602083526020830190611d51565b346102b25760203660031901126102b257611385611d75565b600d54906001600160a01b038216908133036102a3576001600160a01b03169182156113e75782906001600160a01b03191617600d557f90de8705b1aaf3966be0e8ec8acf9aed10a6d3d0d572ec8f96112409e2820c616020604051428152a3005b63e6c4247b60e01b5f5260045ffd5b346102b25761036961140736611db5565b9060405192611417602085611ebf565b5f84526128f1565b346102b2575f3660031901126102b2576001600160a01b03600d541633036102a35760075460ff8116156114ac5760ff19166007557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16040514281527f107553d8191d85b405879cf752997865edd48d94e20bda4dd27223c94b31a7cc60203392a2005b638dfc202b60e01b5f5260045ffd5b346102b2576114c936611e1d565b91506114d3612bff565b6114db612ccb565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576106cb9261233d565b346102b25760203660031901126102b25761152d611d75565b611535612bff565b61153d612ccb565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576001600160a01b0316805f52600860205260405f2054908115801561176a575b61175b57815f52600a60205260405f205f5b8154811015611623578060ff60026115b960019486612130565b500154166115c8575b0161159f565b60026115d48285612130565b5001805460ff191690556001600160a01b036115f08285612130565b505416857fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a36115c2565b5050805f5260086020525f6040812055815f5260026020526001600160a01b0360405f205416151580611754575b61174557815f5260026020526001600160a01b0360405f205416801590811561170e575b835f52600260205260405f206001600160a01b03198154169055835f827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4506116fb577f108d98610c6944880c68d31a01ab6252b635e7c7a9728687f31e68a76538c86560606011546040519081525f6020820152426040820152a36001600655005b50637e27328960e01b5f5260045260245ffd5b61172d845f52600460205260405f206001600160a01b03198154169055565b805f52600360205260405f205f198154019055611675565b639cbe235760e01b5f5260045ffd5b505f611651565b6304fc726b60e41b5f5260045ffd5b50806001600160a01b0361177d84612bcc565b16141561158d565b346102b25760203660031901126102b25761179e611d75565b6117a6612bff565b6117af33612c1a565b156119f1576001600160a01b0316805f52600860205260405f205490811561175b57815f52600b60205260405f206001600160a01b0333165f5260205260405f2054825f52600a60205260405f205481108015906119c8575b610ee357600261182560ff92855f52600a60205260405f20612130565b50015416156119b95760405190632474521560e21b82527f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a600483015260248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156119ae575f9161197f575b501561197057805f52600c60205260405f206001600160a01b0333165f5260205260405f20548015159081611946575b5061193857805f52600c60205260405f206001600160a01b0333165f5260205260405f204290556040519062093a80420482524260208301527f0bd2c5444bc0126737809a3970e1c3bc8cf29e5efb7d5448cbaa6a9c1af8120760403393a3005b62b161e760e41b5f5260045ffd5b905061012c810180911161195c574210826118d7565b634e487b7160e01b5f52601160045260245ffd5b6359f1a2a160e01b5f5260045ffd5b6119a1915060203d6020116119a7575b6119998183611ebf565b81019061215d565b826118a7565b503d61198f565b6040513d5f823e3d90fd5b63e44ae7c960e01b5f5260045ffd5b50825f52600a6020526119de8160405f20612130565b50546001600160a01b0316331415611808565b630f95018760e01b5f5260045ffd5b346102b257610369611a1136611db5565b91611f6b565b346102b2575f3660031901126102b2576020601254604051908152f35b346102b25760203660031901126102b2576004356001600160a01b03600d541633036102a3578015611aac577f5d1f56e31e5dc1f29354822b887b1463ececf7edfad7c39216980b7dfd7ea97d90601154908060115561029e6040519283924291846040919493926060820195825260208201520152565b63162908e360e11b5f5260045ffd5b346102b25760403660031901126102b257611ad4611d75565b602435611ae081612bcc565b33151580611b94575b80611b61575b611b4e5781906001600160a01b0380851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f5260046020526001600160a01b0360405f2091166001600160a01b03198254161790555f80f35b63a9fbf51f60e01b5f523360045260245ffd5b506001600160a01b0381165f52600560205260405f206001600160a01b0333165f5260205260ff60405f20541615611aef565b50336001600160a01b0382161415611ae9565b346102b2575f3660031901126102b2576020601154604051908152f35b346102b25760203660031901126102b257600435611be181612bcc565b505f52600460205260206001600160a01b0360405f205416604051908152f35b346102b2575f3660031901126102b2576040515f5f54611c2081611f33565b8084529060018116908115610a705750600114611c47576105458361053181850382611ebf565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210611c8957509091508101602001610531610a02565b919260018160209254838588010152019101909291611c71565b346102b2575f3660031901126102b25760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b25760203660031901126102b2576004359063ffffffff60e01b82168092036102b2576020916380ac58cd60e01b8114908115611d40575b8115611d2f575b5015158152f35b6301ffc9a760e01b14905083611d28565b635b5e139f60e01b81149150611d21565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036102b257565b602435906001600160a01b03821682036102b257565b35906001600160a01b03821682036102b257565b60609060031901126102b2576004356001600160a01b03811681036102b257906024356001600160a01b03811681036102b2579060443590565b9181601f840112156102b25782359167ffffffffffffffff83116102b257602083818601950101116102b257565b60606003198201126102b2576004356001600160a01b03811681036102b25791602435916044359067ffffffffffffffff82116102b257611e6091600401611def565b9091565b9060806060611ea0936001600160a01b038151168452602081015160208501526040810151151560408501520151918160608201520190611d51565b90565b6080810190811067ffffffffffffffff82111761123557604052565b90601f8019910116810190811067ffffffffffffffff82111761123557604052565b67ffffffffffffffff811161123557601f01601f191660200190565b929192611f0982611ee1565b91611f176040519384611ebf565b8294818452818301116102b2578281602093845f960137010152565b90600182811c92168015611f61575b6020831014611f4d57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611f42565b91906001600160a01b0316801561211d57815f5260026020526001600160a01b0360405f205416151580612115575b61174557815f5260026020526001600160a01b0360405f20541692823315159283612079575b6001600160a01b03935085612042575b805f52600360205260405f2060018154019055815f52600260205260405f20818519825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a41680830361202a57505050565b6364283d7b60e01b5f5260045260245260445260645ffd5b612061825f52600460205260405f206001600160a01b03198154169055565b855f52600360205260405f205f198154019055611fd0565b91929050806120be575b1561209057828291611fc0565b82846120a857637e27328960e01b5f5260045260245ffd5b63177e802f60e01b5f523360045260245260445ffd5b5033841480156120ec575b806120835750825f526004602052336001600160a01b0360405f20541614612083565b50835f52600560205260405f206001600160a01b0333165f5260205260ff60405f2054166120c9565b506001611f9a565b633250574960e11b5f525f60045260245ffd5b8054821015612149575f5260205f209060021b01905f90565b634e487b7160e01b5f52603260045260245ffd5b908160209103126102b2575180151581036102b25790565b9190918054680100000000000000008110156112355761219a91600182018155612130565b6123005760036060916001600160a01b0380865116166001600160a01b0319825416178155602085015160018201556121e860408601511515600283019060ff801983541691151516179055565b0192015191825167ffffffffffffffff8111611235576122088254611f33565b601f81116122af575b506020601f82116001146122515781906122429394955f92612246575b50508160011b915f199060031b1c19161790565b9055565b015190505f8061222e565b601f19821690835f52805f20915f5b8181106122975750958360019596971061227f575b505050811b019055565b01515f1960f88460031b161c191690555f8080612275565b9192602060018192868b015181550194019201612260565b8181111561221157825f5260205f20601f830160051c90602084106122f8575b81601f9101920160051c03905f5b8281106122eb575050612211565b5f828201556001016122dd565b5f91506122cf565b634e487b7160e01b5f525f60045260245ffd5b5f19811461195c5760010190565b929190612338602091604086526040860190611d51565b930152565b92906001600160a01b0384169283156126845761236790845f52600860205260405f205492612ceb565b9390918061248b57506010549061237d82612313565b60105561245f82809761244260019860405161239881611ea3565b86815260036001600160a01b03602083019a16998a8152604083014281528d6001600160a01b038060608701948386528b5f526009602052818060405f20995116168219895416178855511691860191166001600160a01b031982541617905551600284015551910155855f5260086020528360405f2055835f52600a60205260405f206040519161242983611ea3565b8983524260208401528b60408401526060830152612175565b815f52600b60205260405f20865f526020525f6040812055612d6f565b7ff5491bdb765a4be5a1bdc9bfd09cf61e1b89962ac33ed2e928f11a59a5e723316020604051428152a4565b9450505f92845f52600b60205260405f206001600160a01b0383165f5260205260405f2054855f52600a60205260405f2054811080612653575b6125b55750845f52600a602052603260405f205410156125a657845f52600a60205261252160405f20926001600160a01b036040519161250483611ea3565b169384825242602083015260016040830152836060830152612175565b845f52600a60205260405f2054905f19820191821161195c576125a17fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db10918793845f52600b60205260405f20865f5260205260405f2055835f526009602052600360405f20016125918154612313565b9055604051918291429083612321565b0390a3565b633467d59d60e21b5f5260045ffd5b919294935050825f52600a60205260ff60026125d48360405f20612130565b50015416156125e5575b5050905f90565b6125fc600291845f52600a60205260405f20612130565b5001600160ff19825416179055817fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db1060606001600160a01b0360405194604086525f60408701524260208701521693a35f806125de565b50855f52600a6020526001600160a01b036126718260405f20612130565b5054166001600160a01b038416146124c5565b63fd684c3b60e01b5f5260045ffd5b67ffffffffffffffff81116112355760051b60200190565b906040516126b881611ea3565b600381936001600160a01b0381541683526001810154602084015260ff60028201541615156040840152019060405180925f908054906126f782611f33565b80855291600181169081156127635750600114612724575b505060609291612720910384611ebf565b0152565b5f908152602081209092505b81831061274757505081016020018161272061270f565b6020919350806001915483858901015201910190918492612730565b60ff191660208681019190915292151560051b85019092019250839150612720905061270f565b6001600160a01b03165f52600860205260405f205490811561283f57815f52600a60205260405f20915f5b8354811015612839578060ff60026127cf60019488612130565b500154166127de575b016127b5565b60026127ea8287612130565b5001805460ff191690556001600160a01b036128068287612130565b505416837fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a36127d8565b50509050565b9050565b6001600160a01b03165f52600860205260405f205480156128d757805f52600b60205260405f206001600160a01b0383165f5260205260405f205490805f52600a60205260405f20548210156128d0576128ab91610eb1915f52600a60205260405f20612130565b906001600160a01b038083511691161490816128c5575090565b604091500151151590565b5050505f90565b50505f90565b80518210156121495760209160051b010190565b906128fd838284611f6b565b803b61290a575b50505050565b6020916129506001600160a01b03809316956040519586948594630a85bd0160e11b86523360048701521660248501526044840152608060648401526084830190611d51565b03815f865af15f91816129e6575b506129b357503d156129ac573d61297481611ee1565b906129826040519283611ebf565b81523d5f602083013e5b805190816129a75782633250574960e11b5f5260045260245ffd5b602001fd5b606061298c565b6001600160e01b03191663757a42ff60e11b016129d457505f808080612904565b633250574960e11b5f5260045260245ffd5b9091506020813d602011612a23575b81612a0260209383611ebf565b810103126102b257516001600160e01b0319811681036102b257905f61295e565b3d91506129f5565b92906001600160a01b03841692831561268457612a5590845f52600860205260405f205492612ceb565b93909180612a6b57506010549061237d82612313565b9450505f92845f52600b60205260405f206001600160a01b0383165f5260205260405f2054855f52600a60205260405f2054811080612b9b575b612ae45750845f52600a602052603260405f205410156125a657845f52600a60205261252160405f20926001600160a01b036040519161250483611ea3565b858095505f969392949652600a60205260ff6002612b058360405f20612130565b50015416612b92577fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db1091612b706001600160a01b0392855f52600a6020526002612b528260405f20612130565b5001600160ff19825416179055855f52600a60205260405f20612130565b50600142910155612b8a6040519283921695429083612321565b0390a3905f90565b50505050905f90565b50855f52600a6020526001600160a01b03612bb98260405f20612130565b5054166001600160a01b03841614612aa5565b805f5260026020526001600160a01b0360405f205416908115612bed575090565b637e27328960e01b5f5260045260245ffd5b60ff60075416612c0b57565b63d93c066560e01b5f5260045ffd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169081156128d7576001600160a01b0360446020926040519485938492632474521560e21b84527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048501521660248301525afa5f9181612caa575b50611ea057505f90565b612cc491925060203d6020116119a7576119998183611ebf565b905f612ca0565b600260065414612cdc576002600655565b633ee5aeb560e01b5f5260045ffd5b9060606020821115612d4c575081016040828203126102b257612d0d82611da1565b9160208101359067ffffffffffffffff82116102b2570181601f820112156102b2576001600160a01b0391816020612d4793359101611efd565b911691565b919081602091810103126102b257612d6b6001600160a01b0391611da1565b1691565b6001600160a01b031690811561211d57805f5260026020526001600160a01b0360405f205416151580612e67575b61174557805f5260026020526001600160a01b0360405f205416908115159283612e30575b805f52600360205260405f2060018154019055815f52600260205260405f20816001600160a01b0319825416179055827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a450612e1d57565b6339e3563760e11b5f525f60045260245ffd5b612e4f825f52600460205260405f206001600160a01b03198154169055565b825f52600360205260405f205f198154019055612dc2565b506001612d9d565b6001600160a01b03165f52600860205260405f20548015612f3e57805f52600b60205260405f206001600160a01b0383165f5260205260405f2054815f52600a60205260405f2054811015612f3957612ed390825f52600a60205260405f20612130565b506001600160a01b0380825416931680931480612f2b575b612ef457505050565b60020160ff1981541690557fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a3565b5060ff600282015416612eeb565b505050565b505056fea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/NETWORKS.md b/api/@aastar/core/variables/NETWORKS.md index de616e411..75b4f12ab 100644 --- a/api/@aastar/core/variables/NETWORKS.md +++ b/api/@aastar/core/variables/NETWORKS.md @@ -1,6 +1,6 @@ > `const` **NETWORKS**: `object` -Defined in: [packages/core/src/networks.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/networks.ts#L5) +Defined in: [packages/core/src/networks.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L5) Blockchain Network Configuration @@ -48,7 +48,7 @@ Blockchain Network Configuration #### op-sepolia.blockExplorer -> `readonly` **blockExplorer**: `"https://optimism-sepolia.blockscout.com"` = `'https://optimism-sepolia.blockscout.com'` +> `readonly` **blockExplorer**: `"https://sepolia-optimism.etherscan.io"` = `'https://sepolia-optimism.etherscan.io'` #### op-sepolia.chainId diff --git a/api/@aastar/core/variables/NODE_STAKE_AMOUNTS.md b/api/@aastar/core/variables/NODE_STAKE_AMOUNTS.md index 7fb40ecd3..19e06ca80 100644 --- a/api/@aastar/core/variables/NODE_STAKE_AMOUNTS.md +++ b/api/@aastar/core/variables/NODE_STAKE_AMOUNTS.md @@ -1,6 +1,6 @@ > `const` **NODE\_STAKE\_AMOUNTS**: `object` -Defined in: [packages/core/src/constants.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L87) +Defined in: [packages/core/src/constants.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L93) ## Type Declaration diff --git a/api/@aastar/core/variables/OFFICIAL_ADDRESSES.md b/api/@aastar/core/variables/OFFICIAL_ADDRESSES.md index 27db59ae2..2f968034b 100644 --- a/api/@aastar/core/variables/OFFICIAL_ADDRESSES.md +++ b/api/@aastar/core/variables/OFFICIAL_ADDRESSES.md @@ -1,6 +1,6 @@ > `const` **OFFICIAL\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L86) +Defined in: [packages/core/src/contract-addresses.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L92) Official Contract Addresses diff --git a/api/@aastar/core/variables/PAYMASTER_ADDRESSES.md b/api/@aastar/core/variables/PAYMASTER_ADDRESSES.md index aa5e4e98f..a3f9ea08f 100644 --- a/api/@aastar/core/variables/PAYMASTER_ADDRESSES.md +++ b/api/@aastar/core/variables/PAYMASTER_ADDRESSES.md @@ -1,6 +1,6 @@ > `const` **PAYMASTER\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L70) +Defined in: [packages/core/src/contract-addresses.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L76) Paymaster Addresses diff --git a/api/@aastar/core/variables/PAYMASTER_FACTORY_ADDRESS.md b/api/@aastar/core/variables/PAYMASTER_FACTORY_ADDRESS.md index 8632110bb..4e3ff51f9 100644 --- a/api/@aastar/core/variables/PAYMASTER_FACTORY_ADDRESS.md +++ b/api/@aastar/core/variables/PAYMASTER_FACTORY_ADDRESS.md @@ -1,3 +1,3 @@ > **PAYMASTER\_FACTORY\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L35) +Defined in: [packages/core/src/constants.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L35) diff --git a/api/@aastar/core/variables/PAYMASTER_V4_ADDRESS.md b/api/@aastar/core/variables/PAYMASTER_V4_ADDRESS.md index 50d6955f4..b1f8332d1 100644 --- a/api/@aastar/core/variables/PAYMASTER_V4_ADDRESS.md +++ b/api/@aastar/core/variables/PAYMASTER_V4_ADDRESS.md @@ -1,3 +1,3 @@ > **PAYMASTER\_V4\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L36) +Defined in: [packages/core/src/constants.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L36) diff --git a/api/@aastar/core/variables/PAYMASTER_V4_IMPL_ADDRESS.md b/api/@aastar/core/variables/PAYMASTER_V4_IMPL_ADDRESS.md index a927c1f85..1f5413c42 100644 --- a/api/@aastar/core/variables/PAYMASTER_V4_IMPL_ADDRESS.md +++ b/api/@aastar/core/variables/PAYMASTER_V4_IMPL_ADDRESS.md @@ -1,3 +1,3 @@ > **PAYMASTER\_V4\_IMPL\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L37) +Defined in: [packages/core/src/constants.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L37) diff --git a/api/@aastar/core/variables/PaymasterABI.md b/api/@aastar/core/variables/PaymasterABI.md index 7a2bcec49..ff67dc69b 100644 --- a/api/@aastar/core/variables/PaymasterABI.md +++ b/api/@aastar/core/variables/PaymasterABI.md @@ -1,3 +1,3 @@ > `const` **PaymasterABI**: `any` -Defined in: [packages/core/src/abis/index.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L53) +Defined in: [packages/core/src/abis/index.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L82) diff --git a/api/@aastar/core/variables/PaymasterArtifact.md b/api/@aastar/core/variables/PaymasterArtifact.md index 4241e6e75..a728cb853 100644 --- a/api/@aastar/core/variables/PaymasterArtifact.md +++ b/api/@aastar/core/variables/PaymasterArtifact.md @@ -1,6 +1,6 @@ > `const` **PaymasterArtifact**: `object` = `PaymasterABIData` -Defined in: [packages/core/src/abis/index.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L54) +Defined in: [packages/core/src/abis/index.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L83) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:54](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60a03461019057601f612a9b38819003918201601f19168301916001600160401b038311848410176101945780849260209460405283398101031261019057516001600160a01b0381169081900361019057331561017d575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055801561016e576080525f516020612a7b5f395f51905f525460ff8160401c1661015f576002600160401b03196001600160401b0382160161010c575b6040516128d290816101a98239608051818181610fe0015281816111c801528181611cd001526122670152f35b6001600160401b0319166001600160401b039081175f516020612a7b5f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f806100df565b63f92ee8a960e01b5f5260045ffd5b632462edf160e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f5f3560e01c80630396cb6014611fa1578063083e91c414611edc5780630879c41214611ebe57806314d90e1b14611ea1578063204120bc14611e69578063205c287814611ddd5780633272668414611dbd5780633400ba5214611da157806336f897e714611cad57806339788cd914611c8c57806342f6fb2914611c65578063431f63c914611b5f5780634915a85814611b3c5780634a58db1914611acf57806352b7512c1461169757806354fd4d50146116325780635c975abb1461160f5780635dbfc94d146113e857806361d027b3146113c157806361d1bc94146113a3578063673a7e28146112825780636f374b0f1461125d578063715018a6146111ec5780637b103999146111a85780637c627b21146110ec5780638da5cb5b146110c65780638ee573ac1461108b5780639b1d309114611006578063a032f4b814610fc0578063aa51e01514610fa4578063b0d691fe14610f7d578063b1f145c514610ca0578063b3db428b14610b45578063bb9fe6bf14610ad7578063bd11187014610ab9578063c23a5cea14610a15578063c23f001f146109c7578063c9929dad14610972578063e68b52e71461094e578063e77fc7a41461048e578063f0f44260146103da578063f2fde38b14610371578063f3fef3a31461024d5763f60fdcb314610209575061000e565b3461024a578060031936011261024a57604060055481519079ffffffffffffffffffffffffffffffffffffffffffffffffffff8116825260d01c6020820152f35b80fd5b503461024a57604060031936011261024a5761026761203b565b60243590610273612582565b338352600a602052604083206001600160a01b0382165f526020528160405f205410610349576001600160a01b0390338452600a602052604084208282165f5260205260405f206102c58482546121ec565b905516906103166040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015233602482015282604482015260448152610310606482612107565b83612730565b6040519081527fa92ff919b850e4909ab2261d907ef955f11bc1716733a6cbece38d163a69af8a60203392a36001805580f35b6004837fa18ee550000000000000000000000000000000000000000000000000000000008152fd5b503461024a57602060031936011261024a5761038b61203b565b610393612543565b6001600160a01b038116156103ae576103ab906125df565b80f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b503461024a57602060031936011261024a576001600160a01b036103fc61203b565b610404612543565b168015610466577fffffffffffffffffffffffff0000000000000000000000000000000000000000600654826001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8680a3161760065580f35b6004827f2462edf1000000000000000000000000000000000000000000000000000000008152fd5b503461024a5760e060031936011261024a576104a861203b565b6104b0612051565b6044356001600160a01b03811680910361094a57606435906001600160a01b0382168092036109465760843560c435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549560ff8760401c16159667ffffffffffffffff81168015908161093e575b6001149081610934575b15908161092b575b506109035790818860017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006001600160a01b039516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556108ae575b5016938415610886576001600160a01b03861694851561085e57821561085e57811561085e576103e88411610836577fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025560035490807fffffffffffffffffffffffff00000000000000000000000000000000000000008316176003556040517f313ce567000000000000000000000000000000000000000000000000000000008152602081600481855afa8a9181610805575b506107bd57505050740800000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60035416176003555b7fffffffffffffffffffffffff0000000000000000000000000000000000000000600654161760065560075560a4356008558015155f146107b4575b6004557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0060095416600955610702826125df565b33036107a5575b506107115780f35b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6107ae906125df565b5f610709565b50610e106106ce565b74ff00000000000000000000000000000000000000007fffffffffffffffffffffff0000000000000000000000000000000000000000009160a01b1692161717600355610692565b61082891925060203d60201161082f575b6108208183612107565b810190612148565b905f61064a565b503d610816565b6004897f2cbc9627000000000000000000000000000000000000000000000000000000008152fd5b6004897f2462edf1000000000000000000000000000000000000000000000000000000008152fd5b6004887f2462edf1000000000000000000000000000000000000000000000000000000008152fd5b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f61058f565b6004897ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b9050155f610532565b303b15915061052a565b899150610520565b8480fd5b8380fd5b503461024a578060031936011261024a57602060ff60035460a01c16604051908152f35b503461024a57602060031936011261024a5760043561098f612543565b7f49081791577ea5202d6975e5d6ad3a55a49709b1adf70fbd4fbf4b3ffda6e03160406008548151908152836020820152a160085580f35b503461024a57604060031936011261024a576001600160a01b0360406109eb61203b565b92826109f5612051565b94168152600a6020522091165f52602052602060405f2054604051908152f35b503461024a57602060031936011261024a5780610a3061203b565b610a38612543565b6001600160a01b036002541690813b15610ab5576001600160a01b03602484928360405195869485937fc23a5cea0000000000000000000000000000000000000000000000000000000085521660048401525af18015610aaa57610a995750f35b81610aa391612107565b61024a5780f35b6040513d84823e3d90fd5b5050fd5b503461024a578060031936011261024a576020600454604051908152f35b503461024a578060031936011261024a57610af0612543565b806001600160a01b0360025416803b15610b42578180916004604051809481937fbb9fe6bf0000000000000000000000000000000000000000000000000000000083525af18015610aaa57610a995750f35b50fd5b503461024a57606060031936011261024a57610b5f61203b565b610b67612051565b6001600160a01b0360443591610b7b612582565b1691828452600b602052604084205415610c785760206001600160a01b037ff0d0e99cae184d0187b093b48894117462462379674a6e11d89c3fbb618e96b092610c476040517f23b872dd0000000000000000000000000000000000000000000000000000000085820152610c4181610c15893033602485016001600160a01b036040929594938160608401971683521660208201520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612107565b87612730565b1692838652600a825260408620855f52825260405f20610c688282546121b2565b9055604051908152a36001805580f35b6004847f5f77d0bd000000000000000000000000000000000000000000000000000000008152fd5b503461024a57604060031936011261024a57610cba612051565b303303610f55576001600160a01b031690818152600b60205260408120548015610f2d57600460a06001600160a01b0360035416604051928380927ffeaf968c0000000000000000000000000000000000000000000000000000000082525afa908115610f22578391610eef575b5082811315610eb8576402540be40081128015610ee0575b610eb85760ff60035460a01c16936007548061271001908161271011610e8b57908592918193610e43575b5050610d99610da59392610d9f928752600c602052610d9460ff604089205416946004356125bb565b6125bb565b916125ce565b906125bb565b92600a0160ff8111610e1657610dba906125ce565b91612710820291820461271003610de9576020610de185610ddb86866125bb565b9061263b565b604051908152f35b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526011600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b612af89192935001809111610e5e5790610d99610d9f610d6b565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6004837f89c61c06000000000000000000000000000000000000000000000000000000008152fd5b506509184e72a0008113610d40565b610f11915060a03d60a011610f1b575b610f098183612107565b810190612210565b5092505090610d28565b503d610eff565b6040513d85823e3d90fd5b6004827f5f77d0bd000000000000000000000000000000000000000000000000000000008152fd5b6004827f4fd3f395000000000000000000000000000000000000000000000000000000008152fd5b503461024a578060031936011261024a5760206001600160a01b0360025416604051908152f35b503461024a578060031936011261024a57602060405160058152f35b503461024a578060031936011261024a5760206040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001615158152f35b503461024a57602060031936011261024a57600435611023612543565b6103e88111611063577e3b413cf14a67407425bd0b5c065b2de08876554d8489ad7dd4aa95604d280c60406007548151908152836020820152a160075580f35b6004827f2cbc9627000000000000000000000000000000000000000000000000000000008152fd5b503461024a57602060031936011261024a5760ff60406020926001600160a01b036110b461203b565b168152600c8452205416604051908152f35b503461024a578060031936011261024a576001600160a01b036020915416604051908152f35b503461024a57608060031936011261024a576003600435101561024a5760243567ffffffffffffffff81116111a457366023820112156111a457806004013567ffffffffffffffff81116111a05736602482840101116111a0576001600160a01b03600254163303611178579061117191611165612582565b6024604435920161230c565b6001805580f35b6004837f7f3c57b5000000000000000000000000000000000000000000000000000000008152fd5b8280fd5b5080fd5b503461024a578060031936011261024a5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461024a578060031936011261024a57611205612543565b806001600160a01b0381547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461024a578060031936011261024a57602061127861225d565b6040519015158152f35b503461024a578060031936011261024a57600460a06001600160a01b0360035416604051928380927ffeaf968c0000000000000000000000000000000000000000000000000000000082525afa8015610aaa578291839161137d575b5082821315610eb8578160409179ffffffffffffffffffffffffffffffffffffffffffffffffffff7f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683894168351611334816120be565b818152602065ffffffffffff84169101527fffffffffffff00000000000000000000000000000000000000000000000000008260d01b161760055582519182526020820152a180f35b9050611398915060a03d60a011610f1b57610f098183612107565b50925050905f6112de565b503461024a578060031936011261024a576020600754604051908152f35b503461024a578060031936011261024a5760206001600160a01b0360065416604051908152f35b503461024a57606060031936011261024a57611402612051565b906044359182151583036111a457303303610f55576001600160a01b031691828252600b60205260408220549081156115e75782901561158157600460a06001600160a01b0360035416604051928380927ffeaf968c0000000000000000000000000000000000000000000000000000000082525afa908115611576578491611553575b50905b8382131561151c576402540be40082128015611544575b61151c5760ff60035460a01c169460075480612710019081612710116114ef578193610e43575050610d99610da59392610d9f928752600c602052610d9460ff604089205416946004356125bb565b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6004847f89c61c06000000000000000000000000000000000000000000000000000000008152fd5b506509184e72a00082136114a0565b61156c915060a03d60a011610f1b57610f098183612107565b5092505090611486565b6040513d86823e3d90fd5b5060405161158e816120be565b6005549079ffffffffffffffffffffffffffffffffffffffffffffffffffff8216808252602082019260d01c83521561151c575179ffffffffffffffffffffffffffffffffffffffffffffffffffff1690506001611489565b6004837f5f77d0bd000000000000000000000000000000000000000000000000000000008152fd5b503461024a578060031936011261024a57602060ff600954166040519015158152f35b503461024a578060031936011261024a5750611693604051611655604082612107565b601281527f504d56342d4465706f7369742d342e332e300000000000000000000000000000602082015260405191829160208352602083019061207b565b0390f35b503461024a57606060031936011261024a5760043567ffffffffffffffff81116111a457806004019061012060031982360301126111a057604435906001600160a01b03600254163303611aa75760ff60095416611a7f5760e4906116fa612582565b019260346117088585612161565b905010611a57578235936001600160a01b038516928386036111a0576008549081811115611a4f5750935b604861173f8383612161565b905010155f14611a27579061175391612161565b6048116111a4576034013560601c808252600b6020526040822054909384918015610c785760405191611785836120be565b6005549279ffffffffffffffffffffffffffffffffffffffffffffffffffff8416808252602082019460d01c8552156119ff575179ffffffffffffffffffffffffffffffffffffffffffffffffffff169250848313156119c8576402540be400831280156119f0575b6119c85760ff60035460a01c169260075490816127100191826127101161199b57612af8018092116114ef57610d9982610d94610d9f93611841969550898b52600c60205260ff60408c205416956125bb565b91600a0160ff8111610e5e57611856906125ce565b90612710810290810461271003610e5e576118759291610ddb916125bb565b92808352600a60205260408320825f526020528360405f205410610349578252600a60205260408220905f5260205260405f206118b38382546121ec565b905560055460d01c9081156119735750611965936119066118da61193293600454906121b2565b93604051958693602085016001600160a01b036040929594938160608401971683521660208201520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101845283612107565b6001805579ffffffffffff000000000000000000000000000000000000000060405193849360408552604085019061207b565b9160a01b1660208301520390f35b807f7d1bece70000000000000000000000000000000000000000000000000000000060049252fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6004857f89c61c06000000000000000000000000000000000000000000000000000000008152fd5b506509184e72a00083136117ee565b6004867f89c61c06000000000000000000000000000000000000000000000000000000008152fd5b6004837f4fd3f395000000000000000000000000000000000000000000000000000000008152fd5b905093611733565b807f4fd3f3950000000000000000000000000000000000000000000000000000000060049252fd5b6004847f4ddcc820000000000000000000000000000000000000000000000000000000008152fd5b6004847f7f3c57b5000000000000000000000000000000000000000000000000000000008152fd5b508060031936011261024a57611ae3612543565b806001600160a01b0360025416803b15610b425781602491604051928380927fb760faf900000000000000000000000000000000000000000000000000000000825230600483015234905af18015610aaa57610a995750f35b503461024a57602060031936011261024a57611b56612543565b60043560045580f35b503461024a57604060031936011261024a57611b7961203b565b7fceb40be0a58aa33916c199e469842b614ef313295573c15d82f85cc9d1a89d326020602435611ba7612543565b6001600160a01b0360129416936040517f313ce5670000000000000000000000000000000000000000000000000000000081528381600481895afa879181611c46575b50611c3e575b50848652600c835260ff6040872091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055838552600b8252806040862055604051908152a280f35b90505f611bf0565b611c5e919250853d871161082f576108208183612107565b905f611bea565b503461024a578060031936011261024a5760206001600160a01b0360035416604051908152f35b503461024a578060031936011261024a5760206040516509184e72a0008152f35b503461024a578060031936011261024a57611cc6612543565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168015611d79578082913b15610b42578180916004604051809481937f51b42b000000000000000000000000000000000000000000000000000000000083525af18015610aaa57611d64575b50307fca323d32ea3ada728fbc5a470183af7d4cc49a426cb2bdf68847d6e298576f208280a280f35b81611d6e91612107565b61024a57805f611d3b565b6004827f192dbd6a000000000000000000000000000000000000000000000000000000008152fd5b503461024a578060031936011261024a576020604051600a8152f35b503461024a578060031936011261024a5760206040516402540be4008152f35b503461024a57604060031936011261024a5780611df861203b565b611e00612543565b6001600160a01b036002541690813b15610ab5576001600160a01b03604484928360405195869485937f205c287800000000000000000000000000000000000000000000000000000000855216600484015260243560248401525af18015610aaa57610a995750f35b503461024a57602060031936011261024a5760406020916001600160a01b03611e9061203b565b168152600b83522054604051908152f35b503461024a578060031936011261024a5760206040516103e88152f35b503461024a578060031936011261024a576020600854604051908152f35b503461024a57604060031936011261024a5760043560243565ffffffffffff81169081810361094a57611f0d612543565b821561151c57916040917f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd696838937fffffffffffff000000000000000000000000000000000000000000000000000079ffffffffffffffffffffffffffffffffffffffffffffffffffff8416918360208751611f86816120be565b858152015260d01b161760055582519182526020820152a180f35b5060206003193601126120375760043563ffffffff811680910361203757611fc7612543565b6001600160a01b036002541690813b15612037575f906024604051809481937f0396cb60000000000000000000000000000000000000000000000000000000008352600483015234905af1801561202c57612020575080f35b61001891505f90612107565b6040513d5f823e3d90fd5b5f80fd5b600435906001600160a01b038216820361203757565b602435906001600160a01b038216820361203757565b35906001600160a01b038216820361203757565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b6040810190811067ffffffffffffffff8211176120da57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176120da57604052565b90816020910312612037575160ff811681036120375790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215612037570180359067ffffffffffffffff82116120375760200191813603831361203757565b919082018092116121bf57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b919082039182116121bf57565b519069ffffffffffffffffffff8216820361203757565b908160a091031261203757612224816121f9565b916020820151916040810151916122426080606084015193016121f9565b90565b90816020910312612037575180151581036120375790565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168015612307576020602491604051928380927f928708220000000000000000000000000000000000000000000000000000000082523060048301525afa5f91816122d6575b5061224257505f90565b6122f991925060203d602011612300575b6122f18183612107565b810190612245565b905f6122cc565b503d6122e7565b505f90565b90915f92801561253d5782606091810103126120375761232b82612067565b6001600160a01b0380604061234260208701612067565b95013592169316935f61235a60055460d01c426121ec565b600454106124e6575b604051907f5dbfc94d00000000000000000000000000000000000000000000000000000000825284600483015286602483015215156044820152602081606481305afa829181612492575b5091606093917f62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae0739593155f1461248c5750815b808311612484575b826123f3916121ec565b80612452575b5081612415575b506040519182528060208301526040820152a3565b6040906001600160a01b03600654168152600a602052206001600160a01b0387165f5260205260405f2061244a8282546121b2565b90555f612400565b868252600a602052604082206001600160a01b0389165f5260205261247c60405f209182546121b2565b90555f6123f9565b9150816123e9565b916123e1565b9091506020813d6020116124de575b816124ae60209383612107565b810103126111a05751907f62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae0736123ae565b3d91506124a1565b50303b15612037576040517f673a7e280000000000000000000000000000000000000000000000000000000081525f8160048183305af161252a575b506001612363565b61253691505f90612107565b5f5f612522565b50505050565b6001600160a01b035f5416330361255657565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b600260015414612593576002600155565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b818102929181159184041417156121bf57565b60ff16604d81116121bf57600a0a90565b6001600160a01b03805f54921691827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60018209918180841093039280840393146126f757828111156126cf578060018309815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b7f227bc153000000000000000000000000000000000000000000000000000000005f5260045ffd5b80925015612703570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6001600160a01b038192169260208151910182855af13d15612804573d67ffffffffffffffff81116120da576127a89160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601916127986040519384612107565b82523d5f602084013e5b83612810565b80519081151591826127e9575b50506127be5750565b7f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6127fc9250602080918301019101612245565b155f806127b5565b6127a8906060906127a2565b9061284d575080511561282557805190602001fd5b7f1425ea42000000000000000000000000000000000000000000000000000000005f5260045ffd5b81511580612893575b61285e575090565b6001600160a01b03907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b1561285656fea264697066735822122033eea345a3e8c9fd2c1e4c528b7266a932fd55ec00b72612ad92735dfbb778d664736f6c63430008210033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` +> **bytecode**: `string` = `"0x60a03461018957601f612abf38819003918201601f19168301916001600160401b0383118484101761018d5780849260209460405283398101031261018957516001600160a01b03811690819003610189573315610176575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600180558015610167576080525f516020612a9f5f395f51905f525460ff8160401c16610158576002600160401b03196001600160401b03821601610105575b6040516128fd90816101a28239608051818181610dfd0152818161101101526123250152f35b6001600160401b0319166001600160401b039081175f516020612a9f5f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f806100df565b63f92ee8a960e01b5f5260045ffd5b632462edf160e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f5f3560e01c80630396cb6014611f9a578063083e91c414611e5a5780630879c41214611e3c57806314d90e1b14611e1f578063204120bc14611de7578063205c287814611d745780633272668414610b375780633400ba5214611d5857806336f897e714611d3757806339788cd914611d165780633f4ba83a14611cf557806342f6fb2914611cce578063431f63c914611b3b5780634915a85814611abc5780634a58db1914611a6857806352b7512c1461173e57806354fd4d50146116dd5780635c975abb146116ba5780635dbfc94d146114365780635fa7b584146112a057806361d027b31461127957806361d1bc941461125b578063673a7e28146110e65780636f374b0f146110c1578063715018a61461106f57806375151b63146110355780637b10399914610ff15780637c627b2114610f4e5780638456cb5914610f2d57806384b863a814610f0c5780638da5cb5b14610ee65780638ee573ac14610eab578063975dd5be14610e8f5780639b1d309114610e23578063a032f4b814610ddd578063aa51e01514610dc1578063b0d691fe14610d9a578063b3db428b14610ca3578063bb9fe6bf14610c4e578063bd11187014610c30578063c23a5cea14610ba5578063c23f001f14610b57578063c7c6bd2c14610b37578063c9929dad14610ab4578063ce6771c914610a97578063d3c7c2c714610a01578063db110a071461085e578063dbcd429c1461083d578063e68b52e714610819578063e77fc7a414610494578063f0f4426014610404578063f2fde38b146103b3578063f3fef3a3146102a85763f60fdcb314610277575061000e565b346102a557806003193601126102a55760406005548151906001600160d01b038116825260d01c6020820152f35b80fd5b50346102a55760403660031901126102a5576102c261201a565b602435906102ce6126d6565b60ff600954166103a457338352600a602052604083206001600160a01b0382165f526020528160405f205410610395576001600160a01b0390338452600a602052604084208282165f5260205260405f2061032a84825461210c565b9055169061036260405163a9059cbb60e01b60208201523360248201528260448201526044815261035c6064826120ea565b836127ed565b6040519081527fa92ff919b850e4909ab2261d907ef955f11bc1716733a6cbece38d163a69af8a60203392a36001805580f35b630a18ee5560e41b8352600483fd5b63026ee64160e51b8352600483fd5b50346102a55760203660031901126102a5576103cd61201a565b6103d56126b0565b6001600160a01b038116156103f0576103ed90612707565b80f35b631e4fbdf760e01b82526004829052602482fd5b50346102a55760203660031901126102a5576001600160a01b0361042661201a565b61042e6126b0565b16801561048557600654816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8580a373ffffffffffffffffffffffffffffffffffffffff19161760065580f35b632462edf160e01b8252600482fd5b50346102a55760e03660031901126102a5576104ae61201a565b6104b6612030565b6044356001600160a01b03811680910361081557606435906001600160a01b0382168092036108115760843560a4359060c435927ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549660ff8860401c16159767ffffffffffffffff811680159081610809575b60011490816107ff575b1590816107f6575b506107e75767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556001600160a01b039190896107a8575b5016948515610799576001600160a01b03871695861561078a57821561078a57811561078a576103e8841161077b5784158015610769575b61075a576001600160a01b0319600254161760025560035490806001600160a01b031983161760035560405163313ce56760e01b8152602081600481855afa8b9181610729575b506106f95750506003805460ff60a01b1916600160a31b179055505b6001600160a01b031960065416176006556007556008558015155f146106f0575b60045560ff196009541660095561065482612707565b33036106e1575b506106635780f35b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6106ea90612707565b5f61065b565b50610e1061063e565b74ffffffffffffffffffffffffffffffffffffffffff199092161760a09190911b60ff60a01b161760035561061d565b61074c91925060203d602011610753575b61074481836120ea565b810190612217565b905f610601565b503d61073a565b6377fc568960e01b8a5260048afd5b5068056bc75e2d6310000085116105ba565b632cbc962760e01b8a5260048afd5b632462edf160e01b8a5260048afd5b632462edf160e01b8952600489fd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f610582565b63f92ee8a960e01b8a5260048afd5b9050155f61053c565b303b159150610534565b8a915061052a565b8480fd5b8380fd5b50346102a557806003193601126102a557602060ff60035460a01c16604051908152f35b50346102a557806003193601126102a5576108566126b0565b6103ed612651565b50346102a557806003193601126102a557600c5461087b81612625565b9061088960405192836120ea565b808252601f1961089882612625565b013660208401376108a881612625565b926108b660405194856120ea565b8184526108c282612625565b602085019490601f19013686376108d883612625565b906108e660405192836120ea565b8382526108f284612625565b602083019490601f1901368637835b818110610999575050906109269591602060405197889760608952606089019061207e565b91878303828901525191828152019290845b81811061098057505050602090858303604087015251918281520192915b818110610964575050500390f35b825160ff16845285945060209384019390920191600101610956565b8251855288975060209485019490920191600101610938565b806001600160a01b036109b16001939a98999a6121eb565b90549060031b1c16806109c4838c61263d565b52808752600b60205260408720546109dc838761263d565b528652600e60205260ff6040872054166109f6828761263d565b520196959496610901565b50346102a557806003193601126102a55760405180916020600c54928381520191600c82527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7915b818110610a7857610a7485610a60818703826120ea565b60405191829160208352602083019061207e565b0390f35b82546001600160a01b0316845260209093019260019283019201610a49565b50346102a557806003193601126102a5576020604051610bb88152f35b50346102a55760203660031901126102a557600435610ad16126b0565b80158015610b25575b610b16577f49081791577ea5202d6975e5d6ad3a55a49709b1adf70fbd4fbf4b3ffda6e03160406008548151908152836020820152a160085580f35b6377fc568960e01b8252600482fd5b5068056bc75e2d631000008111610ada565b50346102a557806003193601126102a55760206040516402540be4008152f35b50346102a55760403660031901126102a5576001600160a01b036040610b7b61201a565b9282610b85612030565b94168152600a6020522091165f52602052602060405f2054604051908152f35b50346102a55760203660031901126102a55780610bc061201a565b610bc86126b0565b6001600160a01b036002541690813b15610c2c576001600160a01b036024849283604051958694859363611d2e7560e11b85521660048401525af18015610c2157610c105750f35b81610c1a916120ea565b6102a55780f35b6040513d84823e3d90fd5b5050fd5b50346102a557806003193601126102a5576020600454604051908152f35b50346102a557806003193601126102a557610c676126b0565b806001600160a01b0360025416803b15610ca05781809160046040518094819363bb9fe6bf60e01b83525af18015610c2157610c105750f35b50fd5b50346102a55760603660031901126102a557610cbd61201a565b610cc5612030565b6001600160a01b0360443591610cd96126d6565b1691828452600b602052604084205415610d8b576040516323b872dd60e01b602080830191909152336024830152306044830152606480830185905282527ff0d0e99cae184d0187b093b48894117462462379674a6e11d89c3fbb618e96b09290916001600160a01b039190610d5a90610d546084826120ea565b876127ed565b1692838652600a825260408620855f52825260405f20610d7b828254612140565b9055604051908152a36001805580f35b635f77d0bd60e01b8452600484fd5b50346102a557806003193601126102a55760206001600160a01b0360025416604051908152f35b50346102a557806003193601126102a557602060405160058152f35b50346102a557806003193601126102a55760206040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001615158152f35b50346102a55760203660031901126102a557600435610e406126b0565b6103e88111610e80577e3b413cf14a67407425bd0b5c065b2de08876554d8489ad7dd4aa95604d280c60406007548151908152836020820152a160075580f35b632cbc962760e01b8252600482fd5b50346102a557806003193601126102a5576020604051600f8152f35b50346102a55760203660031901126102a55760ff60406020926001600160a01b03610ed461201a565b168152600e8452205416604051908152f35b50346102a557806003193601126102a5576001600160a01b036020915416604051908152f35b50346102a557806003193601126102a5576020604051655af3107a40008152f35b50346102a557806003193601126102a557610f466126b0565b6103ed6125e9565b50346102a55760803660031901126102a557600360043510156102a55760243567ffffffffffffffff8111610fed5736602382011215610fed57806004013567ffffffffffffffff8111610fe9573660248284010111610fe9576001600160a01b03600254163303610fda5790610fd391610fc76126d6565b6024604435920161238e565b6001805580f35b637f3c57b560e01b8352600483fd5b8280fd5b5080fd5b50346102a557806003193601126102a55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102a55760203660031901126102a55760406020916001600160a01b0361105c61201a565b168152600d835220541515604051908152f35b50346102a557806003193601126102a5576110886126b0565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102a557806003193601126102a55760206110dc6122c7565b6040519015158152f35b50346102a557806003193601126102a557600460a06001600160a01b036003541660405192838092633fabe5a360e21b82525afa908115610c21578291839284928592611211575b5069ffffffffffffffffffff8091169116106111ea57828213156111ea5780158015611208575b6111ea576402540be400821280156111f9575b6111ea57611176814261210c565b600454106111ea57816040916001600160d01b037f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd696838941683516111b8816120ba565b818152602065ffffffffffff841691015265ffffffffffff60d01b8260d01b161760055582519182526020820152a180f35b6344e30e0360e11b8352600483fd5b506509184e72a0008213611168565b50428111611155565b905069ffffffffffffffffffff9350839250611245915060a03d60a011611254575b61123d81836120ea565b81019061227a565b9295909450919291905061112e565b503d611233565b50346102a557806003193601126102a5576020600754604051908152f35b50346102a557806003193601126102a55760206001600160a01b0360065416604051908152f35b50346102a55760203660031901126102a5576001600160a01b036112c261201a565b6112ca6126b0565b16808252600d60205260408220541561142757808252600d60205260408220545f19810181811161141357600c545f1981019081116113ff578082036113a4575b505050600c548015611390575f1901611323816121eb565b6001600160a01b0382549160031b1b19169055600c55808252600d602052816040812055808252600b602052816040812055808252600e6020526040822060ff1981541690557f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd38280a280f35b634e487b7160e01b83526031600452602483fd5b6113cc916001600160a01b036113bc6113eb936121eb565b90549060031b1c169283916121eb565b9091906001600160a01b038084549260031b9316831b921b1916179055565b8352600d60205260408320555f808061130b565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b84526011600452602484fd5b6351b3a25160e01b8252600482fd5b50346102a55760603660031901126102a557611450612030565b604435908115158203610fe9573033036116ab576001600160a01b0316808352600b6020526040832054908115610d8b57839215611668579260049360a06001600160a01b036003541660405196878092633fabe5a360e21b82525afa8015610c2157829083918497859261162e575b5069ffffffffffffffffffff8091169116106111ea57948015908115611624575b811561160f575b506115f1575b818513156115f1576402540be40085128015611600575b6115f15760ff60035460a01c169360075480612710019081612710116113ff5781926115c8575b5050611552918352600e60205261154d60ff6040852054169660043561212d565b61212d565b926127108302928304612710036115b457600a019060ff82116115a0576020611598868661159261158c88611586896126f6565b9061212d565b926126f6565b90612744565b604051908152f35b634e487b7160e01b81526011600452602490fd5b634e487b7160e01b82526011600452602482fd5b612af801915081106115dd576115525f61152c565b634e487b7160e01b83526011600452602483fd5b6344e30e0360e11b8252600482fd5b506509184e72a0008513611505565b61161a91504261210c565b600454105f6114e8565b42811191506114e1565b905069ffffffffffffffffffff9750879250611659915060a03d60a0116112545761123d81836120ea565b909950919391929190506114c0565b915060405192611677846120ba565b600554936001600160d01b038516808252602082019560d01c8652156115f157516001600160d01b031693506001926114ee565b634fd3f39560e01b8352600483fd5b50346102a557806003193601126102a557602060ff600954166040519015158152f35b50346102a557806003193601126102a55750610a746040516117006040826120ea565b601281527f504d56342d4465706f7369742d342e352e300000000000000000000000000000602082015260405191829160208352602083019061205a565b50346102a55760603660031901126102a55760043567ffffffffffffffff8111610fed5780600401906101206003198236030112610fe957604435906001600160a01b03600254163303611a595760ff60095416611a4a5760e4906117a16126d6565b019260346117af8585612230565b905010611a3b578235936001600160a01b03851692838603610fe9576008549081811115611a335750935b60486117e68383612230565b905010155f146116ab57906117fa91612230565b604811610fed576034013560601c808252600b6020526040822054909384918015610d8b576040519061182c826120ba565b600554916001600160d01b038316808252602082019360d01c845215611a2457516001600160d01b0316915084821315611a06576402540be40082128015611a15575b611a065760ff60035460a01c16916007549081612710019182612710116119f257612af8018092116119de579061154d6118b992878952600e60205260ff60408a2054169661212d565b916127108202918204612710036119ca57600a0160ff81116119ca5761158c6118ea949392611586611592936126f6565b92808352600a60205260408320825f526020528360405f205410610395578252600a60205260408220905f5260205260405f2061192883825461210c565b905560055460d01c9081156119bb57506119a19361197b61194f6119899360045490612140565b93604051958693602085016001600160a01b036040929594938160608401971683521660208201520152565b03601f1981018452836120ea565b6001805560405192839260408452604084019061205a565b60a09190911b65ffffffffffff60a01b1660208301520390f35b637d1bece760e01b8152600490fd5b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b87526011600452602487fd5b634e487b7160e01b88526011600452602488fd5b6344e30e0360e11b8552600485fd5b506509184e72a000821361186f565b6344e30e0360e11b8652600486fd5b9050936117da565b634fd3f39560e01b8152600490fd5b63026ee64160e51b8452600484fd5b637f3c57b560e01b8452600484fd5b50806003193601126102a557611a7c6126b0565b806001600160a01b0360025416803b15610ca057816024916040519283809263b760faf960e01b825230600483015234905af18015610c2157610c105750f35b50346102a55760203660031901126102a557600435611ad96126b0565b603c81108015611b2f575b611b20577f2cfed7ac4be4a0009ef1af32ea2de149e0122938cb9aa4b3f7df3be6da1055e960406004548151908152836020820152a160045580f35b633ed9025960e11b8252600482fd5b50620151808111611ae4565b50346102a55760403660031901126102a557611b5561201a565b602435611b606126b0565b6001600160a01b038216918215611cbf578115611cb057828452600d602052604084205415611c46575b5060ff601260405163313ce56760e01b8152602081600481885afa869181611c25575b50611c1d575b501660188111611c0e577fceb40be0a58aa33916c199e469842b614ef313295573c15d82f85cc9d1a89d3291602091848652600e8352604086209060ff19825416179055838552600b8252806040862055604051908152a280f35b630c70c5db60e31b8452600484fd5b90505f611bb3565b611c3f91925060203d6020116107535761074481836120ea565b905f611bad565b600c54600a811015611ca15768010000000000000000811015611c8d57906113cc826001611c779401600c556121eb565b600c54828452600d60205260408420555f611b8a565b634e487b7160e01b85526041600452602485fd5b63074f8ff960e41b8552600485fd5b6344e30e0360e11b8452600484fd5b632462edf160e01b8452600484fd5b50346102a557806003193601126102a55760206001600160a01b0360035416604051908152f35b50346102a557806003193601126102a557611d0e6126b0565b6103ed6121b1565b50346102a557806003193601126102a55760206040516509184e72a0008152f35b50346102a557806003193601126102a557611d506126b0565b6103ed61214d565b50346102a557806003193601126102a5576020604051600a8152f35b50346102a55760403660031901126102a55780611d8f61201a565b611d976126b0565b6001600160a01b036002541690813b15610c2c576001600160a01b036044849283604051958694859363040b850f60e31b855216600484015260243560248401525af18015610c2157610c105750f35b50346102a55760203660031901126102a55760406020916001600160a01b03611e0e61201a565b168152600b83522054604051908152f35b50346102a557806003193601126102a55760206040516103e88152f35b50346102a557806003193601126102a5576020600854604051908152f35b50346102a55760403660031901126102a55760043560243565ffffffffffff81169081810361081557611e8b6126b0565b8215611cb0576402540be40083108015611f8b575b611cb057428211611cb0576001600160d01b036005541680158015611f3c575b857f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683860408787876001600160d01b038316908260208651611f00816120ba565b848152015260d01b7fffffffffffff0000000000000000000000000000000000000000000000000000161760055582519182526020820152a180f35b611b58820290828204611b58148117156119de576132c883029283046132c81417156119ca5761271090048410908115611f7d575b50611cb0575f80611ec0565b61271091500483115f611f71565b50655af3107a40008311611ea0565b5060203660031901126120165760043563ffffffff811680910361201657611fc06126b0565b6001600160a01b036002541690813b15612016575f90602460405180948193621cb65b60e51b8352600483015234905af1801561200b57611fff575080f35b61001891505f906120ea565b6040513d5f823e3d90fd5b5f80fd5b600435906001600160a01b038216820361201657565b602435906001600160a01b038216820361201657565b35906001600160a01b038216820361201657565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b90602080835192838152019201905f5b81811061209b5750505090565b82516001600160a01b031684526020938401939092019160010161208e565b6040810190811067ffffffffffffffff8211176120d657604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff8211176120d657604052565b9190820391821161211957565b634e487b7160e01b5f52601160045260245ffd5b8181029291811591840414171561211957565b9190820180921161211957565b60095460ff81166121ae5760ff1916600117600955337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2307fca323d32ea3ada728fbc5a470183af7d4cc49a426cb2bdf68847d6e298576f205f80a2565b50565b60095460ff8116156121ae5760ff1916600955337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2565b600c5481101561220357600c5f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b90816020910312612016575160ff811681036120165790565b903590601e1981360301821215612016570180359067ffffffffffffffff82116120165760200191813603831361201657565b519069ffffffffffffffffffff8216820361201657565b908160a09103126120165761228e81612263565b916020820151916040810151916122ac608060608401519301612263565b90565b90816020910312612016575180151581036120165790565b60ff6009541661238a576001600160a01b035f541660405190632474521560e21b82527ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e600483015260248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa5f9181612359575b506122ac57505f90565b61237c91925060203d602011612383575b61237481836120ea565b8101906122af565b905f61234f565b503d61236a565b5f90565b90915f9280156125e3578260609181010312612016576123ad82612046565b6001600160a01b038060406123c460208701612046565b95013592169316935f60055460d01c80159081156125d9575b81156125c4575b50612554575b60405190635dbfc94d60e01b825284600483015286602483015215156044820152602081606481305afa829181612500575b5091606093917f62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae0739593155f146124fa5750815b8083116124f2575b826124619161210c565b806124c0575b5081612483575b506040519182528060208301526040820152a3565b6040906001600160a01b03600654168152600a602052206001600160a01b0387165f5260205260405f206124b8828254612140565b90555f61246e565b868252600a602052604082206001600160a01b0389165f526020526124ea60405f20918254612140565b90555f612467565b915081612457565b9161244f565b9091506020813d60201161254c575b8161251c602093836120ea565b81010312610fe95751907f62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae07361241c565b3d915061250f565b50303b1561201657604051630ce74fc560e31b81525f8160048183305af190816125af575b506125aa577f2b5186a49160aeb8b14d6c82226402a1645e57be3d6219529ab397ee974134758180a15b60016123ea565b6125a3565b6125bc9192505f906120ea565b5f905f612579565b6125cf91504261210c565b600454105f6123e4565b42811191506123dd565b50505050565b60095460ff81166121ae5760ff1916600117600955337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2565b67ffffffffffffffff81116120d65760051b60200190565b80518210156122035760209160051b010190565b60095460ff8116156121ae5760ff1916600955337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2307fa802e6454d86a21ffa90efd6c93aa893bcf539fea6c1a9c8097879faccc389bb5f80a2565b6001600160a01b035f541633036126c357565b63118cdaa760e01b5f523360045260245ffd5b6002600154146126e7576002600155565b633ee5aeb560e01b5f5260045ffd5b60ff16604d811161211957600a0a90565b6001600160a01b03805f549216918282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b9091828202915f19848209938380861095039480860395146127cb57848311156127bc57829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b5050915081156127d9570490565b634e487b7160e01b5f52601260045260245ffd5b5f6001600160a01b038192169260208151910182855af13d1561288a573d67ffffffffffffffff81116120d657604051612847929091612837601f8201601f1916602001846120ea565b82523d5f602084013e5b83612896565b805190811515918261286f575b505061285d5750565b635274afe760e01b5f5260045260245ffd5b61288292506020809183010191016122af565b155f80612854565b61284790606090612841565b906128ba57508051156128ab57805190602001fd5b630a12f52160e11b5f5260045ffd5b815115806128e7575b6128cb575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156128c356fea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/core/variables/PaymasterFactoryABI.md b/api/@aastar/core/variables/PaymasterFactoryABI.md index f3a41de5e..eb753df5b 100644 --- a/api/@aastar/core/variables/PaymasterFactoryABI.md +++ b/api/@aastar/core/variables/PaymasterFactoryABI.md @@ -1,3 +1,3 @@ > `const` **PaymasterFactoryABI**: `any` -Defined in: [packages/core/src/abis/index.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L49) +Defined in: [packages/core/src/abis/index.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L78) diff --git a/api/@aastar/core/variables/PaymasterFactoryArtifact.md b/api/@aastar/core/variables/PaymasterFactoryArtifact.md index b97580981..01fd790ae 100644 --- a/api/@aastar/core/variables/PaymasterFactoryArtifact.md +++ b/api/@aastar/core/variables/PaymasterFactoryArtifact.md @@ -1,6 +1,6 @@ > `const` **PaymasterFactoryArtifact**: `object` = `PaymasterFactoryABIData` -Defined in: [packages/core/src/abis/index.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L50) +Defined in: [packages/core/src/abis/index.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L79) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:50](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x6080806040523460755733156062575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055611aae908161007a8239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c80630618f104146113fb5780630cfb14b0146113de57806314b1c401146113c15780631798d4821461139257806341bbe5a8146110a257806354fd4d501461132f57806364feab64146111cc5780636a1894391461116f5780636b683896146110fd5780636c583e59146110a2578063715018a6146110265780637563750514610d6b5780637857bce914610c4e578063821ac3fb14610c0057806385365cbb1461099b5780638da5cb5b14610969578063a87d5a74146108da578063ad384a9b146104b6578063bde9cb2a14610396578063ce47d4671461033b578063d1255313146102c2578063dc2a147214610261578063f2fde38b146101935763f3bcebbd14610121575f80fd5b3461018f57602060031936011261018f5760043567ffffffffffffffff811161018f5773ffffffffffffffffffffffffffffffffffffffff60208061016b819436906004016114a6565b604051928184925191829101835e8101600281520301902054161515604051908152f35b5f80fd5b3461018f57602060031936011261018f5773ffffffffffffffffffffffffffffffffffffffff6101c1611635565b6101c9611a2c565b1680156102355773ffffffffffffffffffffffffffffffffffffffff5f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f1e4fbdf7000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b3461018f57602060031936011261018f5773ffffffffffffffffffffffffffffffffffffffff61028f611635565b165f526004602052604073ffffffffffffffffffffffffffffffffffffffff815f20541681519080825215156020820152f35b3461018f57604060031936011261018f576102e1602435600435611919565b6040518091602082016020835281518091526020604084019201905f5b81811061030c575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff168452859450602093840193909201916001016102fe565b3461018f57602060031936011261018f5773ffffffffffffffffffffffffffffffffffffffff610369611635565b165f526004602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b3461018f57604060031936011261018f5760043567ffffffffffffffff811161018f576103c79036906004016114a6565b73ffffffffffffffffffffffffffffffffffffffff604051602081845180838701835e8101600281520301902054169081156104745760206055604384604051903060388301526f5af43d82803e903d91602b57fd5bf3ff60248301526014820152733d602d80600a3d3981f3363d3d373d3d3d363d73815260243560588201526037600c8201206078820152012073ffffffffffffffffffffffffffffffffffffffff60405191168152f35b6104b2906040519182917fed4fac37000000000000000000000000000000000000000000000000000000008352602060048401526024830190611610565b0390fd5b3461018f57606060031936011261018f5760043567ffffffffffffffff811161018f576104e79036906004016114a6565b60443567ffffffffffffffff811161018f576105079036906004016114a6565b906105106119f3565b335f52600360205273ffffffffffffffffffffffffffffffffffffffff60405f2054166108ae57604051602081835180838601835e810160028152030190205473ffffffffffffffffffffffffffffffffffffffff811615610873577fffffffffffffffffffffffffffffffffff00000000000000000000000000000081763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39460881c16175f5260781b1617602052602435603760095ff573ffffffffffffffffffffffffffffffffffffffff811691821561084b578351156107c657610744839261066c60205f808983809b51910182875af1610667602d61061c6116ec565b6040519485917f496e6974206661696c65643a2000000000000000000000000000000000000000828401528051918291018484015e81015f838201520301601f198101845283611467565b61171b565b6106c35f80604051898101907f8da5cb5b000000000000000000000000000000000000000000000000000000008252600481526106aa602482611467565b5190855afa6106b76116ec565b81610793575b5061178d565b335f526003865260405f20847fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055835f526004865260405f2073ffffffffffffffffffffffffffffffffffffffff33167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556117f2565b61074f600754611881565b6007557fa1ff1ed230517376e0a7481a00b4dfc8f2f2e212bccebd933d567bf5640494c06040518061078433944290836118bc565b0390a360018055604051908152f35b905073ffffffffffffffffffffffffffffffffffffffff6107be8251928a8033958301019101611761565b1614886106bd565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f696e69744461746120726571756972656420666f72207365637572652064657060448201527f6c6f796d656e74000000000000000000000000000000000000000000000000006064820152608490fd5b7fc2f868f4000000000000000000000000000000000000000000000000000000005f5260045ffd5b6040517fed4fac3700000000000000000000000000000000000000000000000000000000815260206004820152806104b26024820185611610565b7f69e496ad000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b3461018f57602060031936011261018f5773ffffffffffffffffffffffffffffffffffffffff610908611635565b16805f52600460205273ffffffffffffffffffffffffffffffffffffffff60405f205416801561093d57602090604051908152f35b507f51b795b8000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b3461018f575f60031936011261018f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461018f57602060031936011261018f5760043567ffffffffffffffff811161018f576109cc9036906004016114a6565b6109d4611a2c565b73ffffffffffffffffffffffffffffffffffffffff604051602081845180838701835e8101600281520301902054161561047457610a1061153b565b81519167ffffffffffffffff8311610bd357610a2d6006546114ea565b601f8111610b65575b50602092601f8111600114610abd57610a9f929181610aad927ff2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a965f91610ab2575b505f198260011b9260031b1c1916176006555b604051938493604085526040850190611610565b908382036020850152611610565b0390a1005b905082015187610a78565b601f19811660065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f905f5b818110610b4d575082610a9f9594927ff2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a97610aad9560019410610b35575b5050811b01600655610a8b565b8401515f1960f88460031b161c191690558780610b28565b84870151835560209687019660019093019201610aea565b83811115610a365760065f52601f840160051c9060208510610bcb575b601f82910160051c03905f5b828110610b9c575050610a36565b5f8282017ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0155600101610b8e565b5f9150610b82565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b3461018f57602060031936011261018f5760043560055481101561018f5773ffffffffffffffffffffffffffffffffffffffff610c3e6020926116a7565b90549060031b1c16604051908152f35b3461018f57610c5c36611658565b90610c65611a2c565b73ffffffffffffffffffffffffffffffffffffffff8216918215908115610d61575b50610d35576040519073ffffffffffffffffffffffffffffffffffffffff815192602081818501958087835e8101600281520301902054169182156108735790610d0f916020604051809284518091835e81016002815203019020847fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556118d8565b7f2255c4b39068cc7208e9c29b0fc9a3d106b3a41ada38999656d54aa44a6dc9e85f80a4005b507f0c760937000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b90503b1583610c87565b3461018f57610d7936611658565b610d81611a2c565b73ffffffffffffffffffffffffffffffffffffffff811690811590811561101c575b50610ff15760405173ffffffffffffffffffffffffffffffffffffffff835191602081818701948086835e810160028152030190205416610fb6576020604051809285518091835e81016002815203019020817fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905560065491610e2a836114ea565b15610e5f575b610e39906118d8565b7f9aa81ca4174435962ad1571b0a59c4440cf6de4a12ba4ed96d6fdf5d346742785f80a3005b80519267ffffffffffffffff8411610bd357610e7a906114ea565b601f8111610f48575b50602092601f8111600114610ec55780610e3993945f91610eba575b505f198260011b9260031b1c1916176006555b829150610e30565b905082015185610e9f565b601f19811660065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f905f5b818110610f30575090610e399495836001949310610f18575b5050811b01600655610eb2565b8401515f1960f88460031b161c191690558580610f0b565b84870151835560209687019660019093019201610ef2565b83811115610e835760065f52601f840160051c9060208510610fae575b601f82910160051c03905f5b828110610f7f575050610e83565b5f8282017ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0155600101610f71565b5f9150610f65565b6040517fb94f32dd00000000000000000000000000000000000000000000000000000000815260206004820152806104b26024820186611610565b7f0c760937000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b90503b1583610da3565b3461018f575f60031936011261018f5761103e611a2c565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461018f57602060031936011261018f5773ffffffffffffffffffffffffffffffffffffffff6110d0611635565b165f526003602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b3461018f57602060031936011261018f5760043567ffffffffffffffff811161018f5761112e9036906004016114a6565b73ffffffffffffffffffffffffffffffffffffffff604051602081845180838701835e81016002815203019020541690811561047457602082604051908152f35b3461018f57602060031936011261018f5773ffffffffffffffffffffffffffffffffffffffff61119d611635565b165f526003602052602073ffffffffffffffffffffffffffffffffffffffff60405f2054161515604051908152f35b3461018f57604060031936011261018f5760043567ffffffffffffffff811161018f576111fd9036906004016114a6565b60243567ffffffffffffffff811161018f5761121d9036906004016114a6565b906112266119f3565b335f52600360205273ffffffffffffffffffffffffffffffffffffffff60405f2054166108ae57604051602081835180838601835e810160028152030190205473ffffffffffffffffffffffffffffffffffffffff811615610873577fffffffffffffffffffffffffffffffffff00000000000000000000000000000081763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39460881c16175f5260781b1617602052603760095ff073ffffffffffffffffffffffffffffffffffffffff811691821561084b578351156107c657610744839261066c60205f808983809b51910182875af1610667602d61061c6116ec565b3461018f575f60031936011261018f5761138e604051611350604082611467565b601681527f5061796d6173746572466163746f72792d312e302e32000000000000000000006020820152604051918291602083526020830190611610565b0390f35b3461018f575f60031936011261018f5761138e6113ad61153b565b604051918291602083526020830190611610565b3461018f575f60031936011261018f576020600554604051908152f35b3461018f575f60031936011261018f576020600754604051908152f35b3461018f57602060031936011261018f5760043567ffffffffffffffff811161018f5773ffffffffffffffffffffffffffffffffffffffff602080611445819436906004016114a6565b604051928184925191829101835e810160028152030190205416604051908152f35b90601f601f19910116810190811067ffffffffffffffff821117610bd357604052565b67ffffffffffffffff8111610bd357601f01601f191660200190565b81601f8201121561018f576020813591016114c08261148a565b926114ce6040519485611467565b8284528282011161018f57815f92602092838601378301015290565b90600182811c92168015611531575b602083101461150457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f16916114f9565b604051905f826006549161154e836114ea565b80835292600181169081156115d35750600114611574575b61157292500383611467565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b8183106115b757505090602061157292820101611566565b602091935080600191548385890101520191019091849261159f565b602092506115729491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101611566565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361018f57565b604060031982011261018f576004359067ffffffffffffffff821161018f57611683916004016114a6565b9060243573ffffffffffffffffffffffffffffffffffffffff8116810361018f5790565b6005548110156116bf5760055f5260205f2001905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b3d15611716573d906116fd8261148a565b9161170b6040519384611467565b82523d5f602084013e565b606090565b156117235750565b6104b2906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190611610565b9081602091031261018f575173ffffffffffffffffffffffffffffffffffffffff8116810361018f5790565b1561179457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4f776e6572206e6f742073657420636f72726563746c790000000000000000006044820152fd5b60055468010000000000000000811015610bd357600181016005556005548110156116bf5760055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b5f19811461188f5760010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291906118d3602091604086526040860190611610565b930152565b602090604051918183925191829101835e81015f815203902090565b67ffffffffffffffff8111610bd35760051b60200190565b9190820180921161188f57565b919060055490818410156119d757611931908461190c565b908082116119cf575b5082810390811161188f5761194e816118f4565b9061195c6040519283611467565b808252601f1961196b826118f4565b0136602084013781935f5b8281106119835750505050565b73ffffffffffffffffffffffffffffffffffffffff6119aa6119a5838561190c565b6116a7565b90549060031b1c169084518110156116bf5760019160208260051b8701015201611976565b90505f61193a565b505090506040516119e9602082611467565b5f81525f36813790565b600260015414611a04576002600155565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b73ffffffffffffffffffffffffffffffffffffffff5f54163303611a4c57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea26469706673582212201a2b719ecc574d1143d904cc827eb01a03cfbd975ea97193417e671b07a281db64736f6c63430008210033"` +> **bytecode**: `string` = `"0x6080806040523460755733156062575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600180556117cd908161007a8239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c80630618f104146112095780630cfb14b0146111ec57806314b1c401146111cf5780631798d482146111a057806341bbe5a814610e3b57806354fd4d501461113d57806364feab6414610f245780636a18943914610ee15780636b68389614610e7c5780636c583e5914610e3b578063715018a614610dd75780637563750514610b7f5780637857bce914610aad5780637b10399914610a87578063821ac3fb14610a4657806385365cbb146108065780638da5cb5b146107e1578063a87d5a7414610785578063a91ee0dc14610725578063ad384a9b146103f9578063bde9cb2a1461030c578063ce47d467146102cb578063d12553131461025f578063dc2a147214610218578063f2fde38b1461019c5763f3bcebbd14610137575f80fd5b346101985760203660031901126101985760043567ffffffffffffffff8111610198576001600160a01b03602080610174819436906004016112a6565b604051928184925191829101835e8101600281520301902054161515604051908152f35b5f80fd5b34610198576020366003190112610198576001600160a01b036101bd6113fd565b6101c561179a565b168015610205576001600160a01b035f548282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610198576020366003190112610198576001600160a01b036102396113fd565b165f52600460205260406001600160a01b03815f20541681519080825215156020820152f35b346101985760403660031901126101985761027e60243560043561158f565b6040518091602082016020835281518091526020604084019201905f5b8181106102a9575050500390f35b82516001600160a01b031684528594506020938401939092019160010161029b565b34610198576020366003190112610198576001600160a01b036102ec6113fd565b165f52600460205260206001600160a01b0360405f205416604051908152f35b346101985760403660031901126101985760043567ffffffffffffffff81116101985761033d9036906004016112a6565b6001600160a01b03604051602081845180838701835e8101600281520301902054169081156103d05760206055604384604051903060388301526f5af43d82803e903d91602b57fd5bf3ff60248301526014820152733d602d80600a3d3981f3363d3d373d3d3d363d73815260243560588201526037600c820120607882015201206001600160a01b0360405191168152f35b60405163ed4fac3760e01b8152602060048201529081906103f59060248301906113d9565b0390fd5b346101985760603660031901126101985760043567ffffffffffffffff81116101985761042a9036906004016112a6565b60443567ffffffffffffffff81116101985761044a9036906004016112a6565b9061045361165c565b6001600160a01b0360085416806105fa575b50335f5260036020526001600160a01b0360405f2054166105e757604051602081835180838601835e81016002815203019020546001600160a01b038116156105c55780763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39360881c16175f526effffffffffffffffffffffffffffff199060781b1617602052602435603760095ff56001600160a01b0381169182156105b657610567839261052360209633836116ab565b335f526003865260405f20846001600160a01b0319825416179055835f526004865260405f206001600160a01b0333166001600160a01b0319825416179055611499565b610572600754611510565b6007557fa1ff1ed230517376e0a7481a00b4dfc8f2f2e212bccebd933d567bf5640494c0604051806105a73394429083611532565b0390a360018055604051908152f35b6330be1a3d60e21b5f5260045ffd5b60405163ed4fac3760e01b815260206004820152806103f560248201856113d9565b6369e496ad60e01b5f523360045260245ffd5b604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0746004820152336024820152602081604481855afa9081156106ec575f91610706575b50156106f757602060449160405192838092632474521560e21b82527ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e60048301523360248301525afa9081156106ec575f916106bd575b50156106ae5782610465565b63707fda8f60e11b5f5260045ffd5b6106df915060203d6020116106e5575b6106d78183611268565b810190611481565b836106a2565b503d6106cd565b6040513d5f823e3d90fd5b6317746e1b60e31b5f5260045ffd5b61071f915060203d6020116106e5576106d78183611268565b8461064a565b346101985760203660031901126101985761073e6113fd565b61074661179a565b6001600160a01b0380600854921691828219821617600855167f482b97c53e48ffa324a976e2738053e9aff6eee04d8aac63b10e19411d869b825f80a3005b34610198576020366003190112610198576001600160a01b036107a66113fd565b16805f5260046020526001600160a01b0360405f20541680156107ce57602090604051908152f35b50630a36f2b760e31b5f5260045260245ffd5b34610198575f3660031901126101985760206001600160a01b035f5416604051908152f35b346101985760203660031901126101985760043567ffffffffffffffff8111610198576108379036906004016112a6565b61083f61179a565b6001600160a01b03604051602081845180838701835e810160028152030190205416156103d05761086e611322565b81519167ffffffffffffffff8311610a325761088b6006546112ea565b601f81116109c4575b50602092601f811160011461091c576108fe92918161090c927ff2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a965f91610911575b508160011b915f199060031b1c1916176006555b6040519384936040855260408501906113d9565b9083820360208501526113d9565b0390a1005b9050820151876108d6565b601f19811660065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f905f5b8181106109ac5750826108fe9594927ff2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a9761090c9560019410610994575b5050811b016006556108ea565b8401515f1960f88460031b161c191690558780610987565b84870151835560209687019660019093019201610949565b838111156108945760065f52601f840160051c9060208510610a2a575b601f82910160051c03905f5b8281106109fb575050610894565b5f8282017ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01556001016109ed565b5f91506109e1565b634e487b7160e01b5f52604160045260245ffd5b3461019857602036600319011261019857600435600554811015610198576001600160a01b03610a77602092611455565b90549060031b1c16604051908152f35b34610198575f3660031901126101985760206001600160a01b0360085416604051908152f35b3461019857610abb36611413565b90610ac461179a565b6001600160a01b038216918215908115610b75575b50610b6257604051906001600160a01b03815192602081818501958087835e8101600281520301902054169182156105c55790610b3c916020604051809284518091835e81016002815203019020846001600160a01b031982541617905561154e565b7f2255c4b39068cc7208e9c29b0fc9a3d106b3a41ada38999656d54aa44a6dc9e85f80a4005b50630c76093760e01b5f5260045260245ffd5b90503b1583610ad9565b3461019857610b8d36611413565b610b9561179a565b6001600160a01b038116908115908115610dcd575b50610dbb576040516001600160a01b03835191602081818701948086835e810160028152030190205416610d99576020604051809285518091835e81016002815203019020816001600160a01b031982541617905560065491610c0c836112ea565b15610c41575b610c1b9061154e565b7f9aa81ca4174435962ad1571b0a59c4440cf6de4a12ba4ed96d6fdf5d346742785f80a3005b80519267ffffffffffffffff8411610a3257610c5c906112ea565b601f8111610d2b575b50602092601f8111600114610ca85780610c1b93945f91610c9d575b508160011b915f199060031b1c1916176006555b829150610c12565b905082015185610c81565b601f19811660065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f905f5b818110610d13575090610c1b9495836001949310610cfb575b5050811b01600655610c95565b8401515f1960f88460031b161c191690558580610cee565b84870151835560209687019660019093019201610cd5565b83811115610c655760065f52601f840160051c9060208510610d91575b601f82910160051c03905f5b828110610d62575050610c65565b5f8282017ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0155600101610d54565b5f9150610d48565b60405163b94f32dd60e01b815260206004820152806103f560248201866113d9565b630c76093760e01b5f5260045260245ffd5b90503b1583610baa565b34610198575f36600319011261019857610def61179a565b5f805473ffffffffffffffffffffffffffffffffffffffff19811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610198576020366003190112610198576001600160a01b03610e5c6113fd565b165f52600360205260206001600160a01b0360405f205416604051908152f35b346101985760203660031901126101985760043567ffffffffffffffff811161019857610ead9036906004016112a6565b6001600160a01b03604051602081845180838701835e8101600281520301902054169081156103d057602082604051908152f35b34610198576020366003190112610198576001600160a01b03610f026113fd565b165f52600360205260206001600160a01b0360405f2054161515604051908152f35b346101985760403660031901126101985760043567ffffffffffffffff811161019857610f559036906004016112a6565b60243567ffffffffffffffff811161019857610f759036906004016112a6565b90610f7e61165c565b6001600160a01b03600854168061104b575b50335f5260036020526001600160a01b0360405f2054166105e757604051602081835180838601835e81016002815203019020546001600160a01b038116156105c55780763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39360881c16175f526effffffffffffffffffffffffffffff199060781b1617602052603760095ff06001600160a01b0381169182156105b657610567839261052360209633836116ab565b604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0746004820152336024820152602081604481855afa9081156106ec575f9161111e575b50156106f757602060449160405192838092632474521560e21b82527ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e60048301523360248301525afa9081156106ec575f916110ff575b50156106ae5782610f90565b611118915060203d6020116106e5576106d78183611268565b836110f3565b611137915060203d6020116106e5576106d78183611268565b8461109b565b34610198575f3660031901126101985761119c60405161115e604082611268565b601681527f5061796d6173746572466163746f72792d312e302e320000000000000000000060208201526040519182916020835260208301906113d9565b0390f35b34610198575f3660031901126101985761119c6111bb611322565b6040519182916020835260208301906113d9565b34610198575f366003190112610198576020600554604051908152f35b34610198575f366003190112610198576020600754604051908152f35b346101985760203660031901126101985760043567ffffffffffffffff8111610198576001600160a01b03602080611246819436906004016112a6565b604051928184925191829101835e810160028152030190205416604051908152f35b90601f8019910116810190811067ffffffffffffffff821117610a3257604052565b67ffffffffffffffff8111610a3257601f01601f191660200190565b81601f82011215610198576020813591016112c08261128a565b926112ce6040519485611268565b8284528282011161019857815f92602092838601378301015290565b90600182811c92168015611318575b602083101461130457565b634e487b7160e01b5f52602260045260245ffd5b91607f16916112f9565b604051905f8260065491611335836112ea565b80835292600181169081156113ba575060011461135b575b61135992500383611268565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b81831061139e5750509060206113599282010161134d565b6020919350806001915483858901015201910190918492611386565b6020925061135994915060ff191682840152151560051b82010161134d565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361019857565b6040600319820112610198576004359067ffffffffffffffff82116101985761143e916004016112a6565b906024356001600160a01b03811681036101985790565b60055481101561146d5760055f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b90816020910312610198575180151581036101985790565b60055468010000000000000000811015610a32576001810160055560055481101561146d5760055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b5f19811461151e5760010190565b634e487b7160e01b5f52601160045260245ffd5b9291906115496020916040865260408601906113d9565b930152565b602090604051918183925191829101835e81015f815203902090565b67ffffffffffffffff8111610a325760051b60200190565b9190820180921161151e57565b91906005549081841015611640576115a79084611582565b90808211611638575b5082810390811161151e576115c48161156a565b906115d26040519283611268565b808252601f196115e18261156a565b0136602084013781935f5b8281106115f95750505050565b6001600160a01b0361161361160e8385611582565b611455565b90549060031b1c1690845181101561146d5760019160208260051b87010152016115ec565b90505f6115b0565b50509050604051611652602082611268565b5f81525f36813790565b60026001541461166d576002600155565b633ee5aeb560e01b5f5260045ffd5b3d156116a6573d9061168d8261128a565b9161169b6040519384611268565b82523d5f602084013e565b606090565b9091600481511061178b575f816020829351910182855af16116cb61167c565b901561175b57505f80916040516020810190638da5cb5b60e01b8252600481526116f6602482611268565b51915afa61170261167c565b90158015611780575b61175b576020818051810103126101985760200151906001600160a01b038216809203610198576001600160a01b0316808203611746575050565b632767cb4760e11b5f5260045260245260445ffd5b60405163044ba14b60e31b8152602060048201529081906103f59060248301906113d9565b50602081511061170b565b6307ce216360e51b5f5260045ffd5b6001600160a01b035f541633036117ad57565b63118cdaa760e01b5f523360045260245ffdfea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/PolicyRegistryABI.md b/api/@aastar/core/variables/PolicyRegistryABI.md new file mode 100644 index 000000000..40a7246c0 --- /dev/null +++ b/api/@aastar/core/variables/PolicyRegistryABI.md @@ -0,0 +1,3 @@ +> `const` **PolicyRegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L131) diff --git a/api/@aastar/core/variables/PolicyRegistryArtifact.md b/api/@aastar/core/variables/PolicyRegistryArtifact.md new file mode 100644 index 000000000..a14148726 --- /dev/null +++ b/api/@aastar/core/variables/PolicyRegistryArtifact.md @@ -0,0 +1,13 @@ +> `const` **PolicyRegistryArtifact**: `object` = `PolicyRegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L132) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a03461018957601f611a8338819003918201601f19168301916001600160401b0383118484101761018d5780849260609460405283398101031261018957610047816101a1565b906100606040610059602084016101a1565b92016101a1565b916001600160a01b038116158015610178575b61016957608052600780546001600160a01b0319166001600160a01b0392909216918217905560405191905f7f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad9098180a36001600160a01b03169081610123575b6040516118cd90816101b6823960805181818161016001528181610466015281816104a7015281816108630152818161095801528181610a5d01528181610b9d01528181610c6301526112bd0152f35b60207f5f7c8bcc9fe1f59809d268c8cf6b63a36c4aedb54e3a40628113344d5620dd4591835f526006825260405f20600160ff1982541617905560018152a25f806100d3565b63d92e233d60e01b5f5260045ffd5b506001600160a01b03821615610073565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101895756fe60806040526004361015610011575f80fd5b5f3560e01c8063055b8e7b146110b857806329210a4b14610fe357806335cefaa814610f0d5780633ef43aff14610c4957806343a0c39f14610c2c578063452a932014610c0657806353d8cb6814610b7a57806354fd4d5014610ae05780636ef778ee14610a2b578063715904dd146109bd5780637df732ea146109805780637e19482e146108d35780638a0dac4a14610840578063969cb5da146107f9578063a1a4a180146106e4578063b16559191461066d578063b743be941461063f578063be29f4911461048e578063ccd7129f14610184578063d33219b4146101415763e583983614610100575f80fd5b3461013d57602036600319011261013d576001600160a01b036101216112e5565b165f526003602052602060ff60405f2054166040519015158152f35b5f80fd5b3461013d575f36600319011261013d5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461013d5761019236611356565b906001600160a01b03600754163314158061045b575b61044c576001600160a01b031691821561043d576001600160a01b031691825f52600160205260405f20815f5260205260405f20805460ff8160d01c1615610410576101f38461146f565b80610432575b6104105760ff8160081c168061041f575b6104105760408401906001600160801b038061022584611415565b9260101c16911611610410577f92249bcccf66629d53d2829a1c6769f4d5d74bc9d8bc6aa08ab9f00c7f89fcfc859184936102746102628861146f565b829060ff801983541691151516179055565b610347602088019161029e6102888461146f565b825461ff00191690151560081b61ff0016178255565b6102e06102aa85611415565b825471ffffffffffffffffffffffffffffffff0000191660109190911b71ffffffffffffffffffffffffffffffff000016178255565b67ffffffffffffffff6103046102fe6102f88c61146f565b9561146f565b95611415565b915460901c16906040519485948592936001600160801b0367ffffffffffffffff9296956060946080870198151587521515602087015216604085015216910152565b0390a3608082016103588184611491565b9390505f5b84811061038c5733867f4d156b5f26f59392a109b67021b0a170f0ea10ac562c1538dee681f1727151e65f80a3005b806103ab6103a66001936103a08787611491565b906114c7565b6114eb565b875f52600260205260405f20865f5260205260405f209063ffffffff60e01b1690815f5260205260405f2060ff19815416905585887fdae56faaf89f401e21b133aee83453dde734ae5b8d6d672919900921f1e6278060206040515f8152a40161035d565b63c892292160e01b5f5260045ffd5b5061042c6020850161146f565b1561020a565b5060ff8116156101f9565b63d92e233d60e01b5f5260045ffd5b63954afe2760e01b5f5260045ffd5b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314156101a8565b3461013d5761049c36611311565b916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576104d682611779565b6104df83611415565b9160208401936104ee85611415565b936040820135936105016060840161147c565b9161050a611429565b6001600160801b03918216815296811660208089019182526040808a0189815267ffffffffffffffff90961660608b0190815260016080808d019182526001600160a01b039788165f818152808752858120998d16815298909552929096209a51935190911b6fffffffffffffffffffffffffffffffff191692909316919091178855969092516001820155600201915167ffffffffffffffff1682549151151560401b68ff0000000000000000169168ffffffffffffffffff1916171790556105d390611415565b936105dd90611415565b604080516001600160801b039687168152919095166020820152938401919091526001600160a01b0316917f9984473f7cade7b75b6eb54c38d7958684489452a04379c6d91de87da74375fe90606090a3005b63656a6d1560e11b5f5260045ffd5b3461013d575f36600319011261013d57602060405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b3461013d57606036600319011261013d576106866112e5565b61068e6112fb565b6044359163ffffffff60e01b831680930361013d576001600160a01b03165f5260026020526001600160a01b0360405f2091165f5260205260405f20905f52602052602060ff60405f2054166040519015158152f35b3461013d576106f2366113b2565b9193929092335f52600660205260ff60405f205416156107ea576001600160a01b03807fc8e3d7812ff5ee9233152255de3b82224861baad07a1550a51ccd7174f1e7f8893816040946107448a611779565b1695865f525f602052845f20838a165f5260205261078a88865f20895f526004602052875f20868d165f5260205267ffffffffffffffff6002895f2092015416906117ce565b865f526001602052845f208383165f526020526107cf88865f20895f526005602052875f208686165f5260205267ffffffffffffffff885f20915460901c16906117ce565b84519788526001600160e01b031916602088015216951693a4005b634b95b20b60e11b5f5260045ffd5b3461013d5761081361080a366113b2565b93929092611521565b60405190600383101561082c5760409282526020820152f35b634e487b7160e01b5f52602160045260245ffd5b3461013d57602036600319011261013d576108596112e5565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b0316801561043d576001600160a01b03600754828219821617600755167f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad9095f80a3005b3461013d57602036600319011261013d576108ec6112e5565b6001600160a01b03600754163314158061094d575b61044c576001600160a01b0316805f52600360205260405f20600160ff1982541617905533907fbcc778b1735935d8f1de4988aa99c5a443739e2fb826dc7aa3f3bf64bb115fb85f80a3005b506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016331415610901565b3461013d57602036600319011261013d576001600160a01b036109a16112e5565b165f526006602052602060ff60405f2054166040519015158152f35b3461013d57604036600319011261013d576109d66112e5565b6001600160a01b036109e66112fb565b91165f5260046020526001600160a01b0360405f2091165f526020526040805f205467ffffffffffffffff8251916001600160801b038116835260801c166020820152f35b3461013d57604036600319011261013d57610a446112e5565b602435908115159081830361013d576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b031691821561043d577f5f7c8bcc9fe1f59809d268c8cf6b63a36c4aedb54e3a40628113344d5620dd4591610ad7602092855f526006845260405f209060ff801983541691151516179055565b604051908152a2005b3461013d575f36600319011261013d576040516040810181811067ffffffffffffffff821117610b665760405260148152604060208201917f506f6c69637952656769737472792d312e302e3000000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b634e487b7160e01b5f52604160045260245ffd5b3461013d57602036600319011261013d57610b936112e5565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b0316805f52600360205260405f2060ff1981541690557ff70670b858d56ee8e00bdc112191de0411959259f47dcbc6977aace0aee117655f80a2005b3461013d575f36600319011261013d5760206001600160a01b0360075416604051908152f35b3461013d575f36600319011261013d576020604051620151808152f35b3461013d57610c5736611356565b91906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b031690811561043d5781807f92249bcccf66629d53d2829a1c6769f4d5d74bc9d8bc6aa08ab9f00c7f89fcfc610cc58661146f565b60208701610e72610cd58261146f565b9660408a0193610ce485611415565b9160608c0192610dc46001600160801b03610cfe8661147c565b92610d07611429565b951515865260208601809e1515905281604087019116815267ffffffffffffffff6060870194168452610d8e6001600160a01b03608088019660018852169e8f9d8e5f52600160205260405f20905f52602052610d7760405f2098511515899060ff801983541691151516179055565b51875461ff00191690151560081b61ff0016178755565b51855471ffffffffffffffffffffffffffffffff00001916911660101b71ffffffffffffffffffffffffffffffff000016178455565b51907fffffffffff000000000000000000ffffffffffffffffffffffffffffffffffff79ffffffffffffffff00000000000000000000000000000000000084549260ff60d01b9051151560d01b169360901b16911617179055610e35610e2f6102fe6102f88d61146f565b9161147c565b906040519485948592936001600160801b0367ffffffffffffffff9296956060946080870198151587521515602087015216604085015216910152565b0390a36080830191610e848385611491565b9390505f5b848110610e9257005b80610ea66103a66001936103a0868b611491565b855f52600260205260405f20855f5260205260405f209063ffffffff60e01b1690815f5260205260405f208360ff1982541617905584867fdae56faaf89f401e21b133aee83453dde734ae5b8d6d672919900921f1e627806020604051878152a401610e89565b3461013d57604036600319011261013d57610f266112e5565b6001600160a01b03610f366112fb565b91610f3f611449565b50165f5260016020526001600160a01b0360405f2091165f5260205260a060405f20610f69611429565b905467ffffffffffffffff60ff82161515928381526001600160801b036020820160ff8560081c16151581526040830190828660101c16825260ff60806060860195878960901c168752019660d01c1615158652604051968752511515602087015251166040850152511660608301525115156080820152f35b3461013d57604036600319011261013d57610ffc6112e5565b6001600160a01b0361100c6112fb565b91611015611449565b50165f525f6020526001600160a01b0360405f2091165f5260205260a060405f2061103e611429565b67ffffffffffffffff8254916001600160801b03831693848252602082019360801c84526001600160801b0360026001830154926040850193845201549460ff608060608601958789168752019660401c161515865260405196875251166020860152516040850152511660608301525115156080820152f35b3461013d576110c636611311565b916001600160a01b0360075416331415806112b2575b61044c576001600160a01b03906110f283611779565b1691825f525f60205260405f206001600160a01b0383165f5260205260405f209160ff600284015460401c16156104105782546001600160801b038116806112ad57505f195b6001600160801b0361114985611415565b16611296575f195b11908115611273575b508015611262575b610410576001600160a01b037f9984473f7cade7b75b6eb54c38d7958684489452a04379c6d91de87da74375fe91611237600161120d611207876001600160801b036111ae8c9a611415565b166001600160801b03198b5416178a5560208101996111f86111cf8c611415565b82546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff1916178255565b60408201359485910155611415565b97611415565b6040519485941697846001600160801b036040929594938160608401971683521660208201520152565b0390a333907f4d156b5f26f59392a109b67021b0a170f0ea10ac562c1538dee681f1727151e65f80a3005b506001830154604083013511611162565b90506001600160801b0361128960208501611415565b9160801c9116118561115a565b6001600160801b036112a785611415565b16611151565b611138565b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314156110dc565b600435906001600160a01b038216820361013d57565b602435906001600160a01b038216820361013d57565b60c060031982011261013d576004356001600160a01b038116810361013d57916024356001600160a01b038116810361013d5760809092604319011261013d57604490565b606060031982011261013d576004356001600160a01b038116810361013d57916024356001600160a01b038116810361013d57916044359067ffffffffffffffff821161013d5760a090829003600319011261013d5760040190565b60a090600319011261013d576004356001600160a01b038116810361013d57906024356001600160a01b038116810361013d57906044356001600160a01b038116810361013d5790606435906084356001600160e01b03198116810361013d5790565b356001600160801b038116810361013d5790565b6040519060a0820182811067ffffffffffffffff821117610b6657604052565b611451611429565b905f82525f60208301525f60408301525f60608301525f6080830152565b35801515810361013d5790565b3567ffffffffffffffff8116810361013d5790565b903590601e198136030182121561013d570180359067ffffffffffffffff821161013d57602001918160051b3603831361013d57565b91908110156114d75760051b0190565b634e487b7160e01b5f52603260045260245ffd5b356001600160e01b03198116810361013d5790565b9190820180921161150d57565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b039095949293919561153985611779565b16805f52600360205260ff60405f20541661176c575f19955f94825f525f60205260405f206001600160a01b0382165f5260205260405f20600281015460ff8160401c166116b5575b505050815f52600160205260405f206001600160a01b0382165f5260205260405f20549360ff8560d01c166115c6575b50505050506115c0575f9190565b60019190565b60ff8516156116a657825f52600260205260405f206001600160a01b0383165f5260205260405f209063ffffffff60e01b165f5260205260ff60405f205416156116985767ffffffffffffffff8460901c169182611640575b5050505060081c60ff16611638575b5f808080806115b2565b50600161162e565b9161166d9161167294935f5260056020526001600160a01b0360405f2091165f5260205260405f20611789565b611500565b6001600160801b038260101c161061168d575f80808061161f565b505090506002905f90565b505050505090506002905f90565b50505050505090506002905f90565b908092995054988960801c861161175b578561166d60019361170193885f5260046020526001600160a01b0360405f2091165f5260205267ffffffffffffffff60405f20911690611789565b9101549081811161174b57810390811161150d57966001600160801b03168015159081611740575b50611737575b5f8080611582565b6001945061172f565b90508310155f611729565b5050505050505090506002905f90565b505050505050505090506002905f90565b5050505090506002905f90565b6001600160a01b03161561043d57565b9067ffffffffffffffff61179f6117b6926118a6565b9254921667ffffffffffffffff8360801c16611500565b4210156117c9576001600160801b031690565b505f90565b916117db61184d926118a6565b6117fe67ffffffffffffffff8554921667ffffffffffffffff8360801c16611500565b4210611898577fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff164260801b77ffffffffffffffff00000000000000000000000000000000161783555f611500565b6001600160801b0381116118815781546fffffffffffffffffffffffffffffffff19166001600160801b0391909116179055565b6306dfcc6560e41b5f52608060045260245260445ffd5b6001600160801b0316611500565b67ffffffffffffffff81166118bd57506201518090565b9056fea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/REGISTRY_ADDRESS.md b/api/@aastar/core/variables/REGISTRY_ADDRESS.md index e95aa88c5..6b65081bf 100644 --- a/api/@aastar/core/variables/REGISTRY_ADDRESS.md +++ b/api/@aastar/core/variables/REGISTRY_ADDRESS.md @@ -1,3 +1,3 @@ > **REGISTRY\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L29) +Defined in: [packages/core/src/constants.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L29) diff --git a/api/@aastar/core/variables/REPUTATION_SYSTEM_ADDRESS.md b/api/@aastar/core/variables/REPUTATION_SYSTEM_ADDRESS.md index 906c2021b..4cab293a4 100644 --- a/api/@aastar/core/variables/REPUTATION_SYSTEM_ADDRESS.md +++ b/api/@aastar/core/variables/REPUTATION_SYSTEM_ADDRESS.md @@ -1,3 +1,3 @@ > **REPUTATION\_SYSTEM\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L33) +Defined in: [packages/core/src/constants.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L33) diff --git a/api/@aastar/core/variables/ROLE_ANODE.md b/api/@aastar/core/variables/ROLE_ANODE.md index a15dd40eb..96eb18d69 100644 --- a/api/@aastar/core/variables/ROLE_ANODE.md +++ b/api/@aastar/core/variables/ROLE_ANODE.md @@ -1,6 +1,6 @@ > `const` **ROLE\_ANODE**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L84) +Defined in: [packages/core/src/roles.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L84) ANODE Role (Anonymous Node) @@ -14,7 +14,7 @@ Infrastructure operator ## Requirement -minStake: 20 GT, entryBurn: 2 GT (line 95) +minStake: 20 GT, ticketPrice: 2 GT (line 95) ## Exit Fee diff --git a/api/@aastar/core/variables/ROLE_COMMUNITY.md b/api/@aastar/core/variables/ROLE_COMMUNITY.md index 506d353c4..34ad3d6b2 100644 --- a/api/@aastar/core/variables/ROLE_COMMUNITY.md +++ b/api/@aastar/core/variables/ROLE_COMMUNITY.md @@ -1,6 +1,6 @@ > `const` **ROLE\_COMMUNITY**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L27) +Defined in: [packages/core/src/roles.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L27) Community Role @@ -14,7 +14,7 @@ Community-level governance ## Requirement -minStake: 30 GT, entryBurn: 3 GT (line 99) +minStake: 30 GT, ticketPrice: 3 GT (line 99) ## Exit Fee diff --git a/api/@aastar/core/variables/ROLE_DVT.md b/api/@aastar/core/variables/ROLE_DVT.md index e824eb059..32d61d389 100644 --- a/api/@aastar/core/variables/ROLE_DVT.md +++ b/api/@aastar/core/variables/ROLE_DVT.md @@ -1,6 +1,6 @@ > `const` **ROLE\_DVT**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L73) +Defined in: [packages/core/src/roles.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L73) DVT Role (Distributed Validator Technology) @@ -14,7 +14,7 @@ Infrastructure operator ## Requirement -minStake: 30 GT, entryBurn: 3 GT (line 94) +minStake: 30 GT, ticketPrice: 3 GT (line 94) ## Exit Fee diff --git a/api/@aastar/core/variables/ROLE_ENDUSER.md b/api/@aastar/core/variables/ROLE_ENDUSER.md index efb84d41b..329b3d4b1 100644 --- a/api/@aastar/core/variables/ROLE_ENDUSER.md +++ b/api/@aastar/core/variables/ROLE_ENDUSER.md @@ -1,6 +1,6 @@ > `const` **ROLE\_ENDUSER**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L39) +Defined in: [packages/core/src/roles.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L39) End User Role @@ -14,7 +14,7 @@ Basic user level ## Requirement -minStake: 0.3 GT, entryBurn: 0.05 GT (line 100) +minStake: 0.3 GT, ticketPrice: 0.05 GT (line 100) ## Additional Requirement diff --git a/api/@aastar/core/variables/ROLE_KMS.md b/api/@aastar/core/variables/ROLE_KMS.md index 1754d298f..9026ebb23 100644 --- a/api/@aastar/core/variables/ROLE_KMS.md +++ b/api/@aastar/core/variables/ROLE_KMS.md @@ -1,6 +1,6 @@ > `const` **ROLE\_KMS**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L95) +Defined in: [packages/core/src/roles.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L95) KMS Role (Key Management Service) @@ -14,7 +14,7 @@ Infrastructure operator (highest stake) ## Requirement -minStake: 100 GT, entryBurn: 10 GT (line 98) +minStake: 100 GT, ticketPrice: 10 GT (line 98) ## Exit Fee diff --git a/api/@aastar/core/variables/ROLE_NAMES.md b/api/@aastar/core/variables/ROLE_NAMES.md index fc450ca03..1f1cd549c 100644 --- a/api/@aastar/core/variables/ROLE_NAMES.md +++ b/api/@aastar/core/variables/ROLE_NAMES.md @@ -1,3 +1,3 @@ > `const` **ROLE\_NAMES**: `Record`\<`string`, `string`\> -Defined in: [packages/core/src/roles.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L128) +Defined in: [packages/core/src/roles.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L128) diff --git a/api/@aastar/core/variables/ROLE_PAYMASTER_AOA.md b/api/@aastar/core/variables/ROLE_PAYMASTER_AOA.md index 96f543c64..fc82f143d 100644 --- a/api/@aastar/core/variables/ROLE_PAYMASTER_AOA.md +++ b/api/@aastar/core/variables/ROLE_PAYMASTER_AOA.md @@ -1,6 +1,6 @@ > `const` **ROLE\_PAYMASTER\_AOA**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L50) +Defined in: [packages/core/src/roles.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L50) Paymaster AOA Role (Account Ownership Authentication) @@ -14,7 +14,7 @@ Infrastructure operator ## Requirement -minStake: 30 GT, entryBurn: 3 GT (line 92) +minStake: 30 GT, ticketPrice: 3 GT (line 92) ## Exit Fee diff --git a/api/@aastar/core/variables/ROLE_PAYMASTER_SUPER.md b/api/@aastar/core/variables/ROLE_PAYMASTER_SUPER.md index d6c9545cc..716c459dc 100644 --- a/api/@aastar/core/variables/ROLE_PAYMASTER_SUPER.md +++ b/api/@aastar/core/variables/ROLE_PAYMASTER_SUPER.md @@ -1,6 +1,6 @@ > `const` **ROLE\_PAYMASTER\_SUPER**: [`Hash`](https://viem.sh/docs/index.html) -Defined in: [packages/core/src/roles.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L62) +Defined in: [packages/core/src/roles.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L62) Paymaster Super Role @@ -14,7 +14,7 @@ Infrastructure operator (higher tier) ## Requirement -minStake: 50 GT, entryBurn: 5 GT (line 93) +minStake: 50 GT, ticketPrice: 5 GT (line 93) ## Additional Requirement diff --git a/api/@aastar/core/variables/ROLE_PERMISSION_LEVELS.md b/api/@aastar/core/variables/ROLE_PERMISSION_LEVELS.md index f6f13bad8..e5b105d53 100644 --- a/api/@aastar/core/variables/ROLE_PERMISSION_LEVELS.md +++ b/api/@aastar/core/variables/ROLE_PERMISSION_LEVELS.md @@ -1,3 +1,3 @@ > `const` **ROLE\_PERMISSION\_LEVELS**: `Record`\<`string`, [`RolePermissionLevel`](../enumerations/RolePermissionLevel.md)\> -Defined in: [packages/core/src/roles.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/roles.ts#L157) +Defined in: [packages/core/src/roles.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L157) diff --git a/api/@aastar/core/variables/RegistryABI.md b/api/@aastar/core/variables/RegistryABI.md index 4d551ebcb..486d076e4 100644 --- a/api/@aastar/core/variables/RegistryABI.md +++ b/api/@aastar/core/variables/RegistryABI.md @@ -1,3 +1,3 @@ > `const` **RegistryABI**: `any` -Defined in: [packages/core/src/abis/index.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L37) +Defined in: [packages/core/src/abis/index.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L59) diff --git a/api/@aastar/core/variables/RegistryArtifact.md b/api/@aastar/core/variables/RegistryArtifact.md index e82fc81f2..06c67d50f 100644 --- a/api/@aastar/core/variables/RegistryArtifact.md +++ b/api/@aastar/core/variables/RegistryArtifact.md @@ -1,13 +1,13 @@ > `const` **RegistryArtifact**: `object` = `RegistryABIData` -Defined in: [packages/core/src/abis/index.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L38) +Defined in: [packages/core/src/abis/index.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L60) ## Type Declaration ### abi -> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] ### bytecode -> **bytecode**: `string` = `"0x60808060405234611917575f9060608161799480380380916100218285611a48565b8339810103126119175761003481611a6b565b5061004d604061004660208401611a6b565b9201611a6b565b903315611a19575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055600280546001600160a01b039283166001600160a01b031991821617909155600380549390921692169190911790556040805191906100db9083611a48565b600d82526c20a7a0902830bcb6b0b9ba32b960991b602083015260405161010181611a2c565b6801a055690d9db800008152602081016729a2241af62c0000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016103e8815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f5160206179345f395f51905f525f52600760205260405f209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b038111611a05578154600181811c911680156119fb575b60208210146119e757601f8111611996575b506020601f821160011461193057819060069697985f92611925575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254168015158061191b575b6118b7575b50604051906102f0604083611a48565b600e82526d29bab832b92830bcb6b0b9ba32b960911b602083015260405161031781611a2c565b6802b5e3af16b1880000815260208101674563918244f40000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016103e8815260e087019060018252610100880194671bc16d674ec80000865261012089019a8b526101408901963388526101608a019862278d008a525f5160206179145f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161128b578154600181811c911680156118ad575b602082101461126d57601f811161185b575b506020601f82116001146117f6578190879860069798926117eb575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254829116801515806117e1575b61177f575b505060405190610509604083611a48565b600b82526a11d95b995c9a58c811159560aa1b602083015260405161052d81611a2c565b6801a055690d9db800008152602081016729a2241af62c0000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016103e8815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f5160206179545f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161128b578154600181811c91168015611775575b602082101461126d57601f8111611723575b506020601f82116001146116be578190879860069798926116b3575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254829116801515806116a9575b611647575b50506040519061071f604083611a48565b6005825264414e4f444560d81b602083015260405161073d81611a2c565b6801158e460913d00000815260208101671bc16d674ec80000815260408201600f8152606083016001815260808401916001835260a08501926005845260c086016103e8815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f5160206179745f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161128b578154600181811c9116801561163d575b602082101461126d57601f81116115eb575b506020601f82116001146115865781908798600697989261157b575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b039283161790559051919092015560025482911680151580611571575b61150f575b50506040519061092f604083611a48565b60038252624b4d5360e81b602083015260405161094b81611a2c565b68056bc75e2d63100000815260208101678ac7230489e8000081526040820160058152606083016005815260808401916002835260a08501926014845260c086016103e8815260e087019060018252610100880194674563918244f40000865261012089019a8b526101408901963388526101608a019862278d008a525f5160206178b45f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161128b578154600181811c91168015611505575b602082101461126d57601f81116114b3575b506020601f821160011461144e57819087986006979892611443575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b039283161790559051919092015560025482911680151580611439575b6113d7575b505060405190610b3d604083611a48565b6009825268436f6d6d756e69747960b81b6020830152604051610b5f81611a2c565b6801a055690d9db800008152602081016729a2241af62c0000815260408201600a8152606083016002815260808401916001835260a0850192600a845260c086016101f4815260e087019060018252610100880194670de0b6b3a7640000865261012089019a8b526101408901963388526101608a019862278d008a525f5160206178f45f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161128b578154600181811c911680156113cd575b602082101461126d57601f811161137b575b506020601f82116001146113165781908798600697989261130b575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b039283161790559051919092015560025482911680151580611301575b61129f575b505060405190610d51604083611a48565b600782526622b7322ab9b2b960c91b6020830152604051610d7181611a2c565b670429d069189e000081526020810166b1a2bc2ec5000081526040820183815260608301848152608084019185835260a085019286845260c086016103e8815260e08701906001825261010088019466b1a2bc2ec50000865261012089019a8b526101408901963388526101608a019862093a808a525f5160206178d45f395f51905f528c52600760205260408c209a518b555160018b015563ffffffff60028b019651166fffffffff0000000000000000000000006bffffffff000000000000000067ffffffff000000008954955160201b16975160401b16925160601b169361ffff60801b905160801b169460ff60901b9051151560901b169560ff60901b199361ffff60801b19926fffffffff000000000000000000000000199160018060601b031916171617161716171717905551600384015560048301945194855160018060401b03811161128b578154600181811c91168015611281575b602082101461126d57601f811161121b575b506020601f82116001146111b6578190879860069798926111ab575b50508160011b915f199060031b1c19161790555b516005840180546001600160a01b0319166001600160a01b0392831617905590519190920155600254829116801515806111a1575b61113a575b5060019052601660205280604081205560028152601660205268056bc75e2d631000006040822055600381526016602052681043561a88293000006040822055600481526016602052682086ac3510526000006040822055600581526016602052683635c9adc5dea000006040822055600681526016602052686c6b935b8bbd40000060408220556018546801000000000000000081101561112657600181018060185581101561111257600d9060188352602083200155601854680100000000000000008110156111265760018101806018558110156111125760229060188352602083200155601854680100000000000000008110156111265760018101806018558110156111125760599060188352602083200155601854680100000000000000008110156111265760018101806018558110156111125760e9906018835260208320015560185490680100000000000000008210156110fe5760018201806018558210156110ea5761026260409260188352602083200155338152601760205220600160ff19825416179055604051615e349081611a808239f35b634e487b7160e01b81526032600452602490fd5b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b82526032600452602482fd5b634e487b7160e01b82526041600452602482fd5b803b1561119e57818091606460405180948193636b26335560e11b83525f5160206178d45f395f51905f5260048401526103e8602484015266b1a2bc2ec5000060448401525af115610f4b578161119091611a48565b61119b57805f610f4b565b80fd5b50fd5b50803b1515610f46565b015190505f80610efd565b82875280872097601f198316885b8181106112035750916006979899918460019594106111eb575b505050811b019055610f11565b01515f1960f88460031b161c191690555f80806111de565b838301518b556001909a0199602093840193016111c4565b81811115610ee15782875260208720601f830160051c9060208410611265575b81601f9101920160051c0390875b828110611257575050610ee1565b808960019284015501611249565b88915061123b565b634e487b7160e01b87526022600452602487fd5b90607f1690610ecf565b634e487b7160e01b86526041600452602486fd5b803b1561119e57818091606460405180948193636b26335560e11b83525f5160206178f45f395f51905f5260048401526101f46024840152670de0b6b3a764000060448401525af115610d4057816112f691611a48565b61119b57805f610d40565b50803b1515610d3b565b015190505f80610cf2565b82875280872097601f198316885b81811061136357509160069798999184600195941061134b575b505050811b019055610d06565b01515f1960f88460031b161c191690555f808061133e565b838301518b556001909a019960209384019301611324565b81811115610cd65782875260208720601f830160051c90602084106113c5575b81601f9101920160051c0390875b8281106113b7575050610cd6565b8089600192840155016113a9565b88915061139b565b90607f1690610cc4565b803b1561119e57818091606460405180948193636b26335560e11b83525f5160206178b45f395f51905f5260048401526103e86024840152674563918244f4000060448401525af115610b2c578161142e91611a48565b61119b57805f610b2c565b50803b1515610b27565b015190505f80610ade565b82875280872097601f198316885b81811061149b575091600697989991846001959410611483575b505050811b019055610af2565b01515f1960f88460031b161c191690555f8080611476565b838301518b556001909a01996020938401930161145c565b81811115610ac25782875260208720601f830160051c90602084106114fd575b81601f9101920160051c0390875b8281106114ef575050610ac2565b8089600192840155016114e1565b8891506114d3565b90607f1690610ab0565b803b1561119e57818091606460405180948193636b26335560e11b83525f5160206179745f395f51905f5260048401526103e86024840152670de0b6b3a764000060448401525af11561091e578161156691611a48565b61119b57805f61091e565b50803b1515610919565b015190505f806108d0565b82875280872097601f198316885b8181106115d35750916006979899918460019594106115bb575b505050811b0190556108e4565b01515f1960f88460031b161c191690555f80806115ae565b838301518b556001909a019960209384019301611594565b818111156108b45782875260208720601f830160051c9060208410611635575b81601f9101920160051c0390875b8281106116275750506108b4565b808960019284015501611619565b88915061160b565b90607f16906108a2565b803b1561119e57818091606460405180948193636b26335560e11b83525f5160206179545f395f51905f5260048401526103e86024840152670de0b6b3a764000060448401525af11561070e578161169e91611a48565b61119b57805f61070e565b50803b1515610709565b015190505f806106c0565b82875280872097601f198316885b81811061170b5750916006979899918460019594106116f3575b505050811b0190556106d4565b01515f1960f88460031b161c191690555f80806116e6565b838301518b556001909a0199602093840193016116cc565b818111156106a45782875260208720601f830160051c906020841061176d575b81601f9101920160051c0390875b82811061175f5750506106a4565b808960019284015501611751565b889150611743565b90607f1690610692565b803b1561119e57818091606460405180948193636b26335560e11b83525f5160206179145f395f51905f5260048401526103e86024840152671bc16d674ec8000060448401525af1156104f857816117d691611a48565b61119b57805f6104f8565b50803b15156104f3565b015190505f806104aa565b82875280872097601f198316885b81811061184357509160069798999184600195941061182b575b505050811b0190556104be565b01515f1960f88460031b161c191690555f808061181e565b838301518b556001909a019960209384019301611804565b8181111561048e5782875260208720601f830160051c90602084106118a5575b81601f9101920160051c0390875b82811061189757505061048e565b808960019284015501611889565b88915061187b565b90607f169061047c565b803b15611917575f8091606460405180948193636b26335560e11b83525f5160206179345f395f51905f5260048401526103e86024840152670de0b6b3a764000060448401525af1156102e05761191091505f90611a48565b5f5f6102e0565b5f80fd5b50803b15156102db565b015190505f80610294565b601f19821697835f52815f20985f5b81811061197e575091600697989991846001959410611966575b505050811b0190556102a8565b01515f1960f88460031b161c191690555f8080611959565b838301518b556001909a01996020938401930161193f565b8181111561027857825f5260205f20601f830160051c90602084106119df575b81601f9101920160051c03905f5b8281106119d2575050610278565b5f828201556001016119c4565b5f91506119b6565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610266565b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b61018081019081106001600160401b03821117611a0557604052565b601f909101601f19168101906001600160401b03821190821017611a0557604052565b51906001600160a01b03821682036119175756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306a36aee146149bd5750806307cf0ee9146149045780630ab0c75e146141a05780630dbb49291461415857806310fdfea71461411d57806311c85b0b146140e557806315de32ca1461409057806317e1c595146139bc57806319c46e81146139955780631a08a8191461395a5780631b02e44f146133015780631c5bf6bb146132185780631cae0412146131c85780632822ffce146131905780632c333e25146130e257806336db9caf1461309c5780633b60288a1461306d578063410087ad1461300d57806343e6a16014612fd25780634b8b8a6e14612fa857806354fd4d5014612f4757806359dc912614612efa5780635c44541214612ec05780635ee05b1714612b875780636229738c14612b07578063669d77621461230a578063682bb1c9146120cf578063715018a614612069578063727b52a5146117a457806377c0d7e71461175e5780637f52815514611714578063826600ce146116ed57806385513971146116245780638da5cb5b146115fe5780638ff3909914611588578063919d1e2c1461156157806391d1485414611516578063920983fb146114dc578063995d74ef146114665780639b1465a31461142b578063a2d0020e146113f0578063a3246ad314611337578063a3b2298814610e87578063a9d5652314610e1a578063aa9e8cf714610de7578063af5eda0214610dbd578063b5e936ab14610bd9578063bc95910114610b63578063be30742f14610b3c578063bf0cb04214610b01578063bf28c98a14610ac4578063c8ee23ef14610a7e578063cb31e2f114610952578063cd5d1e74146108dc578063ce830e7b1461060a578063d12b93ff146105e3578063e350d77b146105b9578063e74c7bd714610581578063e79e97391461050b578063e7b89138146104ab578063e9ebf83114610470578063f2fde38b146103c55763f538e1dc146102d3575f80fd5b346103c25760206003193601126103c2576040906004358152600760205220805460018201549160028101546103b16003830154604051906103238261031c8160048901614be3565b0383614cce565b60ff60066001600160a01b03600588015416960154946040519889988952602089015263ffffffff8116604089015263ffffffff8160201c16606089015263ffffffff8160401c16608089015263ffffffff8160601c1660a089015261ffff8160801c1660c089015260901c16151560e0870152610100860152610180610120860152610180850190614cf1565b916101408401526101608301520390f35b80fd5b50346103c25760206003193601126103c2576001600160a01b036103e7614a6e565b6103ef615371565b168015610444576001600160a01b0382548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b50346103c257806003193601126103c25760206040517f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d8152f35b50346103c25760206003193601126103c2576004359067ffffffffffffffff82116103c25760206001600160a01b0381806104e93660048801614d32565b604051928184925191829101835e8101600f8152030190205416604051908152f35b50346103c25760206003193601126103c257610525614a6e565b61052d615371565b6001600160a01b03806004549216918273ffffffffffffffffffffffffffffffffffffffff19821617600455167f1f7cd67c986d0cce4aa6f69075b5278a05438ef2a5d1abf6eeded51ba81232458380a380f35b50346103c25760206003193601126103c25760406020916001600160a01b036105a8614a6e565b168152601583522054604051908152f35b50346103c25760206003193601126103c25760406020916004358152601b83522054604051908152f35b50346103c257806003193601126103c25760206001600160a01b0360065416604051908152f35b50346103c25760806003193601126103c257610624614a6e565b60243567ffffffffffffffff81116108d857610644903690600401614b7a565b9160443567ffffffffffffffff81116108d457610665903690600401614b7a565b93909260643567ffffffffffffffff811161076c57610688903690600401614ac4565b9190956106936153b0565b338852601760205260ff6040892054161561088f576106b3818514614ec9565b6001600160a01b036004541692831561084b5781838a9987936001600160a01b0360065416918b8b84151580610842575b610770575b5050505050505050823b1561076c5786946107358692604051988997889687957f5f4cd4fe0000000000000000000000000000000000000000000000000000000087526004870161530c565b03925af180156107615761074c575b506001805580f35b8161075691614cce565b6103c257805f610744565b6040513d84823e3d90fd5b8680fd5b61078c60209761079a936107d09a604051998a958c870161530c565b03601f198101865285614cce565b604051958694859384937fb8e72af600000000000000000000000000000000000000000000000000000000855260048501614f75565b03915afa80156108375788906107f8575b6107eb9150614f9b565b8381835f80808b8b6106e9565b506020813d60201161082f575b8161081260209383614cce565b8101031261082b576108266107eb91614e7a565b6107e1565b8780fd5b3d9150610805565b6040513d8a823e3d90fd5b508315156106e4565b606460405162461bcd60e51b815260206004820152601660248201527f53757065725061796d6173746572206e6f7420736574000000000000000000006044820152fd5b60405162461bcd60e51b815260206004820152601e60248201527f556e617574686f72697a65642052657075746174696f6e20536f7572636500006044820152606490fd5b8480fd5b8280fd5b50346103c25760206003193601126103c2576108f6614a6e565b6108fe615371565b6001600160a01b03806003549216918273ffffffffffffffffffffffffffffffffffffffff19821617600355167f171f7dbde35aed7cddf3ece2dad8f4eb62443a3d6bf8616586da6fd03c6b4ed98380a380f35b50346103c25761096136614aae565b9061096a615371565b60185480821015610a3a57816109fc575b5f1981019081116109e85781106109b4575b6109996109af91614af2565b81939154905f199060031b92831b921b19161790565b905580f35b600181018082116109e8576109af916109e06109d261099993614af2565b90549060031b1c85106152c1565b91505061098d565b602484634e487b7160e01b81526011600452fd5b5f198201828111610a2657610a13610a2191614af2565b90549060031b1c84116152c1565b61097b565b602485634e487b7160e01b81526011600452fd5b606460405162461bcd60e51b815260206004820152601360248201527f496e646578206f7574206f6620626f756e6473000000000000000000000000006044820152fd5b50346103c25760406003193601126103c2576001600160a01b036040610aa2614a84565b92600435815260096020522091165f52602052602060405f2054604051908152f35b50346103c25760206003193601126103c25760ff60406020926001600160a01b03610aed614a6e565b168152601784522054166040519015158152f35b50346103c257806003193601126103c25760206040517ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e8152f35b50346103c257806003193601126103c25760206001600160a01b0360055416604051908152f35b50346103c25760206003193601126103c257610b7d614a6e565b610b85615371565b6001600160a01b03806005549216918273ffffffffffffffffffffffffffffffffffffffff19821617600555167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b50346103c25760206003193601126103c25780604051610bf881614c65565b8181528160208201528160408201528160608201528160808201528160a08201528160c08201528160e0820152816101008201526101208101606090528161014082015261016001526004358152600760205260409020604051610c5b81614c65565b81548152600182015491602082019283526002810154604083019063ffffffff8116825260608401908060201c63ffffffff16825260808501908060401c63ffffffff16825260a086018160601c63ffffffff16815260c08701908260801c61ffff16825260e088019260901c60ff1615158352600387015493610100890194855260405195868060048b0190610cf191614be3565b03610cfc9088614cce565b6101208a0196875260058901546001600160a01b0316986101408b01998a5260060154976101608b019889526040519b8c9b60208d525160208d01525160408c01525163ffffffff1660608b01525163ffffffff1660808a01525163ffffffff1660a08901525163ffffffff1660c08801525161ffff1660e08701525115156101008601525161012085015251610140840161018090526101a08401610da191614cf1565b91516001600160a01b0316610160840152516101808301520390f35b50346103c25760206003193601126103c25760406020916004358152601683522054604051908152f35b50346103c25760206003193601126103c2576001600160a01b0360406020926004358152601a8452205416604051908152f35b50346103c25760406003193601126103c257610e34614a84565b610e3c615371565b610e506001600160a01b0382161515615276565b6004358252601a6020526001600160a01b0360408320911673ffffffffffffffffffffffffffffffffffffffff1982541617905580f35b50346103c25760606003193601126103c2576024359060043567ffffffffffffffff831161133357826004018336039361018060031986011261125f57604435906001600160a01b0382168092036108d457610ee1615371565b838552601a6020526001600160a01b036040862054166112ef57610f06821515615276565b838552600760205260408520918335835560248201356001840155600283019263ffffffff610f37604485016150a3565b1684549067ffffffff00000000610f50606487016150a3565b60201b167fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff6bffffffff0000000000000000610f8e608489016150a3565b60401b16927fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006fffffffff000000000000000000000000610fd160a48b016150a3565b60601b1695161716171717845560c4830193611032610fef86615049565b82547fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff1660809190911b71ffff0000000000000000000000000000000016178255565b60e48401358015158091036112eb577fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff72ff00000000000000000000000000000000000083549260901b1691161790556101048301359283600383015560048201987fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd61012483013591018112156112eb5781019860048a013567ffffffffffffffff81116112e75780360360248c01136112e7576110fb816110f58454614bab565b84614deb565b89601f821160011461127157916111338260069593610164958e9f8f9d9e9f92611263575b50505f198260011b9260031b1c19161790565b90555b611143610144820161501c565b6001600160a01b0360058601911673ffffffffffffffffffffffffffffffffffffffff198254161790550135910155858452601a602052604084209073ffffffffffffffffffffffffffffffffffffffff198254161790556111b06001600160a01b036002541692615049565b90823b1561125f576040517fd64c66aa0000000000000000000000000000000000000000000000000000000081526004810187905261ffff92909216602483015260448201529082908290606490829084905af180156107615761124a575b50506112447f287e005099116032e1bba9482a5b0df09cc99f7e82a4482fa2810c52158d473d916040519182914290836150c5565b0390a280f35b8161125491614cce565b6108d857825f61120f565b8380fd5b016024013590505f80611120565b828b5260208b2090601f1983168c5b8181106112cc57509261016494928d9e6001939d9e9c9d8360069997106112af575b505050811b019055611136565b6024910101355f19600384901b60f8161c191690555f80806112a2565b60248f84010135845560019093019260209283019201611280565b8980fd5b8880fd5b606460405162461bcd60e51b815260206004820152601360248201527f526f6c6520616c726561647920657869737473000000000000000000000000006044820152fd5b5080fd5b50346103c25760206003193601126103c2576004358152600a60205260408120604051908160208254918281520190819285526020852090855b8181106113d15750505082611387910383614cce565b604051928392602084019060208552518091526040840192915b8181106113af575050500390f35b82516001600160a01b03168452859450602093840193909201916001016113a1565b82546001600160a01b0316845260209093019260019283019201611371565b50346103c257806003193601126103c25760206040517fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0748152f35b50346103c257806003193601126103c25760206040517f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f88152f35b50346103c25760206003193601126103c257611480614a6e565b611488615371565b6001600160a01b03806006549216918273ffffffffffffffffffffffffffffffffffffffff19821617600655167f9e5ee21152afb219d78a3588775fe954c5094514af1627c6d4b203175091d3048380a380f35b50346103c25760206003193601126103c2576001600160a01b03604060209282611504614a6e565b16815260108452205416604051908152f35b50346103c25760406003193601126103c2576001600160a01b03604061153a614a84565b92600435815260086020522091165f52602052602060ff60405f2054166040519015158152f35b50346103c257806003193601126103c25760206001600160a01b0360045416604051908152f35b50346103c25760206003193601126103c2576115a2614a6e565b6115aa615371565b6001600160a01b03806002549216918273ffffffffffffffffffffffffffffffffffffffff19821617600255167f7042586b23181180eb30b4798702d7a0233b7fc2551e89806770e8e5d9392e6a8380a380f35b50346103c257806003193601126103c2576001600160a01b036020915416604051908152f35b50346103c25761163336614aae565b818352601a6020526001600160a01b03604084205416331415806116d9575b6116945760207f13fa7976d19366a82359594f556abe5fe2d49e404db9fc466282cdb6471c629a9183855260078252806006604087200155604051908152a280f35b60405162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a656400000000000000000000000000000000000000006044820152606490fd5b506001600160a01b03835416331415611652565b50346103c257806003193601126103c25760206001600160a01b0360025416604051908152f35b50346103c25761172336614aae565b91908152600a602052604081209081548310156103c25760206001600160a01b0361174e8585614b1e565b90549060031b1c16604051908152f35b50346103c25760406003193601126103c2576001600160a01b036040611782614a84565b926004358152600b6020522091165f52602052602060405f2054604051908152f35b50346103c25760206003193601126103c2576004356117c16153b0565b8082526008602052604082206001600160a01b0333165f5260205260ff60405f2054161561203a578082526007602052600660408320015480611ee3575b508082526009602052604082206001600160a01b0333165f5260205260405f2054907f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a81145f14611c1d57826001600160a01b0360035416803b15611333578180916024604051809481937f5afc4b5c0000000000000000000000000000000000000000000000000000000083523360048401525af1801561076157611c08575b50505b8060405183815260406020820152600460408201527f457869740000000000000000000000000000000000000000000000000000000060608201527fe80f99d9789e367c229c526d3d3f84d44d3daf77ea65f7bbe8510f176ac45a2360803392a38083526008602052604083206001600160a01b0333165f5260205260405f2060ff198154169055611935338261593e565b33835260136020526040832054611beb575b33835260126020526040832091825492845b848110611b48575b50509091503383526013602052604083205415611a5f575b6002546040517f374e4d730000000000000000000000000000000000000000000000000000000081523360048201526024810184905291906020908390604490829088906001600160a01b03165af1908115611a54578491611a1a575b6119e09250615030565b906040519182524260208301527f0d9361411a652b66cd4aed24a96d36c0b048899896c927d879a9d3ba2790d9c660403393a36001805580f35b90506020823d602011611a4c575b81611a3560209383614cce565b81010312611a48576119e09151906119d6565b5f80fd5b3d9150611a28565b6040513d86823e3d90fd5b826001600160a01b036004541680611ae4575b506001600160a01b0360035416803b15611333578180916024604051809481937f374e7fa30000000000000000000000000000000000000000000000000000000083523360048401525af1801561076157611acf575b5050611979565b81611ad991614cce565b6108d857825f611ac8565b803b15611333578180916044604051809481937fa3970ae60000000000000000000000000000000000000000000000000000000083523360048401528160248401525af180156107615715611a725781611b3d91614cce565b6108d857825f611a72565b83611b538284614b1e565b90549060031b1c14611b6757600101611959565b909192935f198101908111611bd757610999611b86611b949285614b1e565b90549060031b1c9284614b1e565b905580548015611bc3575f190190611bac8282614b1e565b5f1982549160031b1b191690555581905f80611961565b602485634e487b7160e01b81526031600452fd5b602486634e487b7160e01b81526011600452fd5b338352601360205260408320611c01815461503d565b9055611947565b81611c1291614cce565b6108d857825f6118a0565b7fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07481036118a357808352600d602052604083206001600160a01b0333165f52602052611c75611c7c60405f2060405192838092614be3565b0382614cce565b805180611cfe575b5050826001600160a01b0360035416803b15611333578180916044604051809481937fd977b66b0000000000000000000000000000000000000000000000000000000083523360048401523360248401525af1801561076157611ce9575b50506118a3565b81611cf391614cce565b6108d857825f611ce2565b8101906020820190602081840312611edf57602081015167ffffffffffffffff811161076c57019160c090839003126108d45760405190611d3e82614c96565b602083015167ffffffffffffffff811161076c57816020611d619286010161525c565b8252604083015167ffffffffffffffff811161076c57816020611d869286010161525c565b9260208301938452606081015167ffffffffffffffff811161082b57826020611db19284010161525c565b6040840152608081015167ffffffffffffffff811161082b57826020611dd99284010161525c565b606084015260a081015167ffffffffffffffff811161082b5760c0926020611e039284010161525c565b6080840152015160a0820152336001600160a01b03611e228351614d76565b541614611eb4575b5080518051908115159182611e85575b5050611e47575b80611c84565b6020809151604051928184925191829101835e8101600f81520301902073ffffffffffffffffffffffffffffffffffffffff1981541690555f611e41565b6001600160a01b039192508060206040519401845e820191600f83526020813394030190205416145f80611e3a565b611ebe9051614d76565b73ffffffffffffffffffffffffffffffffffffffff1981541690555f611e2a565b8580fd5b6002546040517f30b039ee00000000000000000000000000000000000000000000000000000000815233600482015260248101849052908490829060449082906001600160a01b03165afa8015611a54578490611fb3575b65ffffffffffff915016908101809111611f9f574210611f5b575f6117ff565b606460405162461bcd60e51b815260206004820152601560248201527f4c6f636b206475726174696f6e206e6f74206d657400000000000000000000006044820152fd5b602483634e487b7160e01b81526011600452fd5b503d8085833e611fc38183614cce565b81019060a0818303126108d457611fd981615209565b50611fe660208201615209565b5060408101519065ffffffffffff82168203611edf5760808101519067ffffffffffffffff821161076c570182601f82011215611edf5765ffffffffffff9281602061203493519101615226565b50611f3b565b7fe9007bcc00000000000000000000000000000000000000000000000000000000825260045233602452604490fd5b50346103c257806003193601126103c257612082615371565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346103c25760a06003193601126103c2576004356064356084356120f2615371565b6121006107d0831115615058565b82845260076020526040842060243581556001810190604435825561ffff84116122c6576002810180547fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16608086901b71ffff000000000000000000000000000000001617815592869060038301958187556001600160a01b036002541690813b1561125f5760648985809460405196879586947fd64c66aa0000000000000000000000000000000000000000000000000000000086526004860152602485015260448401525af18015610761576122b1575b50507f287e005099116032e1bba9482a5b0df09cc99f7e82a4482fa2810c52158d473d9360ff60405194859460408652845460408701525460608601525463ffffffff8116608086015263ffffffff8160201c1660a086015263ffffffff8160401c1660c086015263ffffffff8160601c1660e086015261ffff8160801c1661010086015260901c1615156101208401525461014083015261018061016083015260066122886101c0840160048401614be3565b916001600160a01b0360058201541661018085015201546101a08301524260208301520390a280f35b816122bb91614cce565b611edf57855f6121d4565b606460405162461bcd60e51b815260206004820152601460248201527f56616c756520657863656564732075696e7431360000000000000000000000006044820152fd5b50346103c25761231936614b33565b61232694939192946153b0565b6001600160a01b038516928315612aa9576108008211612a4b57828552600760205260408520916040519161235a83614c65565b8354835260018401549360208401948552600660028201549163ffffffff8316604087015263ffffffff8360201c16606087015263ffffffff8360401c16608087015263ffffffff8360601c1660a087015261ffff8360801c1660c087015260ff60e087019360901c161515835260038101546101008701526040516123e781611c758160048601614be3565b6101208701526001600160a01b036005820154166101408701520154610160850152511580612a1a5750848752600860205260408720865f5260205260ff60405f205416928380946129f0575b6129c0577f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f86148015612997575b612909575b6124728383886153e9565b90518082106128d957508361281d57858852600860205260408820875f5260205260405f20600160ff19825416179055858852600960205260408820875f526020528060405f2055858852600a6020526124cf8960408a20614da2565b858852600a6020526040882054868952600b60205260408920885f5260205260405f20558688526013602052604088206125098154614e58565b905586885260126020526040882080549068010000000000000000821015612809579187612543610999848e966001602097018155614b1e565b905560025487516040517fbefa570e0000000000000000000000000000000000000000000000000000000081526001600160a01b0395861660048201819052602482018c90526044820194909452606481019190915260848101929092529092839160a49183918d91165af18015610837576127da575b505b848752600d60205260408720865f5260205260405f209767ffffffffffffffff83116127c6576125f6836125f08b54614bab565b8b614deb565b8798601f841160011461275f5761262a84808b9c61267e98999a9b9c91612754575b505f198260011b9260031b1c19161790565b90555b604061263b8484848b6156e5565b6001600160a01b0360035416898c84518099819582947f3e3e68420000000000000000000000000000000000000000000000000000000084528960048501614ea4565b03925af18015612749576126b1948a91612719575b50878a52600c60205260408a20895f5260205260405f20558661578e565b156126ef57507f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d6040845b8151908152426020820152a36001805580f35b60407f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d91516126dc565b61273b915060403d604011612742575b6127338183614cce565b810190614e87565b505f612693565b503d612729565b6040513d8b823e3d90fd5b90508501355f612618565b80895260208920601f1985169a8a5b8c81106127ae57508561267e9798999a9b9c10612795575b5050600184811b01905561262d565b5f1960f88760031b161c19908501351690555f80612786565b9091602060018192858901358155019301910161276e565b602488634e487b7160e01b81526041600452fd5b6127fb9060203d602011612802575b6127f38183614cce565b810190614e49565b505f6125ba565b503d6127e9565b60248a634e487b7160e01b81526041600452fd5b6001600160a01b0360025416868952600960205260408920885f5260205261284960405f205483615030565b813b156112e757899060848a8360405195869485937f4bcb80a200000000000000000000000000000000000000000000000000000000855260048501528d602485015260448401528d60648401525af18015612749579089916128c4575b50869052600960205260408820875f5260205260405f20556125bc565b816128ce91614cce565b61082b57875f6128a7565b88906044927f45be0a26000000000000000000000000000000000000000000000000000000008352600452602452fd5b7fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0748852600860205260408820875f5260205260ff60405f20541661246757604488887fe9007bcc0000000000000000000000000000000000000000000000000000000082527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c074600452602452fd5b507ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e8614612462565b60448888887f6dd4f06c000000000000000000000000000000000000000000000000000000008352600452602452fd5b507f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a861415612434565b87604491877f2b30318e00000000000000000000000000000000000000000000000000000000835260045215602452fd5b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4461746120746f6f206c617267650000000000000000000000000000000000006044820152fd5b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f55736572207265717569726564000000000000000000000000000000000000006044820152fd5b50346103c25760406003193601126103c257612b21614a6e565b602435908115158092036108d85760206001600160a01b037f6be30291a8f228c9342613e5e66df1a1b85aa570ac1bca9219f3ac7b7f73bbf392612b63615371565b1692838552601782526040852060ff1981541660ff8316179055604051908152a280f35b50346103c25760406003193601126103c2576024359060043567ffffffffffffffff831161133357826004018336039361018060031986011261125f57828452601a6020526001600160a01b0360408520541633141580612eac575b6116945760c4810190612c066107d061ffff612bfe85615049565b161115615058565b83855260076020526040852083358155602482013560018201556002810163ffffffff612c35604485016150a3565b1681549067ffffffff00000000612c4e606487016150a3565b60201b167fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff6bffffffff0000000000000000612c8c608489016150a3565b60401b16927fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006fffffffff000000000000000000000000612ccf60a48b016150a3565b60601b16951617161717178155612ce8610fef85615049565b60e483013580151580910361082b577fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff72ff00000000000000000000000000000000000083549260901b1691161790556101048201359182600383015560048201977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd610124830135910181121561082b57810197600489013567ffffffffffffffff81116112eb5780360360248b01136112eb57612dab816110f58454614bab565b88601f8211600114612e365791612de28260069593610164958d9e8e9c9d9e926112635750505f198260011b9260031b1c19161790565b90555b612df2610144820161501c565b6001600160a01b0360058601911673ffffffffffffffffffffffffffffffffffffffff1982541617905501359101556111b06001600160a01b036002541692615049565b828a5260208a2090601f1983168b5b818110612e9157509261016494928c9d600193839d9e9c9d6006999710612e74575b505050811b019055612de5565b6024910101355f19600384901b60f8161c191690555f8080612e67565b60248e84010135845560019093019260209283019201612e45565b506001600160a01b03845416331415612be3565b50346103c25760206003193601126103c257600435906018548210156103c2576020612eeb83614af2565b90549060031b1c604051908152f35b50346103c25760206003193601126103c257611c75612f2f6040612f4393600435815260196020522060405192838092614be3565b604051918291602083526020830190614cf1565b0390f35b50346103c257806003193601126103c25750612f43604051612f6a604082614cce565b600e81527f52656769737472792d332e302e320000000000000000000000000000000000006020820152604051918291602083526020830190614cf1565b50346103c25760206003193601126103c25760406020916004358152600a83522054604051908152f35b50346103c257806003193601126103c25760206040517f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a8152f35b50346103c25760206003193601126103c2576004359067ffffffffffffffff82116103c25760206001600160a01b03818061304b3660048801614d32565b604051928184925191829101835e8101600e8152030190205416604051908152f35b50346103c25760206003193601126103c25760ff60406020926004358152601184522054166040519015158152f35b50346103c25760406003193601126103c2576001600160a01b0360406130c0614a84565b926004358152600c6020522091165f52602052602060405f2054604051908152f35b50346103c25760206003193601126103c2576001600160a01b03613104614a6e565b16815260146020526040812054600190601854805b613134575b6020604085858152601683522054604051908152f35b5f198101818111610a265761314890614af2565b90549060031b1c8210156131655761315f9061503d565b80613119565b809250600191500180911161317c5781604061311e565b602482634e487b7160e01b81526011600452fd5b50346103c25760206003193601126103c25760406020916001600160a01b036131b7614a6e565b168152601383522054604051908152f35b50346103c25760406003193601126103c2576001600160a01b0360406131ec614a84565b926004358152600d6020522091165f52602052612f43611c75612f2f60405f2060405192838092614be3565b50346103c25760206003193601126103c257600435613235615371565b60185480613276575b68010000000000000000811015613262576109998160016109af9301601855614af2565b602483634e487b7160e01b81526041600452fd5b5f1981018181116109e85761328a90614af2565b90549060031b1c821161323e57608460405162461bcd60e51b815260206004820152602260248201527f5468726573686f6c64206d75737420626520686967686572207468616e206c6160448201527f73740000000000000000000000000000000000000000000000000000000000006064820152fd5b50346103c25760a06003193601126103c25760043560243567ffffffffffffffff81116108d857613336903690600401614b7a565b9160443567ffffffffffffffff81116108d457613357903690600401614b7a565b9190936064359160843567ffffffffffffffff811161082b5761337e903690600401614ac4565b6133899291926153b0565b338952601760205260ff60408a2054161561088f576133a9868514614ec9565b8015613916578083016080848203126112e757833567ffffffffffffffff811161376857816133d9918601614d32565b50602084013567ffffffffffffffff811161376857816133fa918601614d32565b5060408401359067ffffffffffffffff82116137685761341b918501614d32565b50886060840135805b6138e357506003906001600160a01b036005541680613868575b5010613824576006546001600160a01b0316156137e0578161376c575b604051926020840192835289604085015289606085015260e060808501526134886101008501868a614f14565b92601f198585030160a08601528784527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff881161376857846134f2602061354f978d82988d60051b8092858301378c60c08401524660e0840152010301601f198101835282614cce565b51902091604051928484015283835261350c604084614cce565b6001600160a01b036006541691604051958694859384937fb8e72af600000000000000000000000000000000000000000000000000000000855260048501614f75565b03915afa801561375d578790613722575b61356a9150614f9b565b855b81811061357b57866001805580f35b6001600160a01b0361359661359183858961500c565b61501c565b168088526015602052604088205484111561371857808852601460205260408820546135c383878a61500c565b35908082111561367f5760646135d98284615030565b11613638575b50907fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e85426040600194935b838c52601460205280828d2055838c52601560205287828d20558151908152876020820152a201935b9361356c565b90506064810180911161366b577fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e85426135df565b602489634e487b7160e01b81526011600452fd5b8181116136b5575b50907fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e8542604060019493613609565b60646136c18383615030565b1115613687577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c81019150811161366b577fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e8542613687565b5060010193613632565b506020813d602011613755575b8161373c60209383614cce565b8101031261076c5761375061356a91614e7a565b613560565b3d915061372f565b6040513d89823e3d90fd5b8a80fd5b818952601160205260ff60408a20541661379c57818952601160205260408920600160ff1982541617905561345b565b606460405162461bcd60e51b815260206004820152601960248201527f50726f706f73616c20616c7265616479206578656375746564000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601c60248201527f424c532056616c696461746f72206e6f7420636f6e66696775726564000000006044820152fd5b606460405162461bcd60e51b815260206004820152602060248201527f496e73756666696369656e7420636f6e73656e737573207468726573686f6c646044820152fd5b6020600491604051928380927f42cde4e80000000000000000000000000000000000000000000000000000000082525afa8c91816138af575b501561343e5791505f61343e565b9091506020813d6020116138db575b816138cb60209383614cce565b81010312611a485751905f6138a1565b3d91506138be565b5f1981019080821161390257169081906138fc90614e58565b91613424565b60248c634e487b7160e01b81526011600452fd5b606460405162461bcd60e51b815260206004820152601260248201527f424c532050726f6f6620726571756972656400000000000000000000000000006044820152fd5b50346103c257806003193601126103c25760206040517f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a8152f35b50346103c257806003193601126103c25760206001600160a01b0360035416604051908152f35b50346103c2576139cb36614b33565b6139d7949391946153b0565b81845260076020526040842090604051956139f187614c65565b8254875260018301549260208801938452600660028201549163ffffffff831660408b015263ffffffff8360201c1660608b015263ffffffff8360401c1660808b015263ffffffff8360601c1660a08b015261ffff8360801c1660c08b015260ff60e08b019360901c161515835260038101546101008b0152604051613a7e81611c758160048601614be3565b6101208b01526001600160a01b036005820154166101408b0152015461016089015251158061405f57508386526008602052604086206001600160a01b0386165f5260205260ff60405f205416614026577fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07486526008602052604086206001600160a01b0333165f5260205260ff60405f20541615613fe2577f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f84148015613fb9575b613f19575b613b518282866153e9565b9651808810613ee957508386526008602052604086206001600160a01b0386165f5260205260405f20600160ff198254161790558386526009602052604086206001600160a01b0386165f526020528660405f2055838652600a602052613bbb8560408820614da2565b838652600a6020526040862054848752600b602052604087206001600160a01b0387165f5260205260405f2055838652600d602052604086206001600160a01b0386165f5260205260405f2067ffffffffffffffff8311613ed557613c2a83613c248354614bab565b83614deb565b86601f8411600114613e6e5787988792613c5a86806020958d91613e6357505f198260011b9260031b1c19161790565b90555b60025486516040517fbefa570e0000000000000000000000000000000000000000000000000000000081526001600160a01b039586166004820152602481018a9052604481019390935260648301523360848301529092839160a49183918c91165af1801561375d57613e30575b506001600160a01b03851694858752601360205260408720613ced8154614e58565b90553386867f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8a80a46040613d6a613d278585858a6156e5565b6001600160a01b03600354169083519a8b809481937fc580163e0000000000000000000000000000000000000000000000000000000083528c8960048501614ea4565b03925af196871561083757976020988198613ddd575b50927f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d9492613dc59260408689829852600c8d5220895f528b5289865f20558761578e565b5181519081524287820152a360018055604051908152f35b60409491985092613dc59285613e217f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d9896823d8411612742576127338183614cce565b509a9396505092509294613d80565b95506020863d602011613e5b575b81613e4b60209383614cce565b81010312611a4857869551613ccb565b3d9150613e3e565b90508701355f612618565b8188526020882090601f198516895b818110613ebd5750926020928a9b92878b9610613ea4575b5050600186811b019055613c5d565b5f1960f88960031b161c19908701351690555f80613e95565b91926020600181928689013581550194019201613e7d565b602487634e487b7160e01b81526041600452fd5b86604491897f45be0a26000000000000000000000000000000000000000000000000000000008352600452602452fd5b7fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07486526008602052604086206001600160a01b0386165f5260205260ff60405f205416613b46576044866001600160a01b03877fe9007bcc0000000000000000000000000000000000000000000000000000000083527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460045216602452fd5b507ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e8414613b41565b606460405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206d75737420626520436f6d6d756e69747900000000000000006044820152fd5b6044866001600160a01b0387877f6dd4f06c00000000000000000000000000000000000000000000000000000000845260045216602452fd5b86604491867f2b30318e00000000000000000000000000000000000000000000000000000000835260045215602452fd5b50346103c2577f7e684e0b76ed13bc9cf7e4fbac7d11873036be9c9a83f9958382721eeda4601060406140c236614aae565b6140ca615371565b8185526016602052808386205582519182526020820152a180f35b50346103c25760206003193601126103c25760406020916001600160a01b0361410c614a6e565b168152601483522054604051908152f35b50346103c257806003193601126103c25760206040517f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f8152f35b50346103c25760406003193601126103c257614172614a6e565b6001600160a01b03168152601260205260408120805460243592908310156103c2576020612eeb8484614b1e565b5034611a48576040600319360112611a48576004359060243567ffffffffffffffff8111611a48576141d6903690600401614ac4565b92906141e06153b0565b3315612aa9576108008411612a4b57815f52600760205260405f20906040519061420982614c65565b8254825260018301549260208301938452600660028201549163ffffffff8316604086015263ffffffff8360201c16606086015263ffffffff8360401c16608086015263ffffffff8360601c1660a086015261ffff8360801c1660c086015260ff60e086019360901c1615158352600381015461010086015260405161429681611c758160048601614be3565b6101208601526001600160a01b0360058201541661014086015201546101608401525115806148d45750835f52600860205260405f206001600160a01b0333165f5260205260ff60405f205416918280936148aa575b61487a577f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f85148015614851575b6147cc575b61432a8783876153e9565b905180821061479d5750826146c6578486526008602052604086206001600160a01b0333165f5260205260405f20600160ff198254161790558486526009602052604086206001600160a01b0333165f526020528060405f2055848652600a6020526143993360408820614da2565b848652600a6020526040862054858752600b602052604087206001600160a01b0333165f5260205260405f20553386526013602052604086206143dc8154614e58565b9055338652601260205260408620805490680100000000000000008210156127c65761448592876144196109998583956001602098018155614b1e565b905560025487516040517fbefa570e000000000000000000000000000000000000000000000000000000008152336004820181905260248201959095526044810193909352606483015260848201929092529283916001600160a01b03169082908a90829060a4820190565b03925af1801561461c576146a7575b505b838552600d602052604085206001600160a01b0333165f5260205260405f2067ffffffffffffffff8711614693576144d287613c248354614bab565b8587601f811160011461463257806144fc92899161462757505f198260011b9260031b1c19161790565b90555b8460406145546145118985338a6156e5565b6001600160a01b03600354169083519485809481937f3e3e68420000000000000000000000000000000000000000000000000000000083528c3360048501614ea4565b03925af190811561461c5791604097916145959388916145fe575b50868852600c6020528888206001600160a01b0333165f52602052885f2055338661578e565b156145f85750815b8351908152426020820152817f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d853393a3600180558152600c602052206001600160a01b0333165f52602052602060405f2054604051908152f35b5161459d565b6146159150893d8b11612742576127338183614cce565b505f61456f565b6040513d88823e3d90fd5b90508401355f612618565b601f191690828852886020892092895b81811061467857501061465f575b5050600187811b0190556144ff565b5f1960f88a60031b161c19908401351690555f80614650565b8684013585556001909401936020938401938c935001614642565b602486634e487b7160e01b81526041600452fd5b6146bf9060203d602011612802576127f38183614cce565b505f614494565b6001600160a01b0360025416855f52600960205260405f206001600160a01b0333165f526020526146fb60405f205483615030565b813b15611a48575f916084839260405194859384927f4bcb80a20000000000000000000000000000000000000000000000000000000084523360048501528c602485015260448401523360648401525af180156147925761477d575b508486526009602052604086206001600160a01b0333165f5260205260405f2055614496565b61478a9196505f90614cce565b5f945f614757565b6040513d5f823e3d90fd5b907f45be0a26000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b335f9081527f2e2141118778e59f80a0cf148a1d7116c470229e7ee2d444743e9072b52a0c8d602052604090205460ff1661431f577fe9007bcc000000000000000000000000000000000000000000000000000000005f527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0746004523360245260445ffd5b507ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e851461431a565b847f6dd4f06c000000000000000000000000000000000000000000000000000000005f526004523360245260445ffd5b507f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a8514156142ec565b847f2b30318e000000000000000000000000000000000000000000000000000000005f526004521560245260445ffd5b34611a485761496e604061491736614aae565b506001600160a01b0360025416825180809581947fb4d81fb30000000000000000000000000000000000000000000000000000000083523360048401602090939291936001600160a01b0360408201951681520152565b03915afa8015614792575f9061498a575b602090604051908152f35b506040813d6040116149b5575b816149a460409383614cce565b81010312611a48576020905161497f565b3d9150614997565b34611a48576020600319360112611a48576001600160a01b036149de614a6e565b165f52601260205260405f20908154808252602082019081935f5260205f20905f5b818110614a585750505081614a16910382614cce565b604051918291602083019060208452518091526040830191905f5b818110614a3f575050500390f35b8251845285945060209384019390920191600101614a31565b8254845260209093019260019283019201614a00565b600435906001600160a01b0382168203611a4857565b602435906001600160a01b0382168203611a4857565b35906001600160a01b0382168203611a4857565b6003196040910112611a48576004359060243590565b9181601f84011215611a485782359167ffffffffffffffff8311611a485760208381860195010111611a4857565b601854811015614b0a5760185f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b8054821015614b0a575f5260205f2001905f90565b6060600319820112611a4857600435916024356001600160a01b0381168103611a4857916044359067ffffffffffffffff8211611a4857614b7691600401614ac4565b9091565b9181601f84011215611a485782359167ffffffffffffffff8311611a48576020808501948460051b010111611a4857565b90600182811c92168015614bd9575b6020831014614bc557565b634e487b7160e01b5f52602260045260245ffd5b91607f1691614bba565b5f9291815491614bf283614bab565b8083529260018116908115614c475750600114614c0e57505050565b5f9081526020812093945091925b838310614c2d575060209250010190565b600181602092949394548385870101520191019190614c1c565b9050602094955060ff1991509291921683830152151560051b010190565b610180810190811067ffffffffffffffff821117614c8257604052565b634e487b7160e01b5f52604160045260245ffd5b60c0810190811067ffffffffffffffff821117614c8257604052565b60a0810190811067ffffffffffffffff821117614c8257604052565b90601f601f19910116810190811067ffffffffffffffff821117614c8257604052565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b67ffffffffffffffff8111614c8257601f01601f191660200190565b81601f82011215611a4857602081359101614d4c82614d16565b92614d5a6040519485614cce565b82845282820111611a4857815f92602092838601378301015290565b60208091604051928184925191829101835e8101600e81520301902090565b35908115158203611a4857565b9081549168010000000000000000831015614c825782614dca916001614de995018155614b1e565b9091906001600160a01b038084549260031b9316831b921b1916179055565b565b919091601f8311614dfc575b505050565b818311614e0857505050565b5f5260205f206020601f830160051c9210614e41575b81601f9101920160051c03905f5b82811015614df7575f82820155600101614e2c565b5f9150614e1e565b90816020910312611a48575190565b5f198114614e665760010190565b634e487b7160e01b5f52601160045260245ffd5b51908115158203611a4857565b9190826040910312611a4857614ea1602083519301614e7a565b90565b614ea193926001600160a01b0360609316825260208201528160408201520190614cf1565b15614ed057565b606460405162461bcd60e51b815260206004820152600f60248201527f4c656e677468206d69736d6174636800000000000000000000000000000000006044820152fd5b916020908281520191905f5b818110614f2d5750505090565b9091926020806001926001600160a01b03614f4788614a9a565b168152019401929101614f20565b601f8260209493601f1993818652868601375f8582860101520116010190565b91614ea19391614f8d91604085526040850191614f55565b916020818403910152614cf1565b15614fa257565b608460405162461bcd60e51b815260206004820152602160248201527f52656769737472793a20424c5320566572696669636174696f6e204661696c6560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152fd5b9190811015614b0a5760051b0190565b356001600160a01b0381168103611a485790565b91908203918211614e6657565b8015614e66575f190190565b3561ffff81168103611a485790565b1561505f57565b606460405162461bcd60e51b815260206004820152600c60248201527f46656520746f6f206869676800000000000000000000000000000000000000006044820152fd5b3563ffffffff81168103611a485790565b359063ffffffff82168203611a4857565b92919060408452803560408501526020810135606085015263ffffffff6150ee604083016150b4565b16608085015263ffffffff615105606083016150b4565b1660a085015263ffffffff61511c608083016150b4565b1660c085015263ffffffff61513360a083016150b4565b1660e085015260c081013561ffff8116809103611a485761010085015261515c60e08201614d95565b15156101208501526101008101356101408501526101208101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215611a485781019060208235920167ffffffffffffffff8311611a48578236038113611a48576151df61016091602094610180848a01526101c0890191614f55565b916001600160a01b036151f56101408301614a9a565b1661018088015201356101a0860152930152565b51906fffffffffffffffffffffffffffffffff82168203611a4857565b92919261523282614d16565b916152406040519384614cce565b829481845281830111611a48578281602093845f96015e010152565b9080601f83011215611a48578151614ea192602001615226565b1561527d57565b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206f776e6572000000000000000000000000000000000000006044820152fd5b156152c857565b606460405162461bcd60e51b815260206004820152601c60248201527f5468726573686f6c6473206d75737420626520617363656e64696e67000000006044820152fd5b916020936001600160a01b03615332939796971684526060858501526060840191614f14565b9060408183039101528281520191905f5b8181106153505750505090565b90919260208060019261536287614d95565b15158152019401929101615343565b6001600160a01b035f5416330361538457565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b6002600154146153c1576002600155565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b9291905f845f52600760205260405f209460066040519661540988614c65565b805488526001810154602089015260ff600282015463ffffffff811660408b015263ffffffff8160201c1660608b015263ffffffff8160401c1660808b015263ffffffff8160601c1660a08b015261ffff8160801c1660c08b015260901c16151560e0890152600381015461010089015260405161548e81611c758160048601614be3565b61012089015260058101546001600160a01b031661014089015201546101608701527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07481036155d3575050906154e391615bd6565b80515115615575576001600160a01b036154fd8251614d76565b54166155175760a00151915b82156155125750565b519150565b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e616d652074616b656e000000000000000000000000000000000000000000006044820152fd5b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e616d65207265717569726564000000000000000000000000000000000000006044820152fd5b7f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a036156ba57509061560491615a46565b7fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0745f52600860205260405f206001600160a01b0380602084015116165f5260205260ff60405f2054161561565c576080015191615509565b60646040517faa33ade000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c696420636f6d6d756e6974790000000000000000000000000000006044820152fd5b9391602081146156cc575b5050615509565b819294509060209181010312611a485735915f806156c5565b909291907f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a14615746575050604080516001600160a01b039092166020830152818101525f6060820152614ea181608081015b03601f198101835282614cce565b61573892506020615762614ea1936001600160a01b0393615a46565b015116604051928391602083016001600160a01b03606092168152604060208201525f60408201520190565b92919092600454906001600160a01b035f9216806158d0575b507fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c074810361585d5750506020916157dd91615bd6565b6157e78151614d76565b6001600160a01b03841673ffffffffffffffffffffffffffffffffffffffff1982541617905501518051908161581c57505050565b60208091836001600160a01b039460405194859301835e8101600f815203019020911673ffffffffffffffffffffffffffffffffffffffff19825416179055565b7f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a1461588a575b50505050565b6001600160a01b0361589f8194604094615a46565b51168152601060205220911673ffffffffffffffffffffffffffffffffffffffff198254161790555f808080615884565b803b15611a48575f80916044604051809481937fa3970ae60000000000000000000000000000000000000000000000000000000083526001600160a01b038c166004840152600160248401525af1801561479257156157a7576159369192505f90614cce565b5f905f6157a7565b805f52600b60205260405f206001600160a01b0383165f5260205260405f20548015614df757815f52600a60205260405f20905f198101818111614e665782545f198101908111614e66578082036159f4575b505050805480156159e0575f1901906159aa8282614b1e565b6001600160a01b0382549160031b1b19169055555f52600b6020526001600160a01b0360405f2091165f526020525f6040812055565b634e487b7160e01b5f52603160045260245ffd5b614dca916001600160a01b03615a0d615a1e9387614b1e565b90549060031b1c1692839186614b1e565b835f52600b6020526001600160a01b0360405f2091165f5260205260405f20555f8080615991565b90604051615a5381614cb2565b5f81525f6020820152606060408201526060808201525f608082015250602081101580615bc3575b15615b2a57810190602081830312611a485780359067ffffffffffffffff8211611a4857019060a082820312611a485760405191615ab883614cb2565b615ac181614a9a565b8352615acf60208201614a9a565b6020840152604081013567ffffffffffffffff8111611a485782615af4918301614d32565b6040840152606081013567ffffffffffffffff8111611a4857608092615b1b918301614d32565b60608401520135608082015290565b810160a082820312611a4857615b3f82614a9a565b91615b4c60208201614a9a565b604082013567ffffffffffffffff8111611a485783615b6c918401614d32565b60608301359367ffffffffffffffff8511611a4857615b976001600160a01b03916080968601614d32565b928160405197615ba689614cb2565b168752166020860152604085015260608401520135608082015290565b5080602011611a48576020823514615a7b565b90604051615be381614c96565b606081526060602082015260606040820152606080820152606060808201525f60a082015250602081101580615deb575b15615d1057810190602081830312611a485780359067ffffffffffffffff8211611a4857019060c082820312611a485760405191615c5183614c96565b803567ffffffffffffffff8111611a485782615c6e918301614d32565b8352602081013567ffffffffffffffff8111611a485782615c90918301614d32565b6020840152604081013567ffffffffffffffff8111611a485782615cb5918301614d32565b6040840152606081013567ffffffffffffffff8111611a485782615cda918301614d32565b6060840152608081013567ffffffffffffffff8111611a485760a092615d01918301614d32565b6080840152013560a082015290565b810160c082820312611a4857813567ffffffffffffffff8111611a485781615d39918401614d32565b91602081013567ffffffffffffffff8111611a485782615d5a918301614d32565b604082013567ffffffffffffffff8111611a485783615d7a918401614d32565b606083013567ffffffffffffffff8111611a485784615d9a918501614d32565b90608084013567ffffffffffffffff8111611a485760a095615dbd918601614d32565b9260405196615dcb88614c96565b87526020870152604086015260608501526080840152013560a082015290565b5080602011611a48576020823514615c1456fea2646970667358221220aa7c50a4e413d71090e385f57c6de204047c119177a72ea04406924345c412eb64736f6c634300082100336fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f80c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3ae94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0742024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a"` +> **bytecode**: `string` = `"0x60a08060405234610123573315610110575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055306080525f5160206160a55f395f51905f525460ff8160401c16610101576002600160401b03196001600160401b038216016100ae575b604051615f7d9081610128823960805181818161437801526144140152f35b6001600160401b0319166001600160401b039081175f5160206160a55f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f8061008f565b63f92ee8a960e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306a36aee14614e735750806311c85b0b14614e3b57806315de32ca14614ddf57806317e1c59514614b1257806319c46e8114614aec5780631b02e44f146147a35780632c333e25146146f65780633cd01548146146b1578063424a3d77146146285780634b8b8a6e146145fe5780634f1ef286146143d757806352d1902d1461435e57806354fd4d50146142ff5780635c445412146142c75780635ee05b1714613cab5780636229738c14613c2b57806364c39a4314613bd0578063669d776214613751578063715018a6146136ff578063727b52a514612f215780637d960e3714612ebe578063826600ce14612e975780638da5cb5b14612e715780638ff39099146124d7578063913e6779146124a7578063919d1e2c1461248057806391d1485414612435578063ad3cb1cc146123e8578063af5eda02146123be578063b198899514612363578063b5e936ab1461217f578063bb2ae6bf14612013578063bb8ca25914611efa578063bc95910114611e8d578063be30742f14611e66578063bf28c98a14611e29578063c0c53b8b146105a7578063cd5d1e7414610525578063ce830e7b146102d9578063e20bce2e146102bb578063e79e97391461023f5763f2fde38b146101ec575f80fd5b3461023c57602036600319011261023c57610205614f24565b61020d615512565b6001600160a01b038116156102285761022590615d51565b80f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b503461023c57602036600319011261023c576001600160a01b03610261614f24565b610269615512565b1680156102ac576001600160a01b03600454828219821617600455167f1f7cd67c986d0cce4aa6f69075b5278a05438ef2a5d1abf6eeded51ba81232458380a380f35b63e481c26960e01b8252600482fd5b503461023c578060031936011261023c576020601754604051908152f35b503461023c57608036600319011261023c576102f3614f24565b906024356001600160401b03811161052157610313903690600401614fd7565b906044356001600160401b03811161051d57610333903690600401614fd7565b9190926064356001600160401b038111610519579061035e6001600160a01b03923690600401614f64565b929097610369615538565b1694851561050a576001600160a01b036005541633036104fb578482036104ec5760c882116104dd576001600160a01b03600454169283156104ce5780156104bf57601754600181018091116104ab5798610421918a8a9b601755604051602081019146835260408201528a606082015260a060808201526104188161040a6103f78c8b60c085019161524c565b828103601f190160a08401528d8a6154d8565b03601f198101835282615052565b51902091615bdd565b823b156104a75761045e956104708896928793604051998a9889978896632fa66a7f60e11b8852600488015260606024880152606487019161524c565b848103600319016044860152916154d8565b03925af1801561049c57610487575b506001805580f35b8161049191615052565b61023c57805f61047f565b6040513d84823e3d90fd5b8680fd5b634e487b7160e01b89526011600452602489fd5b635599c7cb60e11b8852600488fd5b63cf8d29eb60e01b8852600488fd5b6305beb17160e11b8752600487fd5b638b140a8160e01b8752600487fd5b635cfb0e7f60e01b8752600487fd5b633494a40d60e21b8752600487fd5b8580fd5b8380fd5b5080fd5b503461023c57602036600319011261023c5761053f614f24565b610547615512565b6001600160a01b03811690811590811561059d575b506102ac576001600160a01b03600354828219821617600355167f171f7dbde35aed7cddf3ece2dad8f4eb62443a3d6bf8616586da6fd03c6b4ed98380a380f35b90503b155f61055c565b503461023c57606036600319011261023c576105c1614f24565b6105c9614f3a565b6044356001600160a01b03811680910361051d577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c1615926001600160401b03811680159081611e21575b6001149081611e17575b159081611e0e575b50611dff5767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005583611dc0575b5061067484615d51565b6001600160a01b03166001600160a01b031960025416176002556001600160a01b03196003541617600355826040516106ac81615007565b6801a055690d9db800008152602081016729a2241af62c000081526040820194600a865260608301916002835260808401966001885260a0850190600a825260c086016103e8815260e087019060018252610100880193670de0b6b3a7640000855260209b8c98604051976107218b8a615052565b8c89526101208c019889526101408c01996001600160a01b03169c8d8b526101608d019b62278d008d525f516020615f515f395f51905f52825260069052604090209b518c555160018c015560028b01955163ffffffff1663ffffffff1663ffffffff198754161786555163ffffffff166107b990869067ffffffff0000000082549160201b169067ffffffff000000001916179055565b51845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b5761085b826108558554615144565b85615305565b88908a601f8411600114611d505792806001600160a01b039593610898936006999896926117e0575b50508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611d46575b611ce5575b50506040516108e781615007565b6802b5e3af16b188000081528385818301674563918244f40000815260408401600a8152606085019060028252608086016001815260a08701600a815260c08801906103e8825260e0890192600184526101008a0195671bc16d674ec800008752604051976109568b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081525f516020615f315f395f51905f528c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b57610a6b826108558554615144565b88908a601f8411600114611c755792806001600160a01b039593610aa7936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611c6b575b611c0a575b5050604051610af681615007565b6801a055690d9db80000815283858183016729a2241af62c0000815260408401600a8152606085019060028252608086016001815260a08701600a815260c08801906103e8825260e0890192600184526101008a0195670de0b6b3a7640000875260405197610b658b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081527f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d8c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b57610c8d826108558554615144565b88908a601f8411600114611b9a5792806001600160a01b039593610cc9936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611b90575b611b1c575b5050604051610d1881615007565b6801158e460913d0000081528385818301671bc16d674ec80000815260408401600f8152606085019060018252608086016001815260a087016005815260c08801906103e8825260e0890192600184526101008a0195670de0b6b3a7640000875260405197610d878b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081527f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a8c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b57610eaf826108558554615144565b88908a601f8411600114611aac5792806001600160a01b039593610eeb936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611aa2575b611a2e575b5050604051610f3a81615007565b68056bc75e2d6310000081528385818301678ac7230489e8000081526040840160058152606085019060058252608086016002815260a087016014815260c08801906103e8825260e0890192600184526101008a0195674563918244f40000875260405197610fa98b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081527f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f88c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b576110d1826108558554615144565b88908a601f84116001146119be5792806001600160a01b03959361110d936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b0360025416801515806119b4575b611940575b505060405161115c81615007565b84815283858183016801a055690d9db8000081526040840182815260608501908382526080860184815260a0870185815260c088019086825260e0890192600184526101008a0195888752604051976111b58b8a615052565b8989526101208c019889526101408c018d81526101608d018b81525f516020615f115f395f51905f528c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b576112c6826108558554615144565b88908a601f84116001146118d05792806001600160a01b039593611302936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b0360025416801515806118c6575b61186f575b505060405161135181615007565b8481528385818301670429d069189e000081526040840182815260608501908382526080860184815260a0870185815260c088019086825260e0890192600184526101008a0195888752604051976113a98b8a615052565b8989526101208c019889526101408c018d81526101608d018b81525f516020615ef15f395f51905f528c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b576114ba826108558554615144565b88908a601f84116001146117eb5792806001600160a01b0395936114f6936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b0360025416801515806117d6575b61177f575b50600190526013835268056bc75e2d631000006040852055600284526013835268056bc75e2d6310000060408520556003845260138352681043561a882930000060408520556004845260138352682086ac35105260000060408520556005845260138352683635c9adc5dea0000060408520556006845260138352686c6b935b8bbd4000006040852055601654600160401b81101561176b578060016115e392016016556016615122565b81549060031b90600d821b915f19901b1916179055601654600160401b81101561176b5780600161161992016016556016615122565b81549060031b906022821b915f19901b1916179055601654600160401b81101561176b5780600161164f92016016556016615122565b81549060031b906059821b915f19901b1916179055601654600160401b81101561176b5780600161168592016016556016615122565b81549060031b9060e9821b915f19901b1916179055601654600160401b81101561176b578060016116bb92016016556016615122565b81549060031b90610262821b915f19901b191617905583526014825260408320600160ff198254161790556116ee575080f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29068ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560405160018152a180f35b634e487b7160e01b85526041600452602485fd5b81906040518287820191636b26335560e11b83525f516020615ef15f395f51905f526024820152816044820152816064820152606481526117c1608482615052565b51925af1506117ce6153e4565b50835f611537565b50803b1515611532565b015190505f80610884565b50838b52898b209190601f1984168c5b8c82821061184557505092600192859260069998966001600160a01b0398961061182d575b505050811b0190556114f9565b01515f1960f88460031b161c191690555f8080611820565b60018596829396860151815501950193016117fb565b634e487b7160e01b8a52604160045260248afd5b81906040518287820191636b26335560e11b83525f516020615f115f395f51905f526024820152816044820152816064820152606481526118b1608482615052565b51925af1506118be6153e4565b50835f611343565b50803b151561133e565b50838b52898b209190601f1984168c5b8c82821061192a57505092600192859260069998966001600160a01b03989610611912575b505050811b019055611305565b01515f1960f88460031b161c191690555f8080611905565b60018596829396860151815501950193016118e0565b81906040518287820191636b26335560e11b83527f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f860248201526103e86044820152674563918244f4000060648201526064815261199f608482615052565b51925af1506119ac6153e4565b50835f61114e565b50803b1515611149565b50838b52898b209190601f1984168c5b8c828210611a1857505092600192859260069998966001600160a01b03989610611a00575b505050811b019055611110565b01515f1960f88460031b161c191690555f80806119f3565b60018596829396860151815501950193016119ce565b81906040518287820191636b26335560e11b83527f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a60248201526103e86044820152670de0b6b3a7640000606482015260648152611a8d608482615052565b51925af150611a9a6153e4565b50835f610f2c565b50803b1515610f27565b50838b52898b209190601f1984168c5b8c828210611b0657505092600192859260069998966001600160a01b03989610611aee575b505050811b019055610eee565b01515f1960f88460031b161c191690555f8080611ae1565b6001859682939686015181550195019301611abc565b81906040518287820191636b26335560e11b83527f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d60248201526103e86044820152670de0b6b3a7640000606482015260648152611b7b608482615052565b51925af150611b886153e4565b50835f610d0a565b50803b1515610d05565b50838b52898b209190601f1984168c5b8c828210611bf457505092600192859260069998966001600160a01b03989610611bdc575b505050811b019055610ccc565b01515f1960f88460031b161c191690555f8080611bcf565b6001859682939686015181550195019301611baa565b81906040518287820191636b26335560e11b83525f516020615f315f395f51905f5260248201526103e86044820152671bc16d674ec80000606482015260648152611c56608482615052565b51925af150611c636153e4565b50835f610ae8565b50803b1515610ae3565b50838b52898b209190601f1984168c5b8c828210611ccf57505092600192859260069998966001600160a01b03989610611cb7575b505050811b019055610aaa565b01515f1960f88460031b161c191690555f8080611caa565b6001859682939686015181550195019301611c85565b81906040518287820191636b26335560e11b83525f516020615f515f395f51905f5260248201526103e86044820152670de0b6b3a7640000606482015260648152611d31608482615052565b51925af150611d3e6153e4565b50835f6108d9565b50803b15156108d4565b50838b52898b209190601f1984168c5b8c828210611daa57505092600192859260069998966001600160a01b03989610611d92575b505050811b01905561089b565b01515f1960f88460031b161c191690555f8080611d85565b6001859682939686015181550195019301611d60565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f61066a565b63f92ee8a960e01b8652600486fd5b9050155f61062e565b303b159150610626565b85915061061c565b503461023c57602036600319011261023c5760ff60406020926001600160a01b03611e52614f24565b168152601484522054166040519015158152f35b503461023c578060031936011261023c5760206001600160a01b0360055416604051908152f35b503461023c57602036600319011261023c576001600160a01b03611eaf614f24565b611eb7615512565b1680156102ac576001600160a01b03600554828219821617600555167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b503461023c57602036600319011261023c576004356001600160401b03811161052157611f2b903690600401614fd7565b611f33615512565b6001600160a01b036002541690835b818110611f4d578480f35b80611f5b600192848761528d565b3580875260066020528660408120600281015460ff8160901c16611f84575b5050505001611f42565b61040a611fcb60038594015460405192839161ffff6020840196636b26335560e11b885260801c16896024850161ffff604092959493606083019683521660208201520152565b519082895af1611fd96153e4565b5015611fe8575b868180611f7a565b847f3e9fc4a04e1f2759edf7001e63923124a42c59aef874442b88cdb30685c8833e8880a35f611fe0565b503461023c57602036600319011261023c576004356001600160401b03811161052157612044903690600401614fd7565b61204c615512565b6014811161217057601654836016558061212f575b50825b81811061206f578380f35b801515806120f0575b6120e15761208781838561528d565b35601654600160401b8110156120cd57906120c56120af836001809695016016556016615122565b819391549060031b91821b915f19901b19161790565b905501612064565b634e487b7160e01b86526041600452602486fd5b637342d4e360e11b8452600484fd5b506120fc81838561528d565b355f19820182811161211b5761211390848661528d565b351015612078565b634e487b7160e01b86526011600452602486fd5b60168452835b8181106121425750612061565b60019085817fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289015501612135565b63194a3c0f60e11b8352600483fd5b503461023c57602036600319011261023c578060405161219e81615007565b8181528160208201528160408201528160608201528160808201528160a08201528160c08201528160e082015281610100820152610120810160609052816101408201526101600152600435815260066020526040902060405161220181615007565b81548152600182015491602082019283526002810154604083019063ffffffff8116825260608401908060201c63ffffffff16825260808501908060401c63ffffffff16825260a086018160601c63ffffffff16815260c08701908260801c61ffff16825260e088019260901c60ff1615158352600387015493610100890194855260405195868060048b01906122979161517c565b036122a29088615052565b6101208a0196875260058901546001600160a01b0316986101408b01998a5260060154976101608b019889526040519b8c9b60208d525160208d01525160408c01525163ffffffff1660608b01525163ffffffff1660808a01525163ffffffff1660a08901525163ffffffff1660c08801525161ffff1660e08701525115156101008601525161012085015251610140840161018090526101a08401612347916150d2565b91516001600160a01b0316610160840152516101808301520390f35b503461023c57602036600319011261023c57600435906001600160401b03821161023c5760206001600160a01b038161239f3660048701614f64565b91908260405193849283378101600e8152030190205416604051908152f35b503461023c57602036600319011261023c5760406020916004358152601383522054604051908152f35b503461023c578060031936011261023c575061243160405161240b604082615052565b60058152640352e302e360dc1b60208201526040519182916020835260208301906150d2565b0390f35b503461023c57604036600319011261023c576001600160a01b036040612459614f3a565b92600435815260076020522091165f52602052602060ff60405f2054166040519015158152f35b503461023c578060031936011261023c5760206001600160a01b0360045416604051908152f35b503461023c57604036600319011261023c5760206124cf6124c6614f24565b60243590615430565b604051908152f35b503461023c57602036600319011261023c576001600160a01b036124f9614f24565b612501615512565b168015612e62576001600160a01b036002548282198216176002555f516020615f515f395f51905f5284526006602052836040812060405161254281615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c1615158252610160600660038601549561010084019687526040516125da816125d3816004860161517c565b0382615052565b61012085015289600582015416610140850152015491015251612dfd575b50505f516020615f315f395f51905f5290526006602052836040812060405161262081615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c1615158252610160600660038601549561010084019687526040516126b1816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612d98575b50507f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d90526006602052836040812060405161270a81615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c16151582526101606006600386015495610100840196875260405161279b816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612d20575b50507f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a9052600660205283604081206040516127f481615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c161515825261016060066003860154956101008401968752604051612885816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612ca8575b50507f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f89052600660205283604081206040516128de81615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c16151582526101606006600386015495610100840196875260405161296f816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612c30575b50505f516020615f115f395f51905f529052600660205283604081206040516129b581615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c161515825261016060066003860154956101008401968752604051612a46816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612bcb575b50505f516020615ef15f395f51905f52905260066020528360408120604051612a8c81615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c161515825261016060066003860154956101008401968752604051612b1d816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612b66575b505050167f7042586b23181180eb30b4798702d7a0233b7fc2551e89806770e8e5d9392e6a8380a380f35b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615ef15f395f51905f5260248401526044830152606482015260648152612bb5608482615052565b51925af150612bc26153e4565b50835f80612b3b565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615f115f395f51905f5260248401526044830152606482015260648152612c1a608482615052565b51925af150612c276153e4565b50835f80612a64565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85527f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f860248401526044830152606482015260648152612c92608482615052565b51925af150612c9f6153e4565b50835f8061298d565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85527f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a60248401526044830152606482015260648152612d0a608482615052565b51925af150612d176153e4565b50835f806128a3565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85527f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d60248401526044830152606482015260648152612d82608482615052565b51925af150612d8f6153e4565b50835f806127b9565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615f315f395f51905f5260248401526044830152606482015260648152612de7608482615052565b51925af150612df46153e4565b50835f806126cf565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615f515f395f51905f5260248401526044830152606482015260648152612e4c608482615052565b51925af150612e596153e4565b50835f806125f8565b633494a40d60e21b8252600482fd5b503461023c578060031936011261023c576001600160a01b036020915416604051908152f35b503461023c578060031936011261023c5760206001600160a01b0360025416604051908152f35b503461023c57606036600319011261023c57612ed8614f24565b6001600160a01b03600254163303612f1357602435825260086020526001600160a01b036040832091165f5260205260405f20604435905580f35b6282b42960e81b8252600482fd5b503461023c57602036600319011261023c57600435612f3e615538565b8082526007602052604082206001600160a01b0333165f5260205260ff60405f205416156136e957600254604051637c50309f60e01b81523360048201526024810183905290602090829060449082906001600160a01b03165afa9081156132265783916136b7575b508183526007602052604083206001600160a01b0333165f5260205260405f2060ff198154169055612fd93383615d8e565b3383526010602052604083205461369a575b338352600f6020526040832091825492845b84811061360a575b50509091505f516020615f515f395f51905f52811415806135f3575b613411575b338352601060205260408320541561333d575b8291613079575b6040519182524260208301527f0d9361411a652b66cd4aed24a96d36c0b048899896c927d879a9d3ba2790d9c660403393a36001805580f35b80915082526006602052600660408320015480613231575b50600254604051637c50309f60e01b81523360048201526024810183905290602090829060449082906001600160a01b03165afa9081156132265783916131f4575b5081604051828152604060208201526004604082015263115e1a5d60e21b60608201527fe80f99d9789e367c229c526d3d3f84d44d3daf77ea65f7bbe8510f176ac45a2360803392a38183526008602052604083206001600160a01b0333165f526020528260405f20556001600160a01b03600254166020604051809263374e4d7360e01b8252818781613181893360048401602090939291936001600160a01b0360408201951681520152565b03925af19081156131e95784916131b3575b50808211156131ab576131a5916152b1565b90613040565b5050816131a5565b90506020813d6020116131e1575b816131ce60209383615052565b810103126131dd57515f613193565b5f80fd5b3d91506131c1565b6040513d86823e3d90fd5b90506020813d60201161321e575b8161320f60209383615052565b810103126131dd57515f6130d3565b3d9150613202565b6040513d85823e3d90fd5b6002546040516318581cf760e11b815233600482015260248101849052908490829060449082906001600160a01b03165afa80156131e95784906132b3575b65ffffffffffff91501690810180911161329f574210613290575f613091565b6314bc3b5b60e11b8252600482fd5b634e487b7160e01b83526011600452602483fd5b503d8085833e6132c38183615052565b81019060a081830312613339576132d981615413565b506132e660208201615413565b5060408101519065ffffffffffff82168203610519576080810151906001600160401b0382116104a7570182601f820112156105195765ffffffffffff9281602061333393519101615375565b50613270565b8480fd5b826001600160a01b0360045416806133c2575b50806001600160a01b036003541660405182602082019163374e7fa360e01b835233602482015260248152613386604482615052565b51925af16133926153e4565b506130395780337ff6da96ea84a034d6f30b7b377637742735f36f14cfda9144397e4f1e69116f4a8580a3613039565b803b15610521578180916044604051809481936351cb857360e11b83523360048401528160248401525af1801561049c5715613350578161340291615052565b61340d57825f613350565b8280fd5b5f516020615f115f395f51905f5281146134c1575b808352600c602052604083206001600160a01b0333165f526020528260405f206134508154615144565b8061347e575b5050819052600b602052604083206001600160a01b0333165f526020528260405f2055613026565b601f81116001146134945750555b825f80613456565b818352602083206134b191601f0160051c5f1901906001016152ea565b808252816020812091555561348c565b808352600c602052604083206001600160a01b0333165f526020526125d36134f260405f206040519283809261517c565b805180613501575b5050613426565b8101906020820190602081840312610519576020810151906001600160401b0382116104a7570191606090839003126133395760405161354081615037565b60208301516001600160401b0381116104a757826020613562928601016153ab565b81526040830151916001600160401b0383116104a75761358c60609160206135a1958701016153ab565b936020830194855201516040820152516153c5565b805473ffffffffffffffffffffffffffffffffffffffff1916905551805180156134fa5760209181839260405194859301835e8101600e8152030190206001600160a01b031981541690555f806134fa565b505f516020615f315f395f51905f52811415613021565b826136158284615122565b90549060031b1c1461362957600101612ffd565b909192935f19810190811161211b576120af6136486136569285615122565b90549060031b1c9284615122565b905580548015613686575f19019061366e8282615122565b8154905f199060031b1b191690555581905f80613005565b634e487b7160e01b85526031600452602485fd5b3383526010602052604083206136b081546152be565b9055612feb565b90506020813d6020116136e1575b816136d260209383615052565b810103126131dd57515f612fa7565b3d91506136c5565b633a401ef360e21b825260045233602452604490fd5b503461023c578060031936011261023c57613718615512565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461023c5761376036614f91565b61376c93929193615538565b6001600160a01b038216938415613bb357843303613bc2576108008211613bb35783865260066020526040862092604051916137a783615007565b8454835260018501549460208401958652600660028201549163ffffffff8316604087015263ffffffff8360201c16606087015263ffffffff8360401c16608087015263ffffffff8360601c1660a087015261ffff8360801c1660c087015260ff60e087019360901c16151583526003810154610100870152604051613834816125d3816004860161517c565b6101208701526001600160a01b036005820154166101408701520154610160850152511580613b9b5750858852600760205260408820875f5260205260ff60405f20541693848095613b84575b613b6d5761388f8388615558565b6138a661389e8284868b6155fe565b955190615921565b90856139bd57836138ef9593604095936138c4938a5192848d61596c565b86896001600160a01b036003541692855196879586948593631f1f342160e11b855260048501615227565b03925af19081156139b2578691613982575b50838652600b60205260408620855f5260205260405f20555f1461395857507f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d6040845b8151908152426020820152a36001805580f35b60407f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d9151613945565b6139a4915060403d6040116139ab575b61399c8183615052565b81019061520a565b505f613901565b503d613992565b6040513d88823e3d90fd5b90878a52600860205260408a20895f5260205260405f20548111613ac5575b50868952600c60205260408920885f5260205260405f20916001600160401b03821161185b57613a10826108558554615144565b89908a601f8411600114613a595792806138ef979593613a47936040989692613a4e5750508160011b915f199060031b1c19161790565b90556138c4565b013590505f80610884565b50838b5260208b2091601f1984168c5b818110613aad5750926001928592604098966138ef9a989610613a94575b505050811b0190556138c4565b01355f19600384901b60f8161c191690555f8080613a87565b91936020600181928787013581550195019201613a69565b896001600160a01b03600254168982526008602052604082208b5f52602052613af260405f2054846152b1565b90803b1561340d578b9160848c85809460405196879586946325e5c05160e11b86528260048701526024860152604485015260648401525af1801561049c57613b54575b50889052600860205260408a20895f5260205260405f20555f6139dc565b81613b5e91615052565b613b6957895f613b36565b8980fd5b6044898989631b753c1b60e21b8352600452602452fd5b505f516020615ef15f395f51905f52871415613881565b63159818c760e11b8952600487905215602452604488fd5b633494a40d60e21b8652600486fd5b6282b42960e81b8652600486fd5b503461023c57602036600319011261023c57600435906001600160401b03821161023c5760206001600160a01b0381613c0c3660048701614f64565b91908260405193849283378101600d8152030190205416604051908152f35b503461023c57604036600319011261023c57613c45614f24565b6024359081151580920361340d5760206001600160a01b037f6be30291a8f228c9342613e5e66df1a1b85aa570ac1bca9219f3ac7b7f73bbf392613c87615512565b1692838552601482526040852060ff1981541660ff8316179055604051908152a280f35b50346131dd5760403660031901126131dd576001600160401b03602435116131dd5760243536036101806003198201126131dd57613ce7615538565b6004355f5260066020526001600160a01b03600560405f2001541680155f1461429757506001600160a01b035f54163303614289575b6107d061ffff613d3160c4602435016152ca565b161161427a576001600160a01b03613d4e6101446024350161529d565b161561426b576004355f52600660205260405f209060243560040135825560248035013560018301556002820163ffffffff613d8e6044602435016152d9565b1663ffffffff19825416178155613dce613dac6064602435016152d9565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b613dff613ddf6084602435016152d9565b825463ffffffff60401b191660409190911b63ffffffff60401b16178255565b613e30613e1060a4602435016152d9565b825463ffffffff60601b191660609190911b63ffffffff60601b16178255565b613e5d613e4160c4602435016152ca565b825461ffff60801b191660809190911b61ffff60801b16178255565b60e4602435013580151581036131dd57815460ff60901b191690151560901b60ff60901b161790556101046024350135600383015560221901610124602435013512156131dd576001600160401b036024356101248101350160040135116131dd576024803561012481013501600481013536039101136131dd57613f0160046101246024350135602435010135613ef86004840154615144565b60048401615305565b5f6001601f602435610124810135016004013511146141b65790613f5c6006925f906004610124602435013560243501013561419e575b5060046101246024350135602435010135908160011b915f199060031b1c19161790565b60048201555b613f716101446024350161529d565b6001600160a01b036005830191166001600160a01b0319825416179055610164602435013591829101556001600160a01b0360025416613fb560c4602435016152ca565b90803b156131dd57604051636b26335560e11b8152600480359082015261ffff90921660248084019190915235610104013560448301525f9082908183816064810103925af180156141935761417e575b506040519060408252602435600401356040830152602480350135606083015263ffffffff614039604460243501615355565b16608083015263ffffffff614052606460243501615355565b1660a083015263ffffffff61406b608460243501615355565b1660c083015263ffffffff61408460a460243501615355565b1660e083015260c4602435013561ffff811680910361051d576101008301526140b160e460243501615137565b1515610120830152610104602435013561014083015260243561012460243501350191602460048401359301916001600160401b03841161333957833603831361333957837f287e005099116032e1bba9482a5b0df09cc99f7e82a4482fa2810c52158d473d93610180610160850152816101c08501526101e0840137846101e085840101526001600160a01b0361414e61014460243501614f50565b166101808301526101a082015242602082015260043592601f01601f191681018190036101e00190a26001805580f35b61418b9192505f90615052565b5f905f614006565b6040513d5f823e3d90fd5b6024803561012481013501909101013590505f613f38565b90600481015f5260205f205f925b6024356101248101350160040135601f1916841061424857600693506024356101248101350160040135601f1981161061421a575b5050600160046101246024350135602435010135811b016004820155613f62565b602480356101248101350191820101355f196004929092013560031b60f8169190911c191690555f806141f9565b6024803561012481013501820101358255602093840193600190920191016141c4565b63e481c26960e01b5f5260045ffd5b63cd4e616760e01b5f5260045ffd5b6282b42960e81b5f5260045ffd5b331415806142b3575b15613d1d576282b42960e81b5f5260045ffd5b506001600160a01b035f54163314156142a0565b346131dd5760203660031901126131dd576004356016548110156131dd576142f06020916150f6565b90549060031b1c604051908152f35b346131dd575f3660031901126131dd57612431604051614320604082615052565b600e81527f52656769737472792d352e332e3300000000000000000000000000000000000060208201526040519182916020835260208301906150d2565b346131dd575f3660031901126131dd576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036143c85760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b63703e46dd60e11b5f5260045ffd5b60403660031901126131dd576143eb614f24565b6024356001600160401b0381116131dd5761440a90369060040161508e565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168030149081156145c9575b506143c85761444c615512565b6040516352d1902d60e01b81526001600160a01b0383169290602081600481875afa5f9181614595575b5061448e5783634c9c8ce360e01b5f5260045260245ffd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8592036145835750813b1561457157806001600160a01b03197f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2815115614559575f8083602061455795519101845af46145516153e4565b91615e96565b005b50503461456257005b63b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b632a87526960e21b5f5260045260245ffd5b9091506020813d6020116145c1575b816145b160209383615052565b810103126131dd57519085614476565b3d91506145a4565b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614158361443f565b346131dd5760203660031901126131dd576004355f526009602052602060405f2054604051908152f35b346131dd5760203660031901126131dd576004356001600160a01b036005541633036146a257801561469357805f52601560205260405f20600160ff1982541617905533907ff2aa93d5b018c6d050bb3a6597b9d4a3cd7a9222079c7ce596ecf6c7012162905f80a3005b630992f7ad60e01b5f5260045ffd5b635cfb0e7f60e01b5f5260045ffd5b346131dd5760403660031901126131dd576146ca614f3a565b6004355f5260086020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346131dd5760203660031901126131dd576001600160a01b03614717614f24565b165f52601160205260405f2054600190601654805b614748575b825f526013602052602060405f2054604051908152f35b5f19810181811161478f5761475c906150f6565b90549060031b1c82101561477957614773906152be565b8061472c565b809250600191500180911161478f578180614731565b634e487b7160e01b5f52601160045260245ffd5b346131dd5760a03660031901126131dd576004356024356001600160401b0381116131dd576147d6903690600401614fd7565b916044356001600160401b0381116131dd576147f6903690600401614fd7565b919093606435916084356001600160401b0381116131dd5761481c903690600401614f64565b614824615538565b335f52601460205260ff60405f205416156146a257858403614add5760c88411614ace578015614abf576001600160a01b036005541615614ab0578215614693578415614aa157825f52601560205260ff60405f205416614a9257825f52601560205260405f20600160ff1982541617905560405192602084019081525f60408501525f606085015260e060808501526148c36101008501868a61524c565b848103601f190160a0860152878152937f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88116131dd576104186020828c61492b988c60051b8092858301378b60c08401524660e0840152010301601f198101835282615052565b5f5b81811061493a5760018055005b6001600160a01b0361495561495083858961528d565b61529d565b1690815f52601260205260405f2054841115614a8757815f52601160205260405f20549161498482878a61528d565b3583811115614a2e57606461499985836152b1565b1115614a0157506064830180931161478f577fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e854260406001945b835f52601160205280825f2055835f52601260205287825f20558151908152876020820152a201935b9361492d565b6001935060407fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e8542916149d2565b80841180614a74575b15614a015750606319830192831161478f577fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e854260406001946149d2565b506064614a8182866152b1565b11614a37565b6001915001936149fb565b6351618d5360e01b5f5260045ffd5b633494a40d60e21b5f5260045ffd5b6342ddf9b760e11b5f5260045ffd5b635599c7cb60e11b5f5260045ffd5b6305beb17160e11b5f5260045ffd5b638b140a8160e01b5f5260045ffd5b346131dd575f3660031901126131dd5760206001600160a01b0360035416604051908152f35b346131dd57614b2036614f91565b909192614b2b615538565b805f52600660205260405f209260405192614b4584615007565b8454845260018501549460208501958652600660028201549163ffffffff8316604088015263ffffffff8360201c16606088015263ffffffff8360401c16608088015263ffffffff8360601c1660a088015261ffff8360801c1660c088015260ff60e088019360901c16151583526003810154610100880152604051614bd2816125d3816004860161517c565b6101208801526001600160a01b036005820154166101408801520154610160860152511580614dc85750825f52600760205260405f206001600160a01b0387165f5260205260ff60405f205416614da857335f9081527fb32a45580e424210cc224fe30669ef7eaf28a87c9d3de17b076e20c517357ea6602052604090205460ff1615614d995785614c92614cee92604094614c6f5f9a88615558565b614c86614c7e8383878b6155fe565b995190615921565b33928a5192868a61596c565b6001600160a01b038116948351978880948193338a8a7f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8780a46003546362c00b1f60e11b84526001600160a01b031695899060048501615227565b03925af1928315614193576020945f94614d54575b5060407f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d91835f52600b8752815f20855f52875285825f20555181519081524287820152a360018055604051908152f35b7f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d919450614d90604091823d84116139ab5761399c8183615052565b50949150614d03565b631e82e51960e01b5f5260045ffd5b6001600160a01b038684631b753c1b60e21b5f526004521660245260445ffd5b8363159818c760e11b5f526004521560245260445ffd5b346131dd5760403660031901126131dd577f7e684e0b76ed13bc9cf7e4fbac7d11873036be9c9a83f9958382721eeda460106040600435602435614e21615512565b815f52601360205280835f205582519182526020820152a1005b346131dd5760203660031901126131dd576001600160a01b03614e5c614f24565b165f526011602052602060405f2054604051908152f35b346131dd5760203660031901126131dd576001600160a01b03614e94614f24565b165f52600f60205260405f20908154808252602082019081935f5260205f20905f5b818110614f0e5750505081614ecc910382615052565b604051918291602083019060208452518091526040830191905f5b818110614ef5575050500390f35b8251845285945060209384019390920191600101614ee7565b8254845260209093019260019283019201614eb6565b600435906001600160a01b03821682036131dd57565b602435906001600160a01b03821682036131dd57565b35906001600160a01b03821682036131dd57565b9181601f840112156131dd578235916001600160401b0383116131dd57602083818601950101116131dd57565b60606003198201126131dd57600435916024356001600160a01b03811681036131dd5791604435906001600160401b0382116131dd57614fd391600401614f64565b9091565b9181601f840112156131dd578235916001600160401b0383116131dd576020808501948460051b0101116131dd57565b61018081019081106001600160401b0382111761502357604052565b634e487b7160e01b5f52604160045260245ffd5b606081019081106001600160401b0382111761502357604052565b90601f801991011681019081106001600160401b0382111761502357604052565b6001600160401b03811161502357601f01601f191660200190565b81601f820112156131dd576020813591016150a882615073565b926150b66040519485615052565b828452828201116131dd57815f92602092838601378301015290565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b60165481101561510e5760165f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b805482101561510e575f5260205f2001905f90565b359081151582036131dd57565b90600182811c92168015615172575b602083101461515e57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691615153565b5f929181549161518b83615144565b80835292600181169081156151e057506001146151a757505050565b5f9081526020812093945091925b8383106151c6575060209250010190565b6001816020929493945483858701015201910191906151b5565b915050602093945060ff929192191683830152151560051b010190565b519081151582036131dd57565b91908260409103126131dd576152246020835193016151fd565b90565b61522493926001600160a01b03606093168252602082015281604082015201906150d2565b916020908281520191905f5b8181106152655750505090565b9091926020806001926001600160a01b0361527f88614f50565b168152019401929101615258565b919081101561510e5760051b0190565b356001600160a01b03811681036131dd5790565b9190820391821161478f57565b801561478f575f190190565b3561ffff811681036131dd5790565b3563ffffffff811681036131dd5790565b5f5b8281106152f857505050565b5f828201556001016152ec565b91601f8211615314575b505050565b80821161532057505050565b61534b925f5260205f20916020601f830160051c921061534d575b601f82910160051c0391016152ea565b565b5f915061533b565b359063ffffffff821682036131dd57565b908160209103126131dd575190565b92919261538182615073565b9161538f6040519384615052565b8294818452818301116131dd578281602093845f96015e010152565b9080601f830112156131dd57815161522492602001615375565b60208091604051928184925191829101835e8101600d81520301902090565b3d1561540e573d906153f582615073565b916154036040519384615052565b82523d5f602084013e565b606090565b51906fffffffffffffffffffffffffffffffff821682036131dd57565b906001600160a01b036002541680156154b557604051637c50309f60e01b81526001600160a01b039390931660048401526024830191909152602090829060449082905afa908115614193575f91615486575090565b90506020813d6020116154ad575b816154a160209383615052565b810103126131dd575190565b3d9150615494565b505f5260086020526001600160a01b0360405f2091165f5260205260405f205490565b916020908281520191905f5b8181106154f15750505090565b90919260208060019261550387615137565b151581520194019291016154e4565b6001600160a01b035f5416330361552557565b63118cdaa760e01b5f523360045260245ffd5b600260015414615549576002600155565b633ee5aeb560e01b5f5260045ffd5b5f516020615f315f395f51905f5281149081156155e7575b506155785750565b6001600160a01b0381165f9081527fb32a45580e424210cc224fe30669ef7eaf28a87c9d3de17b076e20c517357ea6602052604090205460ff16156155ba5750565b6001600160a01b0390633a401ef360e21b5f525f516020615f115f395f51905f526004521660245260445ffd5b5f516020615f515f395f51905f529150145f615570565b90939192905f905f516020615f115f395f51905f52810361580c5750508201916020818403126131dd578035906001600160401b0382116131dd5701926060848403126131dd576040519261565284615037565b84356001600160401b0381116131dd578161566e91870161508e565b84526020850135906001600160401b0382116131dd5761568f91860161508e565b93602084019485526040808501910135815283515115614aa1576001600160a01b036156bb85516153c5565b5416614aa157845180519081151591826157de575b5050614aa15751936157106040516157098161040a86602083016001600160a01b03606092168152604060208201525f60408201520190565b94516153c5565b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055518051806157a5575b50505b6001600160a01b03600454169081615758575050565b813b156131dd576001600160a01b0360445f928360405195869485936351cb857360e11b8552166004840152600160248401525af180156141935761579b575b50565b5f61534b91615052565b60209181839260405194859301835e8101600e8152030190206001600160a01b0382166001600160a01b03198254161790555f8061573f565b6001600160a01b03925060209181839260405194859301835e8101600e815203019020541615155f806156d0565b9394935f516020615ef15f395f51905f52036158cd575083604091810103126131dd5760405192604084018481106001600160401b038211176150235760405261585581614f50565b8452602080850191013581525f516020615f115f395f51905f525f52600760205260405f206001600160a01b0380865116165f5260205260ff60405f20541615614aa157519251604080516001600160a01b039092166020830152818101525f60608201526158c7816080810161040a565b91615742565b939060208114615908575b50506040516158c78161040a85602083016001600160a01b03606092168152604060208201525f60408201520190565b8192945090602091810103126131dd5735915f806158d8565b908015615958578115615950575b80821061593a575090565b906322df051360e11b5f5260045260245260445ffd5b90508061592f565b50505f90565b5f19811461478f5760010190565b939592919091845f52600760205260405f206001600160a01b0384165f5260205260405f20600160ff19825416179055845f52600960205260405f208054600160401b811015615023576159ca816159e99360018894018155615122565b9091906001600160a01b038084549260031b9316831b921b1916179055565b845f52600960205260405f2054855f52600a60205260405f206001600160a01b0385165f5260205260405f2055845f52600c60205260405f206001600160a01b0384165f5260205260405f20916001600160401b03821161502357615a52826108558554615144565b5f90601f8311600114615b6f579180615a8a926001600160a01b039695945f92613a4e5750508160011b915f199060031b1c19161790565b90555b16805f52601060205260405f20615aa4815461595e565b9055805f52600f60205260405f20805494600160401b861015615023576001600160a01b0360a49486615ae36120af8a5f97600160209d018155615122565b905588615b54575b816002541692604051998a988997634f4849ed60e11b895260048901526024880152604487015260648601521660848401525af1801561419357615b2c5750565b6157989060203d602011615b4d575b615b458183615052565b810190615366565b503d615b3b565b86845260088852604084208585528852886040852055615aeb565b601f19831691845f5260205f20925f5b818110615bc557509160019391856001600160a01b039897969410615bac575b505050811b019055615a8d565b01355f19600384901b60f8161c191690555f8080615b9f565b91936020600181928787013581550195019201615b7f565b91908201916040818403126131dd5780359260208201356001600160401b0381116131dd57615c0c920161508e565b916001600160a01b0360055416604051916353f10a4b60e01b8352602083600481855afa928315614193575f93615d1d575b50825f82805b615cfa575010615ceb57602093615c8860405196879586948594637e1e14c760e11b86526004860152602485015260448401526080606484015260848301906150d2565b03915afa908115614193575f91615cb1575b5015615ca257565b63eeee2fe160e01b5f5260045ffd5b90506020813d602011615ce3575b81615ccc60209383615052565b810103126131dd57615cdd906151fd565b5f615c9a565b3d9150615cbf565b630897acc560e11b5f5260045ffd5b91505f19820182811161478f57615d14921691829161595e565b91859291615c44565b9092506020813d602011615d49575b81615d3960209383615052565b810103126131dd5751915f615c3e565b3d9150615d2c565b6001600160a01b03805f549216918282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b805f52600a60205260405f206001600160a01b0383165f5260205260405f2054801561530f57815f52600960205260405f20905f19810181811161478f5782545f19810190811161478f57808203615e44575b50505080548015615e30575f190190615dfa8282615122565b6001600160a01b0382549160031b1b19169055555f52600a6020526001600160a01b0360405f2091165f526020525f6040812055565b634e487b7160e01b5f52603160045260245ffd5b6159ca916001600160a01b03615e5d615e6e9387615122565b90549060031b1c1692839186615122565b835f52600a6020526001600160a01b0360405f2091165f5260205260405f20555f8080615de1565b90615eba5750805115615eab57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580615ee7575b615ecb575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b15615ec356fe0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3ae94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0742024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70ea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/core/variables/ReputationSystemABI.md b/api/@aastar/core/variables/ReputationSystemABI.md index f70d56f68..69f9acdc8 100644 --- a/api/@aastar/core/variables/ReputationSystemABI.md +++ b/api/@aastar/core/variables/ReputationSystemABI.md @@ -1,3 +1,3 @@ > `const` **ReputationSystemABI**: `any` -Defined in: [packages/core/src/abis/index.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L77) +Defined in: [packages/core/src/abis/index.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L115) diff --git a/api/@aastar/core/variables/ReputationSystemArtifact.md b/api/@aastar/core/variables/ReputationSystemArtifact.md index d272a5859..50a7a7c59 100644 --- a/api/@aastar/core/variables/ReputationSystemArtifact.md +++ b/api/@aastar/core/variables/ReputationSystemArtifact.md @@ -1,6 +1,6 @@ > `const` **ReputationSystemArtifact**: `object` = `ReputationSystemABIData` -Defined in: [packages/core/src/abis/index.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L78) +Defined in: [packages/core/src/abis/index.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L116) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:78](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60a0604052346102c557604051601f61231c38819003918201601f19168301916001600160401b0383118484101761029e578084926020946040528339810103126102c557516001600160a01b038116908190036102c55733156102b2575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360809081526040519081016001600160401b0381118282101761029e57604052600a81526020810160018152604082019060648252604051926040840184811060018060401b0382111761029e576040526007845266111959985d5b1d60ca1b60208501526060810184905251600355516004555160055580516001600160401b03811161029e57600654600181811c91168015610294575b602082101461028057601f8111610212575b50602091601f82116001146101b2579181925f926101a7575b50508160011b915f199060031b1c1916176006555b60405161205290816102ca8239608051818181610a1d01528181610d920152818161175201526117d10152f35b015190505f80610165565b601f1982169260065f52805f20915f5b8581106101fa575083600195106101e2575b505050811b0160065561017a565b01515f1960f88460031b161c191690555f80806101d4565b919260206001819286850151815501940192016101c2565b8181111561014c5760065f52601f820160051c7ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f60208410610278575b81601f9101920160051c03905f5b82811061026b57505061014c565b5f8282015560010161025d565b5f915061024f565b634e487b7160e01b5f52602260045260245ffd5b90607f169061013a565b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b146117a757508063097f6b7c146116165780632f4468811461144957806330cd71a81461134a5780633425bfae146112dc5780634a2357b91461126757806354fd4d50146112085780636df80b4e14610d40578063715018a614610cc457806374f9924414610c345780638da5cb5b14610c025780638dbda2eb14610bbd5780639172ff45146108f45780639c4b3436146107a6578063a00e8f8114610737578063a981c9f5146106d3578063bcd3697c146105c5578063ce26b0e014610503578063cf1c5456146104be578063f2fde38b146103ee578063fb42a9bf14610393578063fc193b49146103435763ff61c64e1461011b575f80fd5b34610340576101293661183b565b50909173ffffffffffffffffffffffffffffffffffffffff8192168082526002602052604082206040518082602082945493848152019086526020862092865b81811061032757505061017e925003826118fe565b80511561031957818352600160205261019a6040842091611c2e565b5183526020526101ac60408320611c4f565b9260208451940151915b835260076020526040832054928315610309575b948573ffffffffffffffffffffffffffffffffffffffff600b549216965b82811061020d5750505060809450604051938452602084015260408301526060820152f35b6024602073ffffffffffffffffffffffffffffffffffffffff61022f84611bbc565b90549060031b1c16604051928380927f70a082310000000000000000000000000000000000000000000000000000000082528d60048301525afa8391816102d2575b50610280575b506001016101e8565b61028b575b5f610277565b926102ca60019173ffffffffffffffffffffffffffffffffffffffff6102b087611bbc565b90549060031b1c1684526009602052604084205490611cc8565b939050610285565b9091506020813d8211610301575b816102ed602093836118fe565b810103126102fd5751905f610271565b5f80fd5b3d91506102e0565b670de0b6b3a764000093506101ca565b5060035492600454916101b6565b8454835260019485019486945060209093019201610169565b80fd5b50346103405760206003193601126103405760043590600b5482101561034057602073ffffffffffffffffffffffffffffffffffffffff61038384611bbc565b90549060031b1c16604051908152f35b50346103405760406003193601126103405773ffffffffffffffffffffffffffffffffffffffff60406103c46117f5565b92826103ce611818565b9416815260086020522091165f52602052602060405f2054604051908152f35b50346103405760206003193601126103405773ffffffffffffffffffffffffffffffffffffffff61041d6117f5565b610425611fd0565b1680156104925773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b503461034057602060031936011261034057604060209173ffffffffffffffffffffffffffffffffffffffff6104f26117f5565b168152600983522054604051908152f35b50346103405760206003193601126103405773ffffffffffffffffffffffffffffffffffffffff6105326117f5565b168152600260205260408120604051908160208254918281520190819285526020852090855b8181106105af575050508261056e9103836118fe565b604051928392602084019060208552518091526040840192915b818110610596575050500390f35b8251845285945060209384019390920191600101610588565b8254845260209093019260019283019201610558565b5034610340578060031936011261034057600354600454916005546040519180600654906105f282611a87565b808652916001811690811561068e575060011461062d575b50509061061d83610629949303836118fe565b60405194859485611b96565b0390f35b600681527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f94939250905b808210610672575091925090820160200161061d8361060a565b9192936001816020925483858901015201910190939291610658565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208088019190915292151560051b8601909201925061061d915084905061060a565b5034610340576040600319360112610340576106ed6117f5565b73ffffffffffffffffffffffffffffffffffffffff168152600260205260408120805460243592908310156103405760206107288484611c01565b90549060031b1c604051908152f35b50346103405760406003193601126103405760409073ffffffffffffffffffffffffffffffffffffffff6107696117f5565b16815260016020528181206024358252602052208054610629600183015492610799600360028301549201611ad8565b9060405194859485611b96565b50346103405773ffffffffffffffffffffffffffffffffffffffff6107ca3661183b565b5091909116918281526002602052604081209260405191826020865491828152019582526020822090825b8181106108de5750505061080f836108d1959603846118fe565b60409485519261081f87856118fe565b60018452601f198701926108368460208701611fb4565b8561084086611c2e565b5261084a85611c2e565b5087519561085889886118fe565b600187526108698560208901611fb4565b519050601f1961089061087b83611921565b926108888b5194856118fe565b808452611921565b013660208301376108a086611c2e565b526108aa85611c2e565b508651926108b888856118fe565b600184523660208501376108cb83611c2e565b52611cd5565b8151908082526020820152f35b82548852602090970196600192830192016107f5565b50346102fd5760c06003193601126102fd5761090e6117f5565b60243567ffffffffffffffff81116102fd5761092e903690600401611939565b60443567ffffffffffffffff81116102fd5761094e9036906004016119b4565b60643567ffffffffffffffff81116102fd5761096e9036906004016119b4565b60a4359067ffffffffffffffff82116102fd5761099261099b9236906004016118b4565b93909486611cd5565b916040918251916109ac84846118fe565b600183526020830191601f198501918236853773ffffffffffffffffffffffffffffffffffffffff6109dd86611c2e565b98168098528551936109ef87866118fe565b60018552602085019336853787610a0586611c2e565b5273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001694853b156102fd57959392919087519687957f1b02e44f00000000000000000000000000000000000000000000000000000000875260a48701905f600489015260a060248901525180915260c4870192905f5b818110610b8e5750505060209060031987840301604488015251918281520193905f5b818110610b75575050506020845f9694601f19601f8684978b97608435606488015260031987870301608488015281865287860137868682860101520116010301925af18015610b6b57610b30575b507fdb8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e29160209151908152a280f35b602091945091610b615f7fdb8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e2946118fe565b5f94915091610b02565b82513d5f823e3d90fd5b8251865288965060209586019590920191600101610ab3565b825173ffffffffffffffffffffffffffffffffffffffff1685528a985060209485019490920191600101610a90565b346102fd5760206003193601126102fd5773ffffffffffffffffffffffffffffffffffffffff610beb6117f5565b165f526007602052602060405f2054604051908152f35b346102fd575f6003193601126102fd57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346102fd5760806003193601126102fd57610c4d6117f5565b60243567ffffffffffffffff81116102fd57610c6d903690600401611939565b9060443567ffffffffffffffff81116102fd57610c8e9036906004016119b4565b906064359167ffffffffffffffff83116102fd57602093610cb6610cbc9436906004016119b4565b92611cd5565b604051908152f35b346102fd575f6003193601126102fd57610cdc611fd0565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102fd5760a06003193601126102fd5760043560243560443560843567ffffffffffffffff81116102fd57610d7a9036906004016118b4565b9073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166040517fa2d0020e000000000000000000000000000000000000000000000000000000008152602081600481855afa80156111ca575f906111d5575b602091506044604051809481937f91d1485400000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156111ca575f9161119b575b50801561117b575b1561111d57335f52600160205260405f20855f5260205260405f20541580611114575b6110af575b604051610e75816118e2565b848152602081018481526040820190606435825267ffffffffffffffff85116110825760405194610eb0601f8201601f1916602001876118fe565b80865236818601116102fd576020815f92600397838a01378701015260608301948552335f52600160205260405f20885f5260205260405f209251835551600183015551600282015501905180519067ffffffffffffffff8211611082578190610f1a8454611a87565b601f8111611029575b50602090601f8311600114610fa9575f92610f9e575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b60405191825260208201527f868a11f79934bfa7243fd979d39bf00f37050e24b3ffc20a11f12a8b7e48d99560403392a3005b015190508680610f39565b5f85815282812093601f1916905b8181106110115750908460019594939210610fda575b505050811b019055610f6b565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055868080610fcd565b92936020600181928786015181550195019301610fb7565b82811115610f2357909150835f5260205f20601f840160051c906020851061107a575b849392601f0160051c82900391015f5b82811061106a575050610f23565b5f8183015585945060010161105c565b5f915061104c565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b335f52600260205260405f20805468010000000000000000811015611082576110dd91600182018155611c01565b81549060031b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88831b921b1916179055610e69565b50831515610e64565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e6f7420417574686f72697a65640000000000000000000000000000000000006044820152fd5b503373ffffffffffffffffffffffffffffffffffffffff5f541614610e41565b6111bd915060203d6020116111c3575b6111b581836118fe565b810190611c16565b86610e39565b503d6111ab565b6040513d5f823e3d90fd5b506020813d602011611200575b816111ef602093836118fe565b810103126102fd5760209051610dee565b3d91506111e2565b346102fd575f6003193601126102fd576106296040516112296040826118fe565b601081527f52657075746174696f6e2d302e332e3200000000000000000000000000000000602082015260405191829160208352602083019061188f565b346102fd5760406003193601126102fd576112806117f5565b7f21281390931aaf470d02c340b1ca10fabd02c8d7cdd1efcdbb3dc3fe5a0d0749602073ffffffffffffffffffffffffffffffffffffffff602435936112c4611fd0565b1692835f52600782528060405f2055604051908152a2005b346102fd5760406003193601126102fd576112f56117f5565b73ffffffffffffffffffffffffffffffffffffffff611312611818565b91165f52600a60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b346102fd5760406003193601126102fd576113636117f5565b73ffffffffffffffffffffffffffffffffffffffff60243591611384611fd0565b1690815f52600960205260405f2054156113d3575b60207fcde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d82345791835f52600982528060405f2055604051908152a2005b600b5468010000000000000000811015611082577fcde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d8234579161141b82600160209401600b55611bbc565b81549060031b9073ffffffffffffffffffffffffffffffffffffffff87831b921b1916179055915050611399565b346102fd5760206003193601126102fd576114626117f5565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015260208160248173ffffffffffffffffffffffffffffffffffffffff86165afa5f91816115e2575b506115185760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c696420636f6c6c656374696f6e00000000000000000000000000006044820152fd5b1561158457335f52600a60205260405f2073ffffffffffffffffffffffffffffffffffffffff82165f5260205260405f20541561155157005b335f52600a60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f5260205260405f204290555f80f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f446f6573206e6f7420686f6c64204e46540000000000000000000000000000006044820152fd5b9091506020813d60201161160e575b816115fe602093836118fe565b810103126102fd575190836114b5565b3d91506115f1565b346102fd576116243661183b565b9173ffffffffffffffffffffffffffffffffffffffff5f541633148015611708575b156116aa57602073ffffffffffffffffffffffffffffffffffffffff807f6c1649831c4a2bebf79dfe8a2623ce1f5c65c9ab62903600dc011ee60a11c408931693845f526008835260405f208282165f5283528560405f20556040519586521693a3005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e617574686f72697a656400000000000000000000000000000000000000006044820152fd5b506040517fbf28c98a00000000000000000000000000000000000000000000000000000000815233600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156111ca575f91611788575b50611646565b6117a1915060203d6020116111c3576111b581836118fe565b84611782565b346102fd575f6003193601126102fd5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102fd57565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036102fd57565b60031960609101126102fd5760043573ffffffffffffffffffffffffffffffffffffffff811681036102fd579060243573ffffffffffffffffffffffffffffffffffffffff811681036102fd579060443590565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b9181601f840112156102fd5782359167ffffffffffffffff83116102fd57602083818601950101116102fd57565b6080810190811067ffffffffffffffff82111761108257604052565b90601f601f19910116810190811067ffffffffffffffff82111761108257604052565b67ffffffffffffffff81116110825760051b60200190565b9080601f830112156102fd5781359061195182611921565b9261195f60405194856118fe565b82845260208085019360051b8201019182116102fd57602001915b8183106119875750505090565b823573ffffffffffffffffffffffffffffffffffffffff811681036102fd5781526020928301920161197a565b9080601f830112156102fd578135906119cc82611921565b926119da60405194856118fe565b82845260208085019360051b820101908282116102fd5760208101935b828510611a0657505050505090565b843567ffffffffffffffff81116102fd57820184603f820112156102fd57602081013590611a3382611921565b91611a4160405193846118fe565b8083526020808085019260051b84010101918783116102fd57604001905b828210611a77575050508152602094850194016119f7565b8135815260209182019101611a5f565b90600182811c92168015611ace575b6020831014611aa157565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611a96565b9060405191825f825492611aeb84611a87565b8084529360018116908115611b565750600114611b12575b50611b10925003836118fe565b565b90505f9291925260205f20905f915b818310611b3a575050906020611b10928201015f611b03565b6020919350806001915483858901015201910190918492611b21565b60209350611b109592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611b03565b9092608092611bb99594835260208301526040820152816060820152019061188f565b90565b600b54811015611bd457600b5f5260205f2001905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8054821015611bd4575f5260205f2001905f90565b908160209103126102fd575180151581036102fd5790565b805115611bd45760200190565b8051821015611bd45760209160051b010190565b90604051611c5c816118e2565b6060611c836003839580548552600181015460208601526002810154604086015201611ad8565b910152565b81810292918115918404141715611c9b57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b91908201809211611c9b57565b93919290935f935f915b8651831015611e5c5773ffffffffffffffffffffffffffffffffffffffff611d078489611c3b565b5116965f91825b611d188686611c3b565b5151841015611e0d57611da5600191611d3b86611d358a8a611c3b565b51611c3b565b518c5f528360205260405f20905f5260205285611d5a60405f20611c4f565b8a8a82511580611e05575b611db5575b611d9f93611d35611d7e92611d8a94611c3b565b51602083015190611c88565b906040810151808311611dad575b5051611cc8565b90611cc8565b930192611d0e565b91505f611d98565b50505050611d9f89611d8a611d7e89611d358d604051611dd4816118e2565b600354815260045460208201526005546040820152611df36006611ad8565b60608201529594509250509350611d6a565b508315611d65565b60019350611e42670de0b6b3a764000091611e49949b9a93979a9996995f52600760205260405f2054908115611e5457611c88565b0490611cc8565b950191939093611cdf565b839150611c88565b939495505050505f90600b54915b828110611e7657505050565b73ffffffffffffffffffffffffffffffffffffffff611e9482611bbc565b90549060031b1c1673ffffffffffffffffffffffffffffffffffffffff8316805f52600a60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f20548015159081611f9c575b50611efa575b5050600101611e6a565b604051907f70a082310000000000000000000000000000000000000000000000000000000082526004820152602081602481855afa5f9181611f69575b5015611ef057611f48575b80611ef0565b60019195611f62915f52600960205260405f205490611cc8565b9490611f42565b9091506020813d8211611f94575b81611f84602093836118fe565b810103126102fd5751905f611f37565b3d9150611f77565b905062093a808101809111611c9b574210155f611eea565b5f5b828110611fc257505050565b606082820152602001611fb6565b73ffffffffffffffffffffffffffffffffffffffff5f54163303611ff057565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea26469706673582212209605ab785653a377b6015b8a9a078efeafd842fddf812cf127c38edf06a3712d64736f6c63430008210033"` +> **bytecode**: `string` = `"0x60a0604052346102c557604051601f611e4e38819003918201601f19168301916001600160401b0383118484101761029e578084926020946040528339810103126102c557516001600160a01b038116908190036102c55733156102b2575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360809081526040519081016001600160401b0381118282101761029e57604052600a81526020810160018152604082019060648252604051926040840184811060018060401b0382111761029e576040526007845266111959985d5b1d60ca1b60208501526060810184905251600355516004555160055580516001600160401b03811161029e57600654600181811c91168015610294575b602082101461028057601f8111610212575b50602091601f82116001146101b2579181925f926101a7575b50508160011b915f199060031b1c1916176006555b604051611b8490816102ca823960805181818161094c01528181610c9d015281816113af015261142a0152f35b015190505f80610165565b601f1982169260065f52805f20915f5b8581106101fa575083600195106101e2575b505050811b0160065561017a565b01515f1960f88460031b161c191690555f80806101d4565b919260206001819286850151815501940192016101c2565b8181111561014c5760065f52601f820160051c7ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f60208410610278575b81601f9101920160051c03905f5b82811061026b57505061014c565b5f8282015560010161025d565b5f915061024f565b634e487b7160e01b5f52602260045260245ffd5b90607f169061013a565b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b1461140d57508063097f6b7c1461130c5780632f4468811461121e57806330cd71a81461110c5780633425bfae146110b85780634a2357b91461105057806354fd4d5014610ff15780635db8b75b14610fd65780636df80b4e14610c16578063715018a614610bb257806374f9924414610b225780638da5cb5b14610afd5780638dbda2eb14610ac55780639172ff45146107fd5780639c4b3436146106bb578063a00e8f8114610659578063a981c9f514610602578063bcd3697c14610512578063ce26b0e01461045d578063cf1c545614610425578063f2fde38b14610392578063fb42a9bf14610344578063fc193b49146103015763ff61c64e14610126575f80fd5b346102fe576101343661147a565b5090916001600160a01b038192168082526002602052604082206040518082602082945493848152019086526020862092865b8181106102e557505061017c92500382611522565b8051156102d757818352600160205261019860408420916117f4565b5183526020526101aa60408320611815565b9260208451940151915b8352600760205260408320549283156102c7575b94856001600160a01b03600b549216965b8281106101fe5750505060809450604051938452602084015260408301526060820152f35b602460206001600160a01b036102138461179b565b90549060031b1c16604051928380926370a0823160e01b82528d60048301525afa839181610290575b5061024b575b506001016101d9565b610256575b5f610242565b926102886001916001600160a01b0361026e8761179b565b90549060031b1c1684526009602052604084205490611875565b939050610250565b9091506020813d82116102bf575b816102ab60209383611522565b810103126102bb5751905f61023c565b5f80fd5b3d915061029e565b670de0b6b3a764000093506101c8565b5060035492600454916101b4565b8454835260019485019486945060209093019201610167565b80fd5b50346102fe5760203660031901126102fe5760043590600b548210156102fe5760206001600160a01b036103348461179b565b90549060031b1c16604051908152f35b50346102fe5760403660031901126102fe576001600160a01b03604061036861144e565b9282610372611464565b9416815260086020522091165f52602052602060405f2054604051908152f35b50346102fe5760203660031901126102fe576001600160a01b036103b461144e565b6103bc611b51565b16801561041157815473ffffffffffffffffffffffffffffffffffffffff198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b50346102fe5760203660031901126102fe5760406020916001600160a01b0361044c61144e565b168152600983522054604051908152f35b50346102fe5760203660031901126102fe576001600160a01b0361047f61144e565b168152600260205260408120604051908160208254918281520190819285526020852090855b8181106104fc57505050826104bb910383611522565b604051928392602084019060208552518091526040840192915b8181106104e3575050500390f35b82518452859450602093840193909201916001016104d5565b82548452602090930192600192830192016104a5565b50346102fe57806003193601126102fe576003546004549160055460405191806006549061053f8261169d565b80865291600181169081156105db575060011461057a575b50509061056a8361057694930383611522565b60405194859485611775565b0390f35b600681527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f94939250905b8082106105bf575091925090820160200161056a83610557565b91929360018160209254838589010152019101909392916105a5565b60ff191660208088019190915292151560051b8601909201925061056a9150849050610557565b50346102fe5760403660031901126102fe5761061c61144e565b6001600160a01b03168152600260205260408120805460243592908310156102fe57602061064a84846117c7565b90549060031b1c604051908152f35b50346102fe5760403660031901126102fe576040906001600160a01b0361067e61144e565b168152600160205281812060243582526020522080546105766001830154926106ae6003600283015492016116d5565b9060405194859485611775565b50346102fe576001600160a01b036106d23661147a565b5091909116918281526002602052604081209260405191826020865491828152019582526020822090825b8181106107e757505050610717836107da95960384611522565b6040948551926107278785611522565b60018452601f1987019261073e8460208701611b35565b85610748866117f4565b52610752856117f4565b508751956107608988611522565b600187526107718560208901611b35565b51905061077d81611544565b9061078a89519283611522565b808252610799601f1991611544565b013660208301376107a9866117f4565b526107b3856117f4565b508651926107c18885611522565b600184523660208501376107d4836117f4565b52611882565b8151908082526020820152f35b82548852602090970196600192830192016106fd565b50346102bb5760c03660031901126102bb5761081761144e565b60243567ffffffffffffffff81116102bb5761083790369060040161155c565b60443567ffffffffffffffff81116102bb576108579036906004016115ca565b60643567ffffffffffffffff81116102bb576108779036906004016115ca565b906084359160a4359067ffffffffffffffff82116102bb576108a06108a99236906004016114d8565b93909587611882565b926040928351926108ba8585611522565b600184526020840192601f19860192833686376001600160a01b036108de876117f4565b99168099528651946108f08887611522565b60018652602086019436863788610906876117f4565b5287516020810190606082526002608082015261525360f01b60a08201528b8a82015283606082015260a0815261093e60c082611522565b519020956001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001696873b156102bb578951631b02e44f60e01b8152600481019190915260a06024820152975160a4890181905288969594939260c4880192915f5b818110610aa35750505060209060031988840301604489015251918281520194905f5b818110610a8a57505050845f969484829589956020956064860152600319858503016084860152818452858401378181018401859052601f01601f1916010301925af18015610a8057610a45575b507fdb8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e29160209151908152a280f35b602091945091610a765f7fdb8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e294611522565b5f94915091610a17565b82513d5f823e3d90fd5b82518752899750602096870196909201916001016109c9565b82516001600160a01b031685528b9950602094850194909201916001016109a6565b346102bb5760203660031901126102bb576001600160a01b03610ae661144e565b165f526007602052602060405f2054604051908152f35b346102bb575f3660031901126102bb5760206001600160a01b035f5416604051908152f35b346102bb5760803660031901126102bb57610b3b61144e565b60243567ffffffffffffffff81116102bb57610b5b90369060040161155c565b9060443567ffffffffffffffff81116102bb57610b7c9036906004016115ca565b906064359167ffffffffffffffff83116102bb57602093610ba4610baa9436906004016115ca565b92611882565b604051908152f35b346102bb575f3660031901126102bb57610bca611b51565b5f805473ffffffffffffffffffffffffffffffffffffffff19811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102bb5760a03660031901126102bb5760043560243560443560643560843567ffffffffffffffff81116102bb57610c539036906004016114d8565b91604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610fcb575f91610f9c575b501580610f88575b610f795761271085118015610f6e575b8015610f62575b610f5357335f52600160205260405f20865f5260205260405f20541580610f4a575b610f03575b60405190610d2082611506565b858252602082018581526040830191825267ffffffffffffffff8511610eef5760405194610d58601f8201601f191660200187611522565b80865236818601116102bb576020815f92600397838a01378701015260608301948552335f52600160205260405f20885f5260205260405f209251835551600183015551600282015501905180519067ffffffffffffffff8211610eef578190610dc2845461169d565b601f8111610e96575b50602090601f8311600114610e33575f92610e28575b50508160011b915f199060031b1c19161790555b60405191825260208201527f868a11f79934bfa7243fd979d39bf00f37050e24b3ffc20a11f12a8b7e48d99560403392a3005b015190508680610de1565b5f8581528281209350601f198516905b818110610e7e5750908460019594939210610e66575b505050811b019055610df5565b01515f1960f88460031b161c19169055868080610e59565b92936020600181928786015181550195019301610e43565b82811115610dcb57909150835f5260205f20601f840160051c9060208510610ee7575b849392601f0160051c82900391015f5b828110610ed7575050610dcb565b5f81830155859450600101610ec9565b5f9150610eb9565b634e487b7160e01b5f52604160045260245ffd5b335f52600260205260405f20805468010000000000000000811015610eef57610f31916001820181556117c7565b81549060031b9088821b915f19901b1916179055610d13565b50841515610d0e565b63b4fa3fb360e01b5f5260045ffd5b50620186a08111610cec565b506127108411610ce5565b63ea8e4eb560e01b5f5260045ffd5b50336001600160a01b035f54161415610cd5565b610fbe915060203d602011610fc4575b610fb68183611522565b8101906117dc565b87610ccd565b503d610fac565b6040513d5f823e3d90fd5b346102bb575f3660031901126102bb57602060405160328152f35b346102bb575f3660031901126102bb57610576604051611012604082611522565b601081527f52657075746174696f6e2d302e332e320000000000000000000000000000000060208201526040519182916020835260208301906114b4565b346102bb5760403660031901126102bb5761106961144e565b7f21281390931aaf470d02c340b1ca10fabd02c8d7cdd1efcdbb3dc3fe5a0d074960206001600160a01b03602435936110a0611b51565b1692835f52600782528060405f2055604051908152a2005b346102bb5760403660031901126102bb576110d161144e565b6001600160a01b036110e1611464565b91165f52600a6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102bb5760403660031901126102bb5761112561144e565b6001600160a01b0360243591611139611b51565b1690811561120f57815f52600960205260405f20541561118e575b60207fcde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d82345791835f52600982528060405f2055604051908152a2005b600b5460328110156112005768010000000000000000811015610eef577fcde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d823457916111df82600160209401600b5561179b565b81549060031b906001600160a01b0387831b921b1916179055915050611154565b6310acf9a960e31b5f5260045ffd5b63e6c4247b60e01b5f5260045ffd5b346102bb5760203660031901126102bb5761123761144e565b6040516370a0823160e01b81523360048201526020816024816001600160a01b0386165afa5f91816112d8575b506112785763517172a160e11b5f5260045ffd5b156112ca57335f52600a60205260405f206001600160a01b0382165f5260205260405f2054156112a457005b335f52600a6020526001600160a01b0360405f2091165f5260205260405f204290555f80f35b624fa6f360e31b5f5260045ffd5b9091506020813d602011611304575b816112f460209383611522565b810103126102bb57519083611264565b3d91506112e7565b346102bb5761131a3661147a565b916001600160a01b035f541633141580611393575b6113855760206001600160a01b03807f6c1649831c4a2bebf79dfe8a2623ce1f5c65c9ab62903600dc011ee60a11c408931693845f526008835260405f208282165f5283528560405f20556040519586521693a3005b6282b42960e81b5f5260045ffd5b50604051635f9464c560e11b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610fcb575f916113ee575b501561132f565b611407915060203d602011610fc457610fb68183611522565b846113e7565b346102bb575f3660031901126102bb576020906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600435906001600160a01b03821682036102bb57565b602435906001600160a01b03821682036102bb57565b60609060031901126102bb576004356001600160a01b03811681036102bb57906024356001600160a01b03811681036102bb579060443590565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156102bb5782359167ffffffffffffffff83116102bb57602083818601950101116102bb57565b6080810190811067ffffffffffffffff821117610eef57604052565b90601f8019910116810190811067ffffffffffffffff821117610eef57604052565b67ffffffffffffffff8111610eef5760051b60200190565b9080601f830112156102bb5781359061157482611544565b926115826040519485611522565b82845260208085019360051b8201019182116102bb57602001915b8183106115aa5750505090565b82356001600160a01b03811681036102bb5781526020928301920161159d565b9080601f830112156102bb578135906115e282611544565b926115f06040519485611522565b82845260208085019360051b820101908282116102bb5760208101935b82851061161c57505050505090565b843567ffffffffffffffff81116102bb57820184603f820112156102bb5760208101359061164982611544565b916116576040519384611522565b8083526020808085019260051b84010101918783116102bb57604001905b82821061168d5750505081526020948501940161160d565b8135815260209182019101611675565b90600182811c921680156116cb575b60208310146116b757565b634e487b7160e01b5f52602260045260245ffd5b91607f16916116ac565b9060405191825f8254926116e88461169d565b8084529360018116908115611753575060011461170f575b5061170d92500383611522565b565b90505f9291925260205f20905f915b81831061173757505090602061170d928201015f611700565b602091935080600191548385890101520191019091849261171e565b90506020925061170d94915060ff191682840152151560051b8201015f611700565b9092608092611798959483526020830152604082015281606082015201906114b4565b90565b600b548110156117b357600b5f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b80548210156117b3575f5260205f2001905f90565b908160209103126102bb575180151581036102bb5790565b8051156117b35760200190565b80518210156117b35760209160051b010190565b9060405161182281611506565b606061184960038395805485526001810154602086015260028101546040860152016116d5565b910152565b8181029291811591840414171561186157565b634e487b7160e01b5f52601160045260245ffd5b9190820180921161186157565b939290935f938351865180911490811591611b29575b50610f5357925f915b8651831015611a11576001600160a01b036118bc8489611801565b5116965f91825b6118cd8686611801565b51518410156119c25761195a6001916118f0866118ea8a8a611801565b51611801565b518c5f528360205260405f20905f526020528561190f60405f20611815565b8a8a825115806119ba575b61196a575b611954936118ea6119339261193f94611801565b5160208301519061184e565b906040810151808311611962575b5051611875565b90611875565b9301926118c3565b91505f61194d565b505050506119548961193f611933896118ea8d60405161198981611506565b6003548152600454602082015260055460408201526119a860066116d5565b6060820152959450925050935061191f565b50831561191a565b600193506119f7670de0b6b3a7640000916119fe949b9a93979a9996995f52600760205260405f2054908115611a095761184e565b0490611875565b9501919390936118a1565b83915061184e565b939495505050505f90600b54915b828110611a2b57505050565b6001600160a01b03611a3c8261179b565b90549060031b1c166001600160a01b038316805f52600a60205260405f206001600160a01b0383165f5260205260405f20548015159081611b11575b50611a88575b5050600101611a1f565b604051906370a0823160e01b82526004820152602081602481855afa5f9181611ade575b5015611a7e57611abd575b80611a7e565b60019195611ad7915f52600960205260405f205490611875565b9490611ab7565b9091506020813d8211611b09575b81611af960209383611522565b810103126102bb5751905f611aac565b3d9150611aec565b905062093a808101809111611861574210155f611a78565b9050835114155f611898565b5f5b828110611b4357505050565b606082820152602001611b37565b6001600160a01b035f54163303611b6457565b63118cdaa760e01b5f523360045260245ffdfea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/SBT_ADDRESS.md b/api/@aastar/core/variables/SBT_ADDRESS.md index 6ba788333..709ff3a9e 100644 --- a/api/@aastar/core/variables/SBT_ADDRESS.md +++ b/api/@aastar/core/variables/SBT_ADDRESS.md @@ -1,3 +1,3 @@ > **SBT\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L32) +Defined in: [packages/core/src/constants.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L32) diff --git a/api/@aastar/core/variables/SEPOLIA_CONTRACTS.md b/api/@aastar/core/variables/SEPOLIA_CONTRACTS.md index 09ccf8b41..e1c489695 100644 --- a/api/@aastar/core/variables/SEPOLIA_CONTRACTS.md +++ b/api/@aastar/core/variables/SEPOLIA_CONTRACTS.md @@ -1,6 +1,6 @@ > `const` **SEPOLIA\_CONTRACTS**: `object` -Defined in: [packages/core/src/contracts.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contracts.ts#L38) +Defined in: [packages/core/src/contracts.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L38) Sepolia Testnet Contracts @@ -66,6 +66,14 @@ BreadCommunity - Test community for development (registered: 2025-11-03) > `readonly` **core**: `object` = `CORE_ADDRESSES` +#### core.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +#### core.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + #### core.aPNTs > `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` @@ -86,6 +94,10 @@ BreadCommunity - Test community for development (registered: 2025-11-03) > `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` +#### core.microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + #### core.mySBT > `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` diff --git a/api/@aastar/core/variables/SEPOLIA_V2_VERSIONS.md b/api/@aastar/core/variables/SEPOLIA_V2_VERSIONS.md index f24d2a60a..84a1ecd2b 100644 --- a/api/@aastar/core/variables/SEPOLIA_V2_VERSIONS.md +++ b/api/@aastar/core/variables/SEPOLIA_V2_VERSIONS.md @@ -1,6 +1,6 @@ > `const` **SEPOLIA\_V2\_VERSIONS**: `object` -Defined in: [packages/core/src/contract-versions.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L42) +Defined in: [packages/core/src/contract-versions.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L42) V2 Contract Versions on Sepolia diff --git a/api/@aastar/core/variables/SERVICE_FEE_RATE.md b/api/@aastar/core/variables/SERVICE_FEE_RATE.md index 6b395b152..964b6d69a 100644 --- a/api/@aastar/core/variables/SERVICE_FEE_RATE.md +++ b/api/@aastar/core/variables/SERVICE_FEE_RATE.md @@ -1,3 +1,3 @@ > `const` **SERVICE\_FEE\_RATE**: `200` = `200` -Defined in: [packages/core/src/constants.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L80) +Defined in: [packages/core/src/constants.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L86) diff --git a/api/@aastar/core/variables/SUPER_PAYMASTER_ADDRESS.md b/api/@aastar/core/variables/SUPER_PAYMASTER_ADDRESS.md index 39345b639..bd4670450 100644 --- a/api/@aastar/core/variables/SUPER_PAYMASTER_ADDRESS.md +++ b/api/@aastar/core/variables/SUPER_PAYMASTER_ADDRESS.md @@ -1,3 +1,3 @@ > **SUPER\_PAYMASTER\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L34) +Defined in: [packages/core/src/constants.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L34) diff --git a/api/@aastar/core/variables/SessionKeyValidatorABI.md b/api/@aastar/core/variables/SessionKeyValidatorABI.md new file mode 100644 index 000000000..96655dc20 --- /dev/null +++ b/api/@aastar/core/variables/SessionKeyValidatorABI.md @@ -0,0 +1,3 @@ +> `const` **SessionKeyValidatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:192](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L192) diff --git a/api/@aastar/core/variables/SessionKeyValidatorArtifact.md b/api/@aastar/core/variables/SessionKeyValidatorArtifact.md new file mode 100644 index 000000000..b92a7e267 --- /dev/null +++ b/api/@aastar/core/variables/SessionKeyValidatorArtifact.md @@ -0,0 +1,3 @@ +> `const` **SessionKeyValidatorArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `SessionKeyValidatorABIData` + +Defined in: [packages/core/src/abis/index.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L193) diff --git a/api/@aastar/core/variables/SimpleAccountABI.md b/api/@aastar/core/variables/SimpleAccountABI.md index 2b7ccf148..23a1e35eb 100644 --- a/api/@aastar/core/variables/SimpleAccountABI.md +++ b/api/@aastar/core/variables/SimpleAccountABI.md @@ -1,3 +1,3 @@ > `const` **SimpleAccountABI**: `any` -Defined in: [packages/core/src/abis/index.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L60) +Defined in: [packages/core/src/abis/index.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L89) diff --git a/api/@aastar/core/variables/SimpleAccountArtifact.md b/api/@aastar/core/variables/SimpleAccountArtifact.md index fca95892c..f423fafb8 100644 --- a/api/@aastar/core/variables/SimpleAccountArtifact.md +++ b/api/@aastar/core/variables/SimpleAccountArtifact.md @@ -1,6 +1,6 @@ > `const` **SimpleAccountArtifact**: `object` = `SimpleAccountABIData` -Defined in: [packages/core/src/abis/index.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L61) +Defined in: [packages/core/src/abis/index.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L90) ## Type Declaration diff --git a/api/@aastar/core/variables/SimpleAccountFactoryABI.md b/api/@aastar/core/variables/SimpleAccountFactoryABI.md index 8a3131ffc..821bcaaf5 100644 --- a/api/@aastar/core/variables/SimpleAccountFactoryABI.md +++ b/api/@aastar/core/variables/SimpleAccountFactoryABI.md @@ -1,3 +1,3 @@ > `const` **SimpleAccountFactoryABI**: `any` -Defined in: [packages/core/src/abis/index.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L63) +Defined in: [packages/core/src/abis/index.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L92) diff --git a/api/@aastar/core/variables/SimpleAccountFactoryArtifact.md b/api/@aastar/core/variables/SimpleAccountFactoryArtifact.md index 8e7448b12..23c8c618a 100644 --- a/api/@aastar/core/variables/SimpleAccountFactoryArtifact.md +++ b/api/@aastar/core/variables/SimpleAccountFactoryArtifact.md @@ -1,6 +1,6 @@ > `const` **SimpleAccountFactoryArtifact**: `object` = `SimpleAccountFactoryABIData` -Defined in: [packages/core/src/abis/index.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L64) +Defined in: [packages/core/src/abis/index.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L93) ## Type Declaration diff --git a/api/@aastar/core/variables/SuperPaymasterABI.md b/api/@aastar/core/variables/SuperPaymasterABI.md index 655b2b558..5d86ffe29 100644 --- a/api/@aastar/core/variables/SuperPaymasterABI.md +++ b/api/@aastar/core/variables/SuperPaymasterABI.md @@ -1,3 +1,3 @@ > `const` **SuperPaymasterABI**: `any` -Defined in: [packages/core/src/abis/index.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L46) +Defined in: [packages/core/src/abis/index.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L75) diff --git a/api/@aastar/core/variables/SuperPaymasterArtifact.md b/api/@aastar/core/variables/SuperPaymasterArtifact.md index 20d6c50e4..74d468ee7 100644 --- a/api/@aastar/core/variables/SuperPaymasterArtifact.md +++ b/api/@aastar/core/variables/SuperPaymasterArtifact.md @@ -1,13 +1,13 @@ > `const` **SuperPaymasterArtifact**: `object` = `SuperPaymasterABIData` -Defined in: [packages/core/src/abis/index.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L47) +Defined in: [packages/core/src/abis/index.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L76) ## Type Declaration ### abi -> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] ### bytecode -> **bytecode**: `string` = `"0x60e03461027357601f614fc838819003918201601f19168301916001600160401b038311848410176102775780849260e0946040528339810103126102735780516001600160a01b03811691908281036102735761005f6020830161028b565b60408301519091906001600160a01b0381168103610273576100836060850161028b565b906100906080860161028b565b9260c061009f60a0880161028b565b960151966001600160a01b038616908115610260575f80546001600160a01b031981168417825560405193916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a31561022957506080526001805566470de4df8200006009556103e8600d5560a052600280546001600160a01b0319166001600160a01b0392831617905590811660c05282161561022257505b600480546001600160a01b0319166001600160a01b03929092169190911790558015610219575b601155604051614d2890816102a08239608051818181610c4f01528181610d2801528181610dce01528181611376015281816116da0152818161231401528181612af601528181612f13015261384f015260a0518181816102f3015281816108c80152818161141f0152818161181401528181611b0f01528181611d150152818161284d01528181612be60152613576015260c051818181611696015281816124af01526136770152f35b50610e1061016e565b9050610147565b62461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908115b9d1c9e541bda5b9d60721b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036102735756fe60806040526004361015610011575f80fd5b5f5f3560e01c80630396cb601461381f578063058ae10f1461359a57806306433b1b14613556578063079d2d421461306e57806313e7c9d814612f90578063205c287814612ee65780632e1a7d4d14612dab5780632f4f21e214612b985780633272668414612b7857806339788cd914612b5757806352b7512c14612aae578063539f51db14612a9157806354fd4d5014612a3057806358a2570a146129d9578063594a6f23146129bb5780635f4cd4fe146127e657806360f28de6146127ca57806361ad446e146127ac57806361d027b3146127855780636640431f1461272357806366c36875146126eb578063673a7e28146124945780636d8a4aff1461246d578063715018a6146123fc57806374f053c4146123d5578063787dce3d146123755780637af3816c146123575780637c627b21146122c4578063847807f214611ce657806388a7ca5c14611a845780638da5cb5b14611a5e5780638e580213146119bc57806396daa3221461199e578063a134d63a1461187f578063a3970ae6146117fa578063a4b5328f146116fe578063b0d691fe146116ba578063b0f0abe914611676578063b6b55f25146113f8578063b8ca3b83146113db578063bb9fe6bf14611352578063bc959101146112d1578063bd111870146112b3578063bfa5a1eb14610f58578063c06f58e814610f31578063c1d9cb0814610e47578063c23a5cea14610da1578063c399ec8814610cda578063d0e30db014610c30578063d20727d714610ba4578063ddc380d814610b87578063e1a4521814610b6a578063e8ade1a914610a99578063eafe74b51461085d578063ec2123f1146107d8578063ede31502146107bc578063f0f4426014610737578063f2fde38b14610681578063f5c91a0814610563578063f60fdcb31461051c578063f7e8cb0d146104df5763fc347007146102c4575f80fd5b346104dc5760206003193601126104dc5760043565ffffffffffff8116908181036104da576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166040517f10fdfea7000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156104cf578591610497575b506040517f91d1485400000000000000000000000000000000000000000000000000000000815260048101919091523360248201529060209082908180604481015b03915afa90811561048c57849161045d575b501561043557338352600560205260016040842001907fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff7dffffffffffff00000000000000000000000000000000000000000000000083549260c01b1691161790556040519081527f4419a541734858dec04cd4ea31aff7b399a0b82dc61f30cc777c1907dc8102ed60203392a280f35b6004837f82b42900000000000000000000000000000000000000000000000000000000008152fd5b61047f915060203d602011610485575b6104778183613a68565b810190613d82565b5f6103a4565b503d61046d565b6040513d86823e3d90fd5b90506020813d6020116104c7575b816104b260209383613a68565b810103126104c35751610392610350565b5f80fd5b3d91506104a5565b6040513d87823e3d90fd5b825b80fd5b50346104dc5760206003193601126104dc5760ff60406020926001600160a01b03610508613903565b168152600784522054166040519015158152f35b50346104dc57806003193601126104dc576080600a5460ff600b54600c5490604051938452602084015269ffffffffffffffffffff8116604084015260501c166060820152f35b50346104dc5760406003193601126104dc5761057d613903565b60243590610589614813565b63ffffffff8211610623576001600160a01b0316808352600560209081526040842060010180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff1660a085901b77ffffffff00000000000000000000000000000000000000001617905590917ffc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c8219190604051908152a280f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f53636f726520657863656564732075696e7433320000000000000000000000006044820152fd5b50346104dc5760206003193601126104dc576001600160a01b036106a3613903565b6106ab614813565b16801561070b576001600160a01b038254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b50346104dc5760206003193601126104dc576001600160a01b03610759613903565b610761614813565b168015610794577fffffffffffffffffffffffff0000000000000000000000000000000000000000600454161760045580f35b6004827fe6c4247b000000000000000000000000000000000000000000000000000000008152fd5b50346104dc57806003193601126104dc57602060405160348152f35b50346104dc5760206003193601126104dc576004356107f5614813565b80156108355760407ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d291600954908060095582519182526020820152a180f35b6004827fc52a9bd3000000000000000000000000000000000000000000000000000000008152fd5b50346104dc5760406003193601126104dc57610877613903565b90610880613919565b916001600160a01b03604051917f2c333e2500000000000000000000000000000000000000000000000000000000835216928360048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa918215610a1e578392610a5e575b506001600160a01b0316604051937f9a78e72e0000000000000000000000000000000000000000000000000000000085526004850152602084602481845afa938415610a1e578394610a29575b50926020600494604051958680927f3ba0b9a90000000000000000000000000000000000000000000000000000000082525afa938415610a1e5783946109ea575b50670de0b6b3a7640000810290808204670de0b6b3a764000014901517156109d6576020936109b491613edc565b90818111156109cf576109c79250613bfb565b604051908152f35b50506109c7565b602483634e487b7160e01b81526011600452fd5b9093506020813d602011610a16575b81610a0660209383613a68565b810103126104c35751925f610986565b3d91506109f9565b6040513d85823e3d90fd5b93506020843d602011610a56575b81610a4460209383613a68565b810103126104c3579251926020610945565b3d9150610a37565b9091506020813d602011610a91575b81610a7a60209383613a68565b810103126104c35751906001600160a01b036108f8565b3d9150610a6d565b50346104dc576001600160a01b03610ab036613bcc565b9190610aba614813565b169081835260056020526040832080547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dff000000000000000000000000000000000000000000000000000000000084151560e81b1691161790555f14610b43577fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da8280a280f35b7fae02c1bd695006b6d891af37fdeefea45a10ebcc17071e3471787db4f17728858280a280f35b50346104dc57806003193601126104dc5760206040516127108152f35b50346104dc57806003193601126104dc5760206040516103e88152f35b50346104dc5760206003193601126104dc576001600160a01b03610bc6613903565b610bce614813565b168015610794576001600160a01b03600254827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600255167f75f4cc3f3f70100dc11e396f47f8af2dec5cf7ec94e06062222be779cf2f3dec8380a380f35b50806003193601126104dc57610c44614813565b806001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b15610cd75781602491604051928380927fb760faf900000000000000000000000000000000000000000000000000000000825230600483015234905af18015610ccc57610cbb5750f35b81610cc591613a68565b6104dc5780f35b6040513d84823e3d90fd5b50fd5b50346104dc57806003193601126104dc57604051907f70a082310000000000000000000000000000000000000000000000000000000082523060048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610d955790610d62575b602090604051908152f35b506020813d602011610d8d575b81610d7c60209383613a68565b810103126104c35760209051610d57565b3d9150610d6f565b604051903d90823e3d90fd5b50346104dc5760206003193601126104dc5780610dbc613903565b610dc4614813565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610e43576001600160a01b03602484928360405195869485937fc23a5cea0000000000000000000000000000000000000000000000000000000085521660048401525af18015610ccc57610cbb5750f35b5050fd5b50346104dc5760206003193601126104dc576001600160a01b03610e69613903565b826080604051610e7881613a4c565b8281528260208201528260408201526060808201520152168082526008602052604082205415610f095780825260086020526040822090825260086020526040822054915f198301928311610ef557610ef1610edd610ed785856139b7565b506145d2565b604051918291602083526020830190613b85565b0390f35b80634e487b7160e01b602492526011600452fd5b6004827fe0a1dc31000000000000000000000000000000000000000000000000000000008152fd5b50346104dc57806003193601126104dc5760206001600160a01b03600e5416604051908152f35b50346104dc5760806003193601126104dc5780610f73613903565b6024356003811015610e4357604435916064359067ffffffffffffffff82116112af576001600160a01b037fa7503227727e36abb7f0ecf24f626347ccc20233c48c554d49d7d2077a1a304060407ffc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c821966020966110f0610ffc63ffffffff9836906004016138d5565b969097611007614813565b169a8b9687825260058b52858220988261102086613b67565b856111f157506110d79087600a945b60018d019c8d8f8890825460a01c16115f146111c6578f906110606110a8928a1663ffffffff835460a01c16614621565b7fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff000000000000000000000000000000000000000083549260a01b169116179055565b89611112575b508b815260088f5220928851946110c486613a4c565b428652888f870152898601523691613d1a565b60608301526110e584613b67565b83608083015261463b565b82519182526110fe81613b67565b87820152a25460a01c16604051908152a280f35b80546fffffffffffffffffffffffffffffffff168a811061118c57506fffffffffffffffffffffffffffffffff61114e818c1682845416613d50565b167fffffffffffffffffffffffffffffffff0000000000000000000000000000000082541617905561118289601054613dcc565b6010555b5f6110ae565b817fffffffffffffffffffffffffffffffff000000000000000000000000000000006111be9354169055601054613dcc565b601055611186565b7fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff81541690556110a8565b6111fa86613b67565b6001860361121057506110d7908760149461102f565b9261121a86613b67565b8a60028714611230575b5090876110d79261102f565b935090876110d7927d0100000000000000000000000000000000000000000000000000000000007fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6032975416178d558b7fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da8280a2919250508a611224565b8480fd5b50346104dc57806003193601126104dc576020601154604051908152f35b50346104dc5760206003193601126104dc576112eb613903565b6112f3614813565b6001600160a01b0380600e54921691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600e55167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b50346104dc57806003193601126104dc5761136b614813565b806001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b15610cd7578180916004604051809481937fbb9fe6bf0000000000000000000000000000000000000000000000000000000083525af18015610ccc57610cbb5750f35b50346104dc57806003193601126104dc5760206040516107d08152f35b50346104dc5760206003193601126104dc57600435611415614852565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166040517f10fdfea7000000000000000000000000000000000000000000000000000000008152602081600481855afa90811561048c578491611642575b506040517f91d1485400000000000000000000000000000000000000000000000000000000815260048101919091523360248201529060209082908180604481015b03915afa908115610a1e578391611623575b50156115fb576114ef816001600160a01b03600254163090339061490a565b6fffffffffffffffffffffffffffffffff811161159c573382526005602052604082206fffffffffffffffffffffffffffffffff61153281841682845416613d9a565b167fffffffffffffffffffffffffffffffff0000000000000000000000000000000082541617905561156681600f54613dcc565b600f556040519081527f06653c045d0a3144153a51ac6909baae43b8d5b67184cb74e988b72858727fe460203392a26001805580f35b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f416d6f756e7420657863656564732075696e74313238000000000000000000006044820152606490fd5b6004827f82b42900000000000000000000000000000000000000000000000000000000008152fd5b61163c915060203d602011610485576104778183613a68565b5f6114d0565b90506020813d60201161166e575b8161165d60209383613a68565b810103126104c357516114be61147c565b3d9150611650565b50346104dc57806003193601126104dc5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346104dc57806003193601126104dc5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346104dc5760406003193601126104dc57611718613903565b602435611723614813565b61172b614852565b6001600160a01b0382169182156117d2576010548083116117aa579161179c81602093611779827ff7595c4fd7fa675e456dd9520ac8266c06d237d52900fc573bccc85b7c177c9e97613bfb565b60105561178882600f54613bfb565b600f556001600160a01b036002541661488b565b604051908152a26001805580f35b6004857fb4aa8063000000000000000000000000000000000000000000000000000000008152fd5b6004847fe6c4247b000000000000000000000000000000000000000000000000000000008152fd5b50346104dc5761180936613bcc565b906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610435576001600160a01b031682526007602052604082209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008354169115151617905580f35b50346104dc5760206003193601126104dc576001600160a01b036118a1613903565b168152600860205260408120805467ffffffffffffffff811161198a57604051906118d260208260051b0183613a68565b80825260208201809385526020852085915b83831061196c57868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061192157505050500390f35b9193602061195c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613b85565b9601920192018594939192611912565b6005602060019261197c856145d2565b8152019201920191906118e4565b602483634e487b7160e01b81526041600452fd5b50346104dc57806003193601126104dc576020600d54604051908152f35b50346104dc5760406003193601126104dc576119d6613903565b6001600160a01b036024359116825260086020526040822080548210156104da57611a0192506139b7565b508054600182015491611a4b60028201549160ff6004611a2360038401613aa9565b920154169260405195869586526020860152604085015260a0606085015260a0840190613943565b90611a5581613b67565b60808301520390f35b50346104dc57806003193601126104dc576001600160a01b036020915416604051908152f35b50346104dc5760806003193601126104dc57611a9e613903565b50611aa7613919565b6044359060643567ffffffffffffffff8111611ce257611acb9036906004016138d5565b5050611ad5614852565b6001600160a01b03600254163303610435576040517f10fdfea70000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082600481845afa80156104cf5783928691611caa575b506040517f91d1485400000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b03929092166024830152602090829060449082905afa90811561048c578491611c8b575b5015610435576fffffffffffffffffffffffffffffffff821161159c577f06653c045d0a3144153a51ac6909baae43b8d5b67184cb74e988b72858727fe49160406001600160a01b03602093169485815260058452206fffffffffffffffffffffffffffffffff611c1f81841682845416613d9a565b167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055611c5381600f54613dcc565b600f55604051908152a26001805560206040517f88a7ca5c000000000000000000000000000000000000000000000000000000008152f35b611ca4915060203d602011610485576104778183613a68565b5f611ba9565b9250506020823d602011611cda575b81611cc660209383613a68565b810103126104c35790518291906020611b4f565b3d9150611cb9565b8380fd5b50346104dc5760606003193601126104dc57611d00613903565b611d08613919565b6044356001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166040517f10fdfea7000000000000000000000000000000000000000000000000000000008152602081600481855afa90811561223f578691612291575b506040517f91d148540000000000000000000000000000000000000000000000000000000081526004810191909152336024820152602081604481855afa90811561223f578691612272575b501561224a576040517fa2d0020e000000000000000000000000000000000000000000000000000000008152602081600481855afa90811561223f57869161220b575b506040517f91d1485400000000000000000000000000000000000000000000000000000000815260048101919091523360248201529060209082908180604481015b03915afa9081156104cf5785916121ec575b50156121c4576001600160a01b03831691821580156121b3575b80156121ab575b612183576001600160a01b036003541680611fb9575b507fff8a1775e676e9fe3cc41088a092f762a9c36c13098d2a9c6a02d1814e0ecbd7923386526005602052604086209060018201907fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055600281016001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557c010000000000000000000000000000000000000000000000000000000081547fffffff00000000000000000000000000ffffffffffffffffffffffffffffffff7bffffffffffffffffffffffff000000000000000000000000000000008660801b16911617179055611fb36040519283923396846001600160a01b036040929594938160608401971683521660208201520152565b0390a280f35b6020602491604051928380927fb8d7b6690000000000000000000000000000000000000000000000000000000082523360048301525afa86918161213b575b506120815760846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f53656375726974793a20466163746f727920766572696669636174696f6e206660448201527f61696c65640000000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b03849116036120b7577fff8a1775e676e9fe3cc41088a092f762a9c36c13098d2a9c6a02d1814e0ecbd7611e8c565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f53656375726974793a20496e76616c69642078504e5473546f6b656e20666f7260448201527f207468697320436f6d6d756e69747900000000000000000000000000000000006064820152fd5b9091506020813d60201161217b575b8161215760209383613a68565b8101031261217757516001600160a01b038116810361217757905f611ff8565b8680fd5b3d915061214a565b6004857fc52a9bd3000000000000000000000000000000000000000000000000000000008152fd5b508115611e76565b506001600160a01b03811615611e6f565b6004847f82b42900000000000000000000000000000000000000000000000000000000008152fd5b612205915060203d602011610485576104778183613a68565b5f611e55565b90506020813d602011612237575b8161222660209383613a68565b810103126104c35751611e43611e01565b3d9150612219565b6040513d88823e3d90fd5b6004857f82b42900000000000000000000000000000000000000000000000000000000008152fd5b61228b915060203d602011610485576104778183613a68565b5f611dbe565b90506020813d6020116122bc575b816122ac60209383613a68565b810103126104c357516020611d72565b3d915061229f565b50346104dc5760806003193601126104dc576004356003811015612353576024359067ffffffffffffffff82116104da5761230661234c9236906004016138d5565b9061233b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314613dd9565b612343614852565b60443592614299565b6001805580f35b5080fd5b50346104dc57806003193601126104dc576020601054604051908152f35b50346104dc5760206003193601126104dc57600435612392614813565b6107d081116108355760407fb404cac19fb1cbeff98d325795b08886e3cd8fe8cb1a2f193aac66f13fb239c391600d549080600d5582519182526020820152a180f35b50346104dc57806003193601126104dc5760206001600160a01b0360025416604051908152f35b50346104dc57806003193601126104dc57612415614813565b806001600160a01b0381547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346104dc57806003193601126104dc5760206001600160a01b0360035416604051908152f35b50346104dc57806003193601126104dc576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166040517ffeaf968c00000000000000000000000000000000000000000000000000000000815260a081600481855afa91839083859386956126b0575b50612538576004857fb41b6cb1000000000000000000000000000000000000000000000000000000008152fd5b6402540be400831280156126a1575b6126795761255760115442613bfb565b841061267957906020600492604051938480927f313ce5670000000000000000000000000000000000000000000000000000000082525afa9182156104cf57859261263b575b5069ffffffffffffffffffff604051916125b683613a1c565b8483528560208401521690816040820152606060ff841691015282600a5583600b557fffffffffffffffffffffffffffffffffffffffffff00000000000000000000006aff00000000000000000000600c549360501b1692161717600c557fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b9091506020813d602011612671575b8161265760209383613a68565b810103126112af575160ff811681036112af57905f61259d565b3d915061264a565b6004857fb41b6cb1000000000000000000000000000000000000000000000000000000008152fd5b506509184e72a0008313612547565b91935093506126d7915060a03d60a0116126e4575b6126cf8183613a68565b810190613c33565b509491939190505f61250b565b503d6126c5565b50346104dc5760206003193601126104dc5760406020916001600160a01b03612712613903565b168152600883522054604051908152f35b50346104dc5760406003193601126104dc576001600160a01b036040612747613903565b9282612751613919565b9416815260066020522091165f526020526040805f205460ff82519165ffffffffffff8116835260301c1615156020820152f35b50346104dc57806003193601126104dc5760206001600160a01b0360045416604051908152f35b50346104dc57806003193601126104dc576020600f54604051908152f35b50346104dc57806003193601126104dc57602060405160488152f35b50346104dc5760606003193601126104dc57612800613903565b60243567ffffffffffffffff81116104da57612820903690600401613986565b9060443567ffffffffffffffff81116112af57612841903690600401613986565b90926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633036129935781810361296b5791936001600160a01b03169185805b828110612894575080f35b85857f272958aacfbf07577da4ede62cc7d612dfb0881c6489c961988ef59378d7709f60206001600160a01b036129576128ea878b8f612906838e6129519360019f60408f918f926128ea878b6128ef9361427c565b61428c565b92815260068e52208b61290b61290687878761427c565b613e64565b165f528c5260405f20907fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff66ff000000000000835492151560301b16911617905561427c565b9861427c565b9460405195151586521693a3018690612889565b6004867fc52a9bd3000000000000000000000000000000000000000000000000000000008152fd5b6004867f82b42900000000000000000000000000000000000000000000000000000000008152fd5b50346104dc57806003193601126104dc576020600954604051908152f35b50346104dc5760206003193601126104dc576001600160a01b036129fb613903565b612a03614813565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600354161760035580f35b50346104dc57806003193601126104dc5750610ef1604051612a53604082613a68565b601481527f53757065725061796d61737465722d332e322e320000000000000000000000006020820152604051918291602083526020830190613943565b50346104dc57806003193601126104dc57602060405161012c8152f35b50346104dc5760606003193601126104dc576004359067ffffffffffffffff82116104dc5761012060031983360301126104dc57612b4d612b3583612b1d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314613dd9565b612b25614852565b6044359060243590600401613ee6565b60018055604051928392604084526040840190613943565b9060208301520390f35b50346104dc57806003193601126104dc5760206040516509184e72a0008152f35b50346104dc57806003193601126104dc5760206040516402540be4008152f35b50346104dc5760406003193601126104dc57612bb2613903565b60243590612bbe614852565b6040517f10fdfea70000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082600481845afa80156104cf5783928691612d73575b506040517f91d1485400000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b03929092166024830152602090829060449082905afa90811561048c578491612d54575b501561043557612c9f826001600160a01b03600254163090339061490a565b6fffffffffffffffffffffffffffffffff821161159c5760206001600160a01b037f06653c045d0a3144153a51ac6909baae43b8d5b67184cb74e988b72858727fe492169283855260058252604085206fffffffffffffffffffffffffffffffff612d0f81841682845416613d9a565b167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055612d4381600f54613dcc565b600f55604051908152a26001805580f35b612d6d915060203d602011610485576104778183613a68565b5f612c80565b9250506020823d602011612da3575b81612d8f60209383613a68565b810103126104c35790518291906020612c26565b3d9150612d82565b50346104dc5760206003193601126104dc57600435612dc8614852565b3382526005602052806fffffffffffffffffffffffffffffffff60408420541610612e99573382526005602052604082206fffffffffffffffffffffffffffffffff612e1981841682845416613d50565b167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055612e4d81600f54613bfb565b600f55612e6681336001600160a01b036002541661488b565b6040519081527f4eea589c35918e3c4d8e0371a062a1d544e41d78fb522381678923b9cd6e6dfa60203392a26001805580f35b338252600560205260408220547fcf4791810000000000000000000000000000000000000000000000000000000083526fffffffffffffffffffffffffffffffff16600452602452604490fd5b50346104dc5760406003193601126104dc5780612f01613903565b612f09614813565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610e43576001600160a01b03604484928360405195869485937f205c287800000000000000000000000000000000000000000000000000000000855216600484015260243560248401525af18015610ccc57610cbb5750f35b50346104dc5760206003193601126104dc576040610140916001600160a01b03612fb8613903565b1681526005602052208054906001810154906001600160a01b0360028201541665ffffffffffff600460038401549301549360ff604051966fffffffffffffffffffffffffffffffff811688526bffffffffffffffffffffffff8160801c166020890152818160e01c161515604089015260e81c16151560608701526001600160a01b038116608087015263ffffffff8160a01c1660a087015260c01c1660c085015260e0840152610100830152610120820152f35b50346104dc5760606003193601126104dc57613088613903565b60243560038110156104da5760443567ffffffffffffffff8111611ce2576130b49036906004016138d5565b92906001600160a01b03600e5416330361224a57846130d284613b67565b6001841490811561351557506001600160a01b038316865260056020526fffffffffffffffffffffffffffffffff600a816040892054160416905b613118368785613d1a565b60208151910120936040936131668551916131338784613a68565b600d835260208301997f44565420424c5320536c617368000000000000000000000000000000000000008b523691613d1a565b5080896001600160a01b03869416998a9586835260056020528883209061318c8c613b67565b8b6134f5575060ff600a5b16946131a28c613b67565b60028c146134aa575b60ff825460e81c16613480575b600182018663ffffffff825460a01c16115f1461345557806110608863ffffffff6131e7945460a01c16614621565b886132b2575b50505095608097959361327d86947fa7503227727e36abb7f0ecf24f626347ccc20233c48c554d49d7d2077a1a304094848b819a7fa49f25e6b37dc7492af788d36761dc1b25f8fb6dcc448fb5637dc828725f0d889f9d526008602052209085519261325884613a4c565b4284528560208501528684015260608301526132738b613b67565b8a8c83015261463b565b815190815261328b88613b67565b876020820152a281519361329e81613b67565b84526020840152820152426060820152a280f35b91965091506fffffffffffffffffffffffffffffffff82541695610bb88702878104610bb8148815171561344157947fa7503227727e36abb7f0ecf24f626347ccc20233c48c554d49d7d2077a1a3040948a8f8f98967fa49f25e6b37dc7492af788d36761dc1b25f8fb6dcc448fb5637dc828725f0d889f9d9b9660809f9d9b968c612710869b048091116133b1575b5050506fffffffffffffffffffffffffffffffff61336787988261327d991690613d50565b167fffffffffffffffffffffffffffffffff0000000000000000000000000000000082541617905561339b86601054613dcc565b60105595505094509496989a8296989a506131ed565b61327d98506fffffffffffffffffffffffffffffffff929996509061343960106020613367949c89519485915180918484015e81017f20284361707065642061742033302529000000000000000000000000000000008382015203017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0810184520182613a68565b959897613342565b60248e634e487b7160e01b81526011600452fd5b7fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff81541690556131e7565b877fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da8580a26131b8565b7d0100000000000000000000000000000000000000000000000000000000007fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8354161782556131ab565b6134fe8c613b67565b1561350c5760ff6014613197565b60ff6032613197565b9061351f85613b67565b6002850361310d576001600160a01b0384168752600560205260408720546fffffffffffffffffffffffffffffffff16915061310d565b50346104dc57806003193601126104dc5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346104dc5760606003193601126104dc5760243560043560443567ffffffffffffffff8111611ce2576135d29036906004016138d5565b600e546001600160a01b03169150338214158061380b575b61224a57600b54841115612679577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe3e042014281116137f7578410612679576137f0575b506402540be400811280156137e1575b61377a576040517ffeaf968c00000000000000000000000000000000000000000000000000000000815260a0816004816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa80859286926137b8575b50613730575b5050600860606040516136bb81613a1c565b838152846020820152856040820152015280600a5581600b556a08000000000000000000007fffffffffffffffffffffffffffffffffffffffffff0000000000000000000000600c541617600c557fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b61373d611c209142613bfb565b10613749575b806136a9565b601490808313156137a2578061376a61376561376f9386613c68565b613c80565b613c96565b1361377a575f613743565b6004837fb41b6cb1000000000000000000000000000000000000000000000000000000008152fd5b8061376a613765856137b394613c68565b61376f565b9092506137d4915060a03d60a0116126e4576126cf8183613a68565b509392505091905f6136a3565b506509184e72a000811361363d565b151561362d565b602486634e487b7160e01b81526011600452fd5b506001600160a01b038554163314156135ea565b5060206003193601126104c35760043563ffffffff81168091036104c357613845614813565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b156104c3575f906024604051809481937f0396cb60000000000000000000000000000000000000000000000000000000008352600483015234905af180156138ca576138bc575080f35b6138c891505f90613a68565b005b6040513d5f823e3d90fd5b9181601f840112156104c35782359167ffffffffffffffff83116104c357602083818601950101116104c357565b600435906001600160a01b03821682036104c357565b602435906001600160a01b03821682036104c357565b35906001600160a01b03821682036104c357565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b9181601f840112156104c35782359167ffffffffffffffff83116104c3576020808501948460051b0101116104c357565b80548210156139d0575f52600560205f20910201905f90565b634e487b7160e01b5f52603260045260245ffd5b90600182811c92168015613a12575b60208310146139fe57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916139f3565b6080810190811067ffffffffffffffff821117613a3857604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117613a3857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613a3857604052565b9060405191825f825492613abc846139e4565b8084529360018116908115613b275750600114613ae3575b50613ae192500383613a68565b565b90505f9291925260205f20905f915b818310613b0b575050906020613ae1928201015f613ad4565b6020919350806001915483858901015201910190918492613af2565b60209350613ae19592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f613ad4565b60031115613b7157565b634e487b7160e01b5f52602160045260245ffd5b90815181526020820151602082015260408201516040820152608080613bba606085015160a0606086015260a0850190613943565b93015191613bc783613b67565b015290565b60031960409101126104c3576004356001600160a01b03811681036104c3579060243580151581036104c35790565b91908203918211613c0857565b634e487b7160e01b5f52601160045260245ffd5b519069ffffffffffffffffffff821682036104c357565b908160a09103126104c357613c4781613c1c565b91602082015191604081015191613c65608060608401519301613c1c565b90565b81810392915f138015828513169184121617613c0857565b90606482029180830560641490151715613c0857565b8115613ccc575f1982147f8000000000000000000000000000000000000000000000000000000000000000821416613c08570590565b634e487b7160e01b5f52601260045260245ffd5b67ffffffffffffffff8111613a3857601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b929192613d2682613ce0565b91613d346040519384613a68565b8294818452818301116104c3578281602093845f960137010152565b906fffffffffffffffffffffffffffffffff809116911603906fffffffffffffffffffffffffffffffff8211613c0857565b908160209103126104c3575180151581036104c35790565b906fffffffffffffffffffffffffffffffff809116911601906fffffffffffffffffffffffffffffffff8211613c0857565b91908201809211613c0857565b15613de057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f426173655061796d61737465723a2063616c6c6572206973206e6f7420456e7460448201527f7279506f696e74000000000000000000000000000000000000000000000000006064820152fd5b356001600160a01b03811681036104c35790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156104c3570180359067ffffffffffffffff82116104c3576020019181360383136104c357565b81810292918115918404141715613c0857565b8115613ccc570490565b929190613ef284614965565b6001600160a01b035f9116805f52600560205260405f2092835460ff8160e01c161561426657613f27600b5460115490613dcc565b955f9560ff8360e81c1661424e576001600160a01b03613f468b613e64565b165f52600760205260ff60405f2054161561424e57845f52600660205260405f206001600160a01b03613f788c613e64565b165f5260205260405f209160405192604084019084821067ffffffffffffffff831117613a385760ff916040525465ffffffffffff8116855260301c16151580602085015261422c57600182019265ffffffffffff845460c01c169081614204575b50505f198b6068613fef60e083018093613e78565b905010156141e0575b506bffffffffffffffffffffffff8560801c16116141aa576140199061499c565b600d549081612710019182612710116141cc57612af801809211614196576fffffffffffffffffffffffffffffffff9161405291614a5c565b93168381106141aa576140796fffffffffffffffffffffffffffffffff9182861690613d50565b167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416178155600381016140b0848254613dcc565b90556140be83601054613dcc565b6010556004810180545f198114614196577fffffffffffff000000000000000000000000000000000000000000000000000096936141546001600160a01b03670de0b6b3a764000061414a6bffffffffffffffffffffffff79ffffffffffff00000000000000000000000000000000000000009e9b988f9e9b98600186990190555460801c1687613ec9565b049254169d613e64565b90604080519e8f90602082015201521660608c015260808b015260a08a015260c089015260c0885261418760e089613a68565b5060d01b169260a01b16161790565b602488634e487b7160e01b81526011600452fd5b5050505050509293505050604051906141c4602083613a68565b815290600190565b602489634e487b7160e01b81526011600452fd5b90506141ee9197508b613e78565b6068979197116104c35760485f9701355f613ff8565b5165ffffffffffff168015613fda579198500165ffffffffffff8111613c0857965f80613fda565b5050505050505050509050604051614245602082613a68565b5f815290600190565b50505050505050509050604051614245602082613a68565b5050505050509050604051614245602082613a68565b91908110156139d05760051b0190565b3580151581036104c35790565b91925f9380156145cb578260c091810103126104c3576142b88261392f565b936142c56040840161392f565b9160026001600160a01b0380806142e360a060608a0135990161392f565b99169516971695865f52600560205265ffffffffffff600160405f20015460c01c16614577575b61431381613b67565b1461456f576143219061499c565b600d5461271001908161271011613c08576127109161433f91613ec9565b0492808410156144d0578361435391613bfb565b6fffffffffffffffffffffffffffffffff81116144b9575b6143d7906010548082116144b1575b508583526005602052604083206fffffffffffffffffffffffffffffffff6143a781841682845416613d9a565b167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055601054613bfb565b6010558381526005602052670de0b6b3a764000061440a6bffffffffffffffffffffffff604084205460801c1685613ec9565b0491803b15612353576040517ffa74542d0000000000000000000000000000000000000000000000000000000081526001600160a01b0387166004820152602481018490529082908290604490829084905af18015610ccc5761449c575b50507fcde7e91a718e2439d8ff2a679ad52713e82a37b72622fb530c8c41039fdd5bf09160409182519182526020820152a3565b6144a7828092613a68565b6104dc5780614468565b90505f61437a565b506fffffffffffffffffffffffffffffffff61436b565b9050670de0b6b3a764000092506145069194935f5260056020526bffffffffffffffffffffffff60405f205460801c1690613ec9565b04823b156104c3576040517ffa74542d0000000000000000000000000000000000000000000000000000000081526001600160a01b039290921660048301526024820152905f908290604490829084905af180156138ca576145655750565b5f613ae191613a68565b505050505050565b865f52600660205260405f206001600160a01b0389165f5260205260405f2065ffffffffffff42167fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000082541617905561430a565b5050505050565b906040516145df81613a4c565b608060ff6004839580548552600181015460208601526002810154604086015261460b60038201613aa9565b60608601520154169161461d83613b67565b0152565b9063ffffffff8091169116039063ffffffff8211613c0857565b805468010000000000000000811015613a385761465d916001820181556139b7565b6148005781518155602082015160018201556040820151600282015560038101606083015180519067ffffffffffffffff8211613a385761469e83546139e4565b601f81116147af575b50602090601f831160011461472857918060049492608096945f9261471d575b50505f198260011b9260031b1c19161790555b019101516146e781613b67565b6146f081613b67565b60ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008354169116179055565b015190505f806146c7565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0831691845f52815f20925f5b818110614797575092600192859260809896600498961061477f575b505050811b0190556146da565b01515f1960f88460031b161c191690555f8080614772565b92936020600181928786015181550195019301614756565b828111156146a757835f5260205f20601f840160051c90602085106147f8575b81601f9101920160051c03905f5b8281106147eb5750506146a7565b5f828201556001016147dd565b5f91506147cf565b634e487b7160e01b5f525f60045260245ffd5b6001600160a01b035f5416330361482657565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b600260015414614863576002600155565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000060208201526001600160a01b0390921660248301526044820192909252613ae19161490582606481015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101845283613a68565b614bb9565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000060208201526001600160a01b0392831660248201529290911660448301526064820192909252613ae19161490582608481016148d9565b60e0810160486149758284613e78565b9050106149965761498591613e78565b6048116104c3576034013560601c90565b50505f90565b6060906040516149ab81613a1c565b600a5490818152600b54602082015260ff600c5469ffffffffffffffffffff8116604084015260501c1693849101525f811315614a34576149eb91613ec9565b90604d8111613c0857600954614a0391600a0a613ec9565b614a0d8183614af5565b918115613ccc57670de0b6b3a76400009009614a265790565b60018101809111613c085790565b7fb41b6cb1000000000000000000000000000000000000000000000000000000005f5260045ffd5b9190915f838202915f1985820991838084109303928084039314614ae857826127101115614ac057507fbc01a36e2eb1c432ca57a786c226809d495182a9930be0ded288ce703afb7e919394612710910990828211900360fc1b910360041c170290565b807f227bc1530000000000000000000000000000000000000000000000000000000060049252fd5b5050506127109192500490565b90670de0b6b3a76400008202905f19670de0b6b3a7640000840992828085109403938085039414614bad5783821115614b8557670de0b6b3a7640000829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b7f227bc153000000000000000000000000000000000000000000000000000000005f5260045ffd5b5090613c659250613edc565b5f806001600160a01b03614c0293169360208151910182865af13d15614c5e573d90614be482613ce0565b91614bf26040519384613a68565b82523d5f602084013e5b83614c66565b8051908115159182614c43575b5050614c185750565b7f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b614c569250602080918301019101613d82565b155f80614c0f565b606090614bfc565b90614ca35750805115614c7b57805190602001fd5b7f1425ea42000000000000000000000000000000000000000000000000000000005f5260045ffd5b81511580614ce9575b614cb4575090565b6001600160a01b03907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b15614cac56fea26469706673582212202b12bbaa23feca0547c5cce1e5cc5115fd4c8041448fc95841853c1edc7212dd64736f6c63430008210033"` +> **bytecode**: `string` = `"0x6101003461029957601f61561138819003918201601f19168301916001600160401b0383118484101761029d578084926060946040528339810103126102995780516001600160a01b0381169190828103610299576020820151916001600160a01b038316830361029957604001516001600160a01b0381169390849003610299573315610286575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3306080521561024f575060a0525f5160206155f15f395f51905f525460ff8160401c16610240576002600160401b03196001600160401b038216016101ea575b506001805566470de4df8200006009556103e8600d5560c05260e05260405161533f90816102b28239608051818181612b6e0152612cc7015260a051818181610bc601528181610e6a01528181610f18015281816111ab0152818161139e01528181611cb501528181612c1501528181613098015261343e015260c0518181816107af01528181611518015281816123550152818161259d015281816133ea01528181614b0101528181614c4d01528181614dc90152614f13015260e05181818161135a01528181611fae0152818161297401526151080152f35b6001600160401b0319166001600160401b039081175f5160206155f15f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f61010f565b63f92ee8a960e01b5f5260045ffd5b62461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908115b9d1c9e541bda5b9d60721b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f5f3560e01c80630396cb601461340e57806306433b1b146133ca57806307615815146133a9578063079d2d421461324e5780630c8831121461322d57806313e7c9d81461317057806317a187781461311d5780631d2282c9146130fc578063205c28781461306b5780632e1a7d4d14612f7c5780632f4f21e214612f2c57806334fde76a14612f0e5780633d63f21514612ef05780634382885d14612ec95780634f1ef28614612c7657806352b7512c14612bcd57806352d1902d14612b5357806353afb8be146128bd57806354fd4d501461285c57806358a2570a146127e8578063594a6f23146127ca5780635c7c4b5f146125325780635d2e7e50146124785780635f4cd4fe146122ee57806360a9139b146122c757806360d7442b146122aa57806361ad446e1461228c57806361d027b3146122655780636640431f1461220357806366c36875146121cb578063673a7e2814611f885780636a16e22d14611f645780636a4b23b114611e775780636d8a4aff14611e50578063715018a614611dfe57806374f053c414611dd757806375e09b5114611db9578063787dce3d14611d595780637af3816c14611d3b5780637b70718514611ced5780637c627b2114611c685780638041c94a14611b0b57806382309dd814611ae057806384450c3d146119ff57806388a7ca5c146119655780638da5cb5b1461193f5780638e0d8ed9146119245780638e5802131461188757806396daa3221461186957806396ea1e381461170f578063a0c5018b14611675578063a134d63a14611572578063a3970ae6146114fe578063a4b5328f1461140b578063ad3cb1cc146113c2578063b0d691fe1461137e578063b0f0abe91461133a578063b54a8fca14611289578063b6b55f251461123b578063b7b76cbe14611215578063bb2ddb27146111f7578063bb9fe6bf14611187578063bd11187014611169578063bfa5a1eb14611070578063c06f58e814611049578063c1d9cb0814610f78578063c23a5cea14610eeb578063c399ec8814610e3d578063cf756fdf14610c2d578063d0e30db014610ba7578063d20727d714610b11578063dc61ae90146109d4578063ddd595ca146109b6578063de5c62a61461098f578063e21b38d214610961578063e8ade1a9146108c5578063eafe74b51461075e578063ec2123f114610692578063f0f442601461060f578063f2fde38b146105be578063f5c91a0814610518578063f60fdcb3146104d1578063f7e8cb0d14610494578063fc347007146103eb5763fe719e2f146103c1575f80fd5b346103e857806003193601126103e857602065ffffffffffff815460a01c16604051908152f35b80fd5b50346103e85760203660031901126103e85760043565ffffffffffff81169081810361049057610419614d88565b338352600560205260016040842001907fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff82549165ffffffffffff60c01b9060c01b1691161790556040519081527f4419a541734858dec04cd4ea31aff7b399a0b82dc61f30cc777c1907dc8102ed60203392a280f35b8280fd5b50346103e85760203660031901126103e85760ff60406020926001600160a01b036104bd6134aa565b168152600784522054166040519015158152f35b50346103e857806003193601126103e8576080600a5460ff600b54600c5490604051938452602084015269ffffffffffffffffffff8116604084015260501c166060820152f35b50346103e85760403660031901126103e8576105326134aa565b6024359061053e6144f5565b63ffffffff82116105af576001600160a01b03168083526005602090815260408420600101805463ffffffff60a01b191660a085901b63ffffffff60a01b1617905590917ffc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c8219190604051908152a280f35b634163383f60e11b8352600483fd5b50346103e85760203660031901126103e8576105d86134aa565b6105e06144f5565b6001600160a01b038116156105fb576105f890614e08565b80f35b631e4fbdf760e01b82526004829052602482fd5b50346103e85760203660031901126103e8576001600160a01b036106316134aa565b6106396144f5565b16801561068357600454816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8580a36001600160a01b0319161760045580f35b63e6c4247b60e01b8252600482fd5b50346103e85760203660031901126103e8576004356106af6144f5565b66038d7ea4c680008110801561074c575b61073d576009549081610705575b7ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d2918160409260095582519182526020820152a180f35b6127106123288302048110801561072c575b156106ce575b63c52a9bd360e01b8352600483fd5b50612710612af88302048111610717565b63c52a9bd360e01b8252600482fd5b50683635c9adc5dea0000081116106c0565b50346103e85760403660031901126103e8576107786134aa565b906107816134c0565b916001600160a01b0360405191632c333e2560e01b8352168060048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9182156108ba57839261087f575b506001600160a01b039360246020926040519687938492634d3c739760e11b84526004840152165afa90811561087457829161083b575b60209350818111156108345761082c9250613cc7565b604051908152f35b505061082c565b90506020833d60201161086c575b8161085660209383613580565b81010312610868576020925190610816565b5f80fd5b3d9150610849565b6040513d84823e3d90fd5b9091506020813d6020116108b2575b8161089b60209383613580565b810103126108685751906001600160a01b036107df565b3d915061088e565b6040513d85823e3d90fd5b50346103e8576001600160a01b036108dc366137b6565b91906108e66144f5565b1690818352600560205260408320805460ff60881b83151560881b169060ff60881b19161790555f1461093a577fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da8280a280f35b7fae02c1bd695006b6d891af37fdeefea45a10ebcc17071e3471787db4f17728858280a280f35b50346103e85760203660031901126103e85760206109856109806134aa565b614482565b6040519015158152f35b50346103e857806003193601126103e85760206001600160a01b0360175416604051908152f35b50346103e857806003193601126103e857602060405162093a808152f35b50346103e857806003193601126103e8576013548015610b0257610e108101809111610aee574210610adf5760145480600a5542600b556a08000000000000000000006affffffffffffffffffffff19600c541617600c5560125460ff81169060018203610a9a575b505081601355816014557ffb96594f297e98363f469f68dba1862f6b4e6dbe060a9fd971f41087b2bb21066020604051838152a142907fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b7f5e5763e2a601dbb21ceae7f64e18f3d572378b373daa8d75a325f22f377f0ecb60406001938151908152846020820152a160ff191617601255426015555f80610a3d565b63174b336d60e21b8152600490fd5b634e487b7160e01b82526011600452602482fd5b63a24a147160e01b8252600482fd5b50346103e85760203660031901126103e8576001600160a01b03610b336134aa565b610b3b6144f5565b16801561068357806001600160a01b0319601d541617601d5562093a804201804211610b93576020817f98f60c65a2b39c6b97ac2ab59944af0f43d99c0d1756339e5c607fd64341971c92601e55604051908152a280f35b634e487b7160e01b83526011600452602483fd5b50806003193601126103e857610bbb6144f5565b806001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b15610c2a57816024916040519283809263b760faf960e01b825230600483015234905af1801561087457610c195750f35b81610c2391613580565b6103e85780f35b50fd5b50346103e85760803660031901126103e857610c476134aa565b610c4f6134c0565b906044356001600160a01b03811691828203610e3957606435925f5160206153135f395f51905f52549460ff8660401c16159567ffffffffffffffff811680159081610e31575b6001149081610e27575b159081610e1e575b50610e0f5767ffffffffffffffff1981166001175f5160206153135f395f51905f525586610de3575b506001600160a01b03831615610dd45760ff5f5160206153135f395f51905f525460401c1615610dc557906001600160a01b038392610d11829695614e08565b168419600254161760025515155f14610dbe57505b166001600160a01b031960045416176004558015155f14610db5575b60165566470de4df8200006009556103e8600d55610d5d5780f35b68ff0000000000000000195f5160206153135f395f51905f5254165f5160206153135f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b50610e10610d42565b9050610d26565b631afcd79f60e31b8752600487fd5b6349e27cff60e01b8752600487fd5b68ffffffffffffffffff191668010000000000000001175f5160206153135f395f51905f52555f610cd1565b63f92ee8a960e01b8852600488fd5b9050155f610ca8565b303b159150610ca0565b889150610c96565b8480fd5b50346103e857806003193601126103e8576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610edf5790610eac575b602090604051908152f35b506020813d602011610ed7575b81610ec660209383613580565b810103126108685760209051610ea1565b3d9150610eb9565b604051903d90823e3d90fd5b50346103e85760203660031901126103e85780610f066134aa565b610f0e6144f5565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610f74576001600160a01b036024849283604051958694859363611d2e7560e11b85521660048401525af1801561087457610c195750f35b5050fd5b50346103e85760203660031901126103e8576001600160a01b03610f9a6134aa565b826080604051610fa981613548565b828152826020820152826040820152606080820152015216808252600860205260408220541561103a5780825260086020526040822090825260086020526040822054915f1983019283116110265761102261100e6110088585613649565b50614437565b60405191829160208352602083019061376f565b0390f35b634e487b7160e01b81526011600452602490fd5b63e0a1dc3160e01b8252600482fd5b50346103e857806003193601126103e85760206001600160a01b03600e5416604051908152f35b50346103e85760803660031901126103e85761108a6134aa565b9060243560038110156111655760643567ffffffffffffffff8111610490576110b79036906004016134ea565b6110c29491946144f5565b65ffffffffffff42166001600160a01b03831690818652601f60205265ffffffffffff60408720541681106111565762015180019065ffffffffffff82116111425791859691611138936105f89752601f60205265ffffffffffff60408920911665ffffffffffff1982541617905536916135be565b916044359161451b565b634e487b7160e01b86526011600452602486fd5b63be3963ef60e01b8652600486fd5b5080fd5b50346103e857806003193601126103e8576020601654604051908152f35b50346103e857806003193601126103e8576111a06144f5565b806001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b15610c2a5781809160046040518094819363bb9fe6bf60e01b83525af1801561087457610c195750f35b50346103e857806003193601126103e8576020601e54604051908152f35b50346103e857806003193601126103e85760206001600160a01b03815416604051908152f35b50346103e85760203660031901126103e85761128260043561125b614b9a565b611263614d88565b61127c816001600160a01b036002541630903390614cb2565b33614cf3565b6001805580f35b50346103e85760203660031901126103e8576001600160a01b036112ab6134aa565b6112b36144f5565b16801561068357602054620151804201804211611326576001600160d01b0319909116821760a091821b65ffffffffffff60a01b161760208181556040519190921c65ffffffffffff1681527f0b969f7dbdbaad518bf93d6f72458e8fd633fe345297219a90f56b035d14468d9190a280f35b634e487b7160e01b84526011600452602484fd5b50346103e857806003193601126103e85760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346103e857806003193601126103e85760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346103e857806003193601126103e857506110226040516113e5604082613580565b60058152640352e302e360dc1b60208201526040519182916020835260208301906135f4565b50346103e85760403660031901126103e8576114256134aa565b6024356114306144f5565b611438614b9a565b6001600160a01b0382169182156114ef5760105467016345785d8a00008111156114e95767016345785d89ffff198101818111611142575b83116114da57916114cc816020936114a9827ff7595c4fd7fa675e456dd9520ac8266c06d237d52900fc573bccc85b7c177c9e97613cc7565b6010556114b882600f54613cc7565b600f556001600160a01b0360025416614bba565b604051908152a26001805580f35b63b4aa806360e01b8552600485fd5b84611470565b63e6c4247b60e01b8452600484fd5b50346103e85761150d366137b6565b906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303611564576001600160a01b031682526007602052604082209060ff80198354169115151617905580f35b6282b42960e81b8352600483fd5b50346103e85760203660031901126103e8576001600160a01b036115946134aa565b168152600860205260408120805467ffffffffffffffff811161166157604051906115c560208260051b0183613580565b80825260208201809385526020852085915b83831061164357868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061161457505050500390f35b919360019193955060206116338192603f198a8203018652885161376f565b9601920192018594939192611605565b6005602060019261165385614437565b8152019201920191906115d7565b634e487b7160e01b83526041600452602483fd5b50346103e857806003193601126103e85761168e6144f5565b6020546001600160a01b03811690811561071d5765ffffffffffff8160a01c1665ffffffffffff42161061071d57600e80546001600160a01b0319811684179091556001600160d01b03199091166020556001600160a01b03167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b50346103e85760203660031901126103e85760043561172c6144f5565b8181131561185a5761173c6150f3565b1561184b576015548015159081611834575b5061182557600a548281131561181657611f40810290801591818105611f401483171561180257612710900591612ee08202918205612ee01417156113265761271090059082129081156117f8575b506117e9578060145542601355610e104201804211610b93577f028dfa1d2bc951d60682384a066c9424c3829ea5f25cb00a5f659caed927faea9160409182519182526020820152a180f35b636b04933560e01b8252600482fd5b905081135f61179d565b634e487b7160e01b85526011600452602485fd5b63b41b6cb160e01b8352600483fd5b6304a1a56160e41b8252600482fd5b905062093a808101809111610b935742115f61174e565b6304efd15560e41b8252600482fd5b63b41b6cb160e01b8252600482fd5b50346103e857806003193601126103e8576020600d54604051908152f35b50346103e85760403660031901126103e8576118a16134aa565b6001600160a01b03602435911682526008602052604082208054821015610490576118cc9250613649565b50805460018201549161102261191960028301549260ff60046118f1600384016136ae565b920154169360405196879687526020870152604086015260a0606086015260a08501906135f4565b91608084019061374e565b50346103e857806003193601126103e85760206109856150f3565b50346103e857806003193601126103e8576001600160a01b036020915416604051908152f35b50346103e85760803660031901126103e85761197f6134aa565b506119886134c0565b9060643567ffffffffffffffff8111611165576119a99036906004016134ea565b50506119b3614b9a565b6001600160a01b036002541633036119f1576119db826119d281614bfb565b60443590614cf3565b60018055604051632229f29760e21b8152602090f35b6282b42960e81b8152600490fd5b50346103e857806003193601126103e857611a186144f5565b601d546001600160a01b03811690811561071d57601e54421061071d57600f5460105480911490811591611ace575b5061071d5760025490826001600160a01b038316926001600160a01b031916176002556001600160a01b031916601d5582601e5581817fbbb759660e3239a80c3b3a0326287b69c8a5388b2ba43876c6b91c7c85f21fb86020604051428152a37f75f4cc3f3f70100dc11e396f47f8af2dec5cf7ec94e06062222be779cf2f3dec8380a380f35b67016345785d8a00009150115f611a47565b50346103e857806003193601126103e8576020611afb614405565b65ffffffffffff60405191168152f35b50346103e85760603660031901126103e857611b256134aa565b611b2d6134c0565b60443590611b396144f5565b611b41614b9a565b6001600160a01b03829316918285526011602052604085206001600160a01b0383165f5260205260405f2054908115611c5957818115918215611c4f575b5050611c47575b83611b9091613cc7565b8285526011602052604085206001600160a01b0383165f5260205260405f2055813b15611c435760405163fa74542d60e01b81526001600160a01b0382166004820152602481018490528490818160448183885af1801561087457611c2e575b505060206001600160a01b037f84b561bfeda3b329970b08af25d20086abe657da83a1dbd00fdfaad913e8cfed926040519586521693a36001805580f35b81611c3891613580565b611c4357835f611bf0565b8380fd5b925082611b86565b119050815f611b7f565b630342954b60e21b8652600486fd5b50346103e85760803660031901126103e857600360043510156103e85760243567ffffffffffffffff811161116557611ca86112829136906004016134ea565b611cdc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314613cd4565b611ce4614b9a565b604435916141d0565b50346103e85760403660031901126103e8576001600160a01b036040611d116134aa565b9282611d1b6134c0565b9416815260116020522091165f52602052602060405f2054604051908152f35b50346103e857806003193601126103e8576020601054604051908152f35b50346103e85760203660031901126103e857600435611d766144f5565b6107d0811161073d5760407fb404cac19fb1cbeff98d325795b08886e3cd8fe8cb1a2f193aac66f13fb239c391600d549080600d5582519182526020820152a180f35b50346103e857806003193601126103e8576020601354604051908152f35b50346103e857806003193601126103e85760206001600160a01b0360025416604051908152f35b50346103e857806003193601126103e857611e176144f5565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346103e857806003193601126103e85760206001600160a01b0360035416604051908152f35b50346103e85760403660031901126103e857611e916134aa565b90611e9a6134c0565b611ea26144f5565b6001600160a01b0383169283151580611f5b575b611f4c576001600160a01b03821680151580611f43575b6114ef577f92f63be5e4bfac76f996bbbee86c4933f30141307811e42d6977a697dd8fc3ec93946001600160a01b031960175416176017556001600160a01b03196018541617601855611f3d604051928392839092916001600160a01b0360209181604085019616845216910152565b0390a180f35b50823b15611ecd565b63e6c4247b60e01b8352600483fd5b50803b15611eb6565b50346103e85760203660031901126103e8576020610985611f836134aa565b61416f565b50346103e857806003193601126103e857604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa82908391818594869361218e575b50611ffa5763b41b6cb160e01b8552600485fd5b6402540be4008312801561217f575b6121705761201960165442613cc7565b84106121705769ffffffffffffffffffff908116911681116121615769ffffffffffffffffffff906008606060405161205181613518565b858152866020820152836040820152015282600a5583600b551669ffffffffffffffffffff19600c541617600c55600c546aff00000000000000000000600860501b16906aff00000000000000000000191617600c5560125460ff81168061211f575b50506013546120e5575b7fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b7fd1cdd29a2fc16e6ed81266a11c8f7f06897e72e22d1bb9ccf34d63c3583d5df360206014548560135585601455604051908152a16120be565b60407f5e5763e2a601dbb21ceae7f64e18f3d572378b373daa8d75a325f22f377f0ecb918151908152866020820152a160ff1916601255826015555f806120b4565b63b41b6cb160e01b8452600484fd5b63b41b6cb160e01b8552600485fd5b506509184e72a0008313612009565b92509350506121b5915060a03d60a0116121c4575b6121ad8183613580565b8101906140ac565b9492915092909293915f611fe6565b503d6121a3565b50346103e85760203660031901126103e85760406020916001600160a01b036121f26134aa565b168152600883522054604051908152f35b50346103e85760403660031901126103e8576001600160a01b0360406122276134aa565b92826122316134c0565b9416815260066020522091165f526020526040805f205460ff82519165ffffffffffff8116835260301c1615156020820152f35b50346103e857806003193601126103e85760206001600160a01b0360045416604051908152f35b50346103e857806003193601126103e8576020600f54604051908152f35b50346103e857806003193601126103e8576020604051610e108152f35b50346103e857806003193601126103e85760206001600160a01b03601d5416604051908152f35b50346103e85760603660031901126103e8576123086134aa565b60243567ffffffffffffffff811161049057612328903690600401613618565b9060443567ffffffffffffffff8111610e3957612349903690600401613618565b90926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361246a5781810361245b5791936001600160a01b03169185805b82811061239c575080f35b85857f272958aacfbf07577da4ede62cc7d612dfb0881c6489c961988ef59378d7709f60206001600160a01b036124476123f2878b8f61240e838e6124419360019f60408f918f926123f2878b6123f793614152565b614162565b92815260068e52208b61241361240e878787614152565b613824565b165f528c5260405f209066ff000000000000825491151560301b169066ff0000000000001916179055614152565b98614152565b9460405195151586521693a3018690612391565b63c52a9bd360e01b8652600486fd5b6282b42960e81b8652600486fd5b50346103e85760403660031901126103e8576124926134aa565b6001600160a01b036124a26134c0565b916124ab6144f5565b168083526011602052604083206001600160a01b0383165f5260205260405f20549182156125235760206001600160a01b037fe4ddb9696b79889a2b0002aa61f703666d072c319c0694d71624728605bdd2879284875260118352604087208282165f5283528660405f20556040519586521693a380f35b630342954b60e21b8452600484fd5b50346103e85760403660031901126103e85761254c6134aa565b6125546134c0565b61255c614d88565b604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156127bf578491612790575b5015611564576001600160a01b0382168015801561277f575b612770576001600160a01b036003541680156127615760206024916040519283809263b8d7b66960e01b82523360048301525afa8015612756578291869161270a575b506001600160a01b0316036126fb577f823c9466affb5a8646bc5f7e6304f72a4622cc01af819ec2f51b1130a725c6d1916126f5913386526005602052604086209060018201906001600160a01b0319825416179055600281016001600160a01b0383166001600160a01b031982541617905570010000000000000000000000000000000070ff00000000000000000000000000000000198254161790556040519182913395839092916001600160a01b0360209181604085019616845216910152565b0390a280f35b6367cc8b7560e01b8452600484fd5b9150506020813d60201161274e575b8161272660209383613580565b81010312610e3957516001600160a01b0381168103610e395781906001600160a01b03612631565b3d9150612719565b6040513d87823e3d90fd5b63c52a9bd360e01b8552600485fd5b63c52a9bd360e01b8452600484fd5b506001600160a01b038216156125ee565b6127b2915060203d6020116127b8575b6127aa8183613580565b81019061413a565b5f6125d5565b503d6127a0565b6040513d86823e3d90fd5b50346103e857806003193601126103e8576020600954604051908152f35b50346103e85760203660031901126103e8576001600160a01b0361280a6134aa565b6128126144f5565b16801561068357600354816001600160a01b0382167f05ba7ce38b27f49ba3b81247ac7a13b30021ce3e90f633a2498fa9d1a09579908580a36001600160a01b0319161760035580f35b50346103e857806003193601126103e8575061102260405161287f604082613580565b601481527f53757065725061796d61737465722d352e332e3300000000000000000000000060208201526040519182916020835260208301906135f4565b50346103e85760803660031901126103e85760243560043560443567ffffffffffffffff8111611c43576128f59036906004016134ea565b505060643560ff8116809103611c43576001600160a01b03600e541633141580612b3f575b612b3157600b5483111561216157611c1f19420142811161180257831061216157600f4201804211611802578311612161576402540be40082128015612b22575b61216157604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8086928792612af9575b50612a86575b5050600190600860606040516129c381613518565b85815260208101879052604081018890520152600a839055600b849055600c80546affffffffffffffffffffff19166a08000000000000000000001790551480612a78575b612a33577fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b6012547f5e5763e2a601dbb21ceae7f64e18f3d572378b373daa8d75a325f22f377f0ecb6040805160ff84168152866020820152a160ff1916601255826015556120be565b5060ff601254161515612a08565b8582139081612ae3575b50612a9c575b806129ae565b60149080841315612acd5780612abd612ab8612ac293876140de565b6140f6565b61410c565b13612161575f612a96565b80612abd612ab886612ade946140de565b612ac2565b611c209150612af29042613cc7565b105f612a90565b909250612b15915060a03d60a0116121c4576121ad8183613580565b509392505091905f6129a8565b506509184e72a000821361295b565b6282b42960e81b8452600484fd5b506001600160a01b0384541633141561291a565b50346103e857806003193601126103e8576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003612bbe5760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b63703e46dd60e11b8152600490fd5b50346103e85760603660031901126103e8576004359067ffffffffffffffff82116103e85761012060031983360301126103e857612c6c612c5483612c3c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314613cd4565b612c44614b9a565b6044359060243590600401613d30565b600180556040519283926040845260408401906135f4565b9060208301520390f35b5060403660031901126103e857612c8b6134aa565b9060243567ffffffffffffffff8111611165573660238201121561116557612cbd9036906024816004013591016135be565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115612e94575b50612e8557612cff6144f5565b6040516352d1902d60e01b8152926001600160a01b0381169190602085600481865afa80958596612e51575b50612d4457634c9c8ce360e01b84526004839052602484fd5b9091847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8103612e3f5750813b15612e2d57806001600160a01b03197f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28151839015612e135780836020612e0f95519101845af4612e09615289565b916152b8565b5080f35b50505034612e1e5780f35b63b398979f60e01b8152600490fd5b634c9c8ce360e01b8452600452602483fd5b632a87526960e21b8552600452602484fd5b9095506020813d602011612e7d575b81612e6d60209383613580565b81010312610e395751945f612d2b565b3d9150612e60565b63703e46dd60e11b8252600482fd5b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614155f612cf2565b50346103e857806003193601126103e85760206001600160a01b0360185416604051908152f35b50346103e857806003193601126103e8576020601554604051908152f35b50346103e857806003193601126103e8576020601454604051908152f35b50346103e85760403660031901126103e857611282612f496134aa565b60243590612f55614b9a565b612f5e81614bfb565b612f77826001600160a01b036002541630903390614cb2565b614cf3565b50346103e85760203660031901126103e857600435612f99614b9a565b3382526005602052806001600160801b0360408420541610613040573382526005602052604082206001600160801b03612fd881841682845416613ca7565b166001600160801b0319825416179055612ff481600f54613cc7565b600f5561300d81336001600160a01b0360025416614bba565b6040519081527f4eea589c35918e3c4d8e0371a062a1d544e41d78fb522381678923b9cd6e6dfa60203392a26001805580f35b3382526005602052604082205463cf47918160e01b83526001600160801b0316600452602452604490fd5b50346103e85760403660031901126103e857806130866134aa565b61308e6144f5565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610f74576001600160a01b036044849283604051958694859363040b850f60e31b855216600484015260243560248401525af1801561087457610c195750f35b50346103e857806003193601126103e8576131156144f5565b6105f8613c58565b50346103e85760403660031901126103e8576004359067ffffffffffffffff82116103e85761012060031983360301126103e85760406131626024356004850161388c565b825191151582526020820152f35b50346103e85760203660031901126103e8576040610120916001600160a01b036131986134aa565b1681526005602052208054906001810154906001600160a01b0360028201541665ffffffffffff600460038401549301549360ff604051966001600160801b0381168852818160801c161515602089015260881c16151560408701526001600160a01b038116606087015263ffffffff8160a01c16608087015260c01c1660a085015260c084015260e0830152610100820152f35b50346103e857806003193601126103e8576132466144f5565b6105f86137e5565b50346103e85760603660031901126103e8576132686134aa565b6024359060038210156104905760443567ffffffffffffffff8111611c43576132959036906004016134ea565b906001600160a01b03600e5416330361339b577fa49f25e6b37dc7492af788d36761dc1b25f8fb6dcc448fb5637dc828725f0d88926080926001600160a01b03928790600188036133695761330b9150848416895260056020526001600160801b03600a8160408c2054160416925b36916135be565b6020815191012090613346604051613324604082613580565b600d81526c088aca8408498a640a6d8c2e6d609b1b602082015282898661451b565b613353604051809861374e565b602087015260408601524260608601521692a280f35b6002881461337c575b61330b9192613304565b8385168952600560205260408920546001600160801b03169150613372565b6282b42960e81b8552600485fd5b50346103e857806003193601126103e857602060ff60125416604051908152f35b50346103e857806003193601126103e85760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b5060203660031901126108685760043563ffffffff8116809103610868576134346144f5565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610868575f90602460405180948193621cb65b60e51b8352600483015234905af1801561349f57613491575080f35b61349d91505f90613580565b005b6040513d5f823e3d90fd5b600435906001600160a01b038216820361086857565b602435906001600160a01b038216820361086857565b35906001600160a01b038216820361086857565b9181601f840112156108685782359167ffffffffffffffff8311610868576020838186019501011161086857565b6080810190811067ffffffffffffffff82111761353457604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761353457604052565b6040810190811067ffffffffffffffff82111761353457604052565b90601f8019910116810190811067ffffffffffffffff82111761353457604052565b67ffffffffffffffff811161353457601f01601f191660200190565b9291926135ca826135a2565b916135d86040519384613580565b829481845281830111610868578281602093845f960137010152565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156108685782359167ffffffffffffffff8311610868576020808501948460051b01011161086857565b8054821015613662575f52600560205f20910201905f90565b634e487b7160e01b5f52603260045260245ffd5b90600182811c921680156136a4575b602083101461369057565b634e487b7160e01b5f52602260045260245ffd5b91607f1691613685565b9060405191825f8254926136c184613676565b808452936001811690811561372c57506001146136e8575b506136e692500383613580565b565b90505f9291925260205f20905f915b8183106137105750509060206136e6928201015f6136d9565b60209193508060019154838589010152019101909184926136f7565b9050602092506136e694915060ff191682840152151560051b8201015f6136d9565b90600382101561375b5752565b634e487b7160e01b5f52602160045260245ffd5b906137b3908251815260208301516020820152604083015160408201526080806137a8606086015160a0606086015260a08501906135f4565b94015191019061374e565b90565b6040906003190112610868576004356001600160a01b0381168103610868579060243580151581036108685790565b601354156136e6577fd1cdd29a2fc16e6ed81266a11c8f7f06897e72e22d1bb9ccf34d63c3583d5df360206014545f6013555f601455604051908152a1565b356001600160a01b03811681036108685790565b903590601e1981360301821215610868570180359067ffffffffffffffff82116108685760200191813603831361086857565b9190820180921161387857565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b0361389d82614979565b1691825f52600560205260405f209283549160ff8360801c1615613c2d5760ff8360881c16613c02576138d2611f8385613824565b15613bd75760e084019160346138e88487613838565b90501015613b7f575b5f52600660205260405f206001600160a01b0361390d86613824565b165f5260205260405f209460206040519661392788613564565b549660ff65ffffffffffff89169889835260301c1615159182910152613b63576001015465ffffffffffff8160c01c168015159687613b59575b87613b44575b50505f199260686139788288613838565b90501015613b1f575b506001600160a01b031691604051633ba0b9a960e01b8152602081600481875afa90811561349f575f91613aed575b5011613ac257600b548015908115613aac575b50613a92576139d1906149aa565b91600d5492836127100193846127101161387857612af801809411613878576001600160801b0393613a0291614a5f565b9283911610613a6857613a17613a1d93613824565b90614a78565b613a4157613a2c576001905f90565b5f906b1490551157d312535255115160a21b90565b505f907f4352454449545f4558434545444544000000000000000000000000000000000090565b505050505f907f494e53554646494349454e545f42414c414e434500000000000000000000000090565b505f946a5354414c455f505249434560a81b945092505050565b613aba91506016549061386b565b42115f6139c3565b50505050505f907f524154455f434f4d4d49544d454e545f56494f4c41544544000000000000000090565b90506020813d602011613b17575b81613b0860209383613580565b8101031261086857515f6139b0565b3d9150613afb565b613b2b91935085613838565b6068116108685760480135916001600160a01b03613981565b613b4f92975061386b565b4210945f80613967565b8015159750613961565b505f956b1554d15497d09313d0d2d15160a21b95509350505050565b613b898386613838565b603411610868576001600160801b03602462030d4092013560801c1610156138f1575050505050505f907f504f53544f505f4741535f544f4f5f4c4f57000000000000000000000000000090565b50505050505f907f555345525f4e4f545f454c494749424c4500000000000000000000000000000090565b50505050505f907f4f50455241544f525f504155534544000000000000000000000000000000000090565b50505050505f907f4f50455241544f525f4e4f545f434f4e4649475552454400000000000000000090565b601d546001600160a01b038116908115613ca3576001600160a01b031916601d555f601e557fde82ad51cc1336e141528846e966b9e7f7ae89a78ebb71d1f0da0d851592d8ee5f80a2565b5050565b906001600160801b03809116911603906001600160801b03821161387857565b9190820391821161387857565b15613cdb57565b60405162461bcd60e51b815260206004820152602760248201527f426173655061796d61737465723a2063616c6c6572206973206e6f7420456e746044820152661c9e541bda5b9d60ca1b6064820152608490fd5b92916001600160a01b03613d4385614979565b16805f52600560205260405f209283549260ff8460801c161561408057613d6f600b546016549061386b565b945f9460ff8160881c1661406957613d89611f838a613824565b156140695760e08901926034613d9f858c613838565b90501015614025575b855f52600660205260405f206001600160a01b03613dc58c613824565b165f5260205260405f2060ff60405191613dde83613564565b5465ffffffffffff8116835260301c161515806020830152613f89579083929160018c9695019485549165ffffffffffff8360c01c169081613ff9575b50506068613e2b825f1999613838565b90501015613fd4575b506001600160a01b031694604051633ba0b9a960e01b81526020816004818a5afa90811561349f575f91613fa2575b5011613f8957613e72906149aa565b600d5490816127100191826127101161387857612af80180921161387857613ea891613e9d91614a5f565b8095613a178d613824565b613f68576001600160801b0316838110613f68576001600160a01b03926003613f16936001600160801b03613ee18795828a1690613ca7565b166001600160801b031982541617815501613efd86825461386b565b9055613f0b8560105461386b565b601055541698613824565b6040519860208a01521660408801526060870152608086015260a085015260a08452613f4360c085613580565b60a09190911b65ffffffffffff60a01b1660d09190911b6001600160d01b0319161790565b50505050505050509050604051613f80602082613580565b5f815290600190565b5050505050505050509050604051613f80602082613580565b90506020813d602011613fcc575b81613fbd60209383613580565b8101031261086857515f613e63565b3d9150613fb0565b613fe09196508c613838565b6068116108685760480135946001600160a01b03613e34565b5165ffffffffffff168015613e1b57919a5001955065ffffffffffff8611613878578b95985f80613e1b565b61402f848b613838565b603411610868576001600160801b03602462030d4092013560801c161015613da85750505050505050509050604051613f80602082613580565b505050505050509050604051613f80602082613580565b50505050509050604051613f80602082613580565b519069ffffffffffffffffffff8216820361086857565b908160a0910312610868576140c081614095565b916020820151916040810151916137b3608060608401519301614095565b81810392915f13801582851316918412161761387857565b9060648202918083056064149015171561387857565b811561412657600160ff1b81145f19831416613878570590565b634e487b7160e01b5f52601260045260245ffd5b90816020910312610868575180151581036108685790565b91908110156136625760051b0190565b3580151581036108685790565b6001600160a01b0381165f52600760205260ff60405f205416908115614193575090565b6137b39150614482565b8181029291811591840414171561387857565b906001600160801b03809116911601906001600160801b03821161387857565b91908015614400578260a09181010312610868576141ed826134d6565b916141fa602082016134d6565b6040820135906001600160a01b03808061421b6080606088013597016134d6565b97169216951693845f52600560205265ffffffffffff600160405f20015460c01c166143c3575b835f52602160205260ff60405f2054166143bb57835f52602160205260405f20600160ff19825416179055845f526005602052600460405f2001908154915f198314613878576001614296930190556149aa565b92600d54612710018061271011613878576142b4612710918661419d565b0492808410156143ad577fcde7e91a718e2439d8ff2a679ad52713e82a37b72622fb530c8c41039fdd5bf094928492876142f360409761435595613cc7565b916001600160801b03831161439e575b858b601054808611614365575b5061431b9495614e45565b865f526005602052845f206001600160801b0361433d818416828454166141b0565b166001600160801b0319825416179055601054613cc7565b60105582519182526020820152a3565b847f418c06850785ce4239177091a96c1757ba1d5ba22df98a4cf818e1510fa028cd8c61431b988151908152846020820152a294614310565b6001600160801b039250614303565b92509250936136e694614e45565b505050505050565b845f52600660205260405f206001600160a01b0387165f5260205260405f2065ffffffffffff8042161665ffffffffffff19825416179055614242565b505050565b600b5480156144265761442265ffffffffffff916016549061386b565b1690565b505f90565b600382101561375b5752565b906136e660405161444781613548565b608060ff60048396805485526001810154602086015260028101546040860152614473600382016136ae565b6060860152015416910161442b565b6001600160a01b03601754169081156144ef576001600160a01b036024602092604051948593849263710d9c6960e11b84521660048301525afa5f91816144ce575b506137b357505f90565b6144e891925060203d6020116127b8576127aa8183613580565b905f6144c4565b50505f90565b6001600160a01b035f5416330361450857565b63118cdaa760e01b5f523360045260245ffd5b6001600160a01b0390939192931692835f52600560205260405f2060038410158061375b578461495d5760ff600a5b169061375b576002851461492b575b60ff825460881c16614901575b60018201918163ffffffff845460a01c16115f146148ee578163ffffffff845460a01c160363ffffffff811161387857835463ffffffff60a01b191660a09190911b63ffffffff60a01b161783555b836147ee575b50855f52600860205260405f2093604051916145d683613548565b42835260208301858152604084019182526060840192835260808401966145fd898961442b565b8054680100000000000000008110156135345761461f91600182018155613649565b9490946147db57518455516001840155516002830155518051600383019167ffffffffffffffff8211613534576146568354613676565b601f811161478a575b50602090601f8311600114614723576004949392915f9183614718575b50508160011b915f199060031b1c19161790555b019251600381101561375b577fa7503227727e36abb7f0ecf24f626347ccc20233c48c554d49d7d2077a1a3040604063ffffffff946147097ffc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c821986020988b9660ff8019835416911617905583519283528883019061374e565ba25460a01c16604051908152a2565b015190505f8061467c565b90601f19831691845f52815f20925f5b81811061477257509160019391856004989796941061475a575b505050811b019055614690565b01515f1960f88460031b161c191690555f808061474d565b92936020600181928786015181550195019301614733565b8281111561465f57835f5260205f20601f840160051c90602085106147d3575b81601f9101920160051c03905f5b8281106147c657505061465f565b5f828201556001016147b8565b5f91506147aa565b634e487b7160e01b5f525f60045260245ffd5b6001600160801b03815416610bb8810290808204610bb81490151715613878576127109004808511614892575b5080546001600160801b031684811061486c57506001600160801b0361484681861682845416613ca7565b166001600160801b03198254161790556148628360105461386b565b6010555b5f6145bb565b9193506001600160801b031981541690556148898160105461386b565b60105591614866565b6020919594506010826148e792966040519481869251918291018484015e81017f2028436170706564206174203330252900000000000000000000000000000000838201520301600f19810184520182613580565b935f61481b565b825463ffffffff60a01b191683556145b5565b857fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da5f80a2614566565b815471ff0000000000000000000000000000000000191671010000000000000000000000000000000000178255614559565b505f600185036149705760ff601461454a565b60ff603261454a565b60e0810160486149898284613838565b9050106144ef5761499991613838565b604811610868576034013560601c90565b604051906149b782613518565b600a5490818352600b54602084015260ff6060600c549469ffffffffffffffffffff86166040820152019360501c1683525f821315614a505760ff916149fc9161419d565b915116604d811161387857600954614a1691600a0a61419d565b614a2981670de0b6b3a764000084615188565b91811561412657670de0b6b3a76400009009614a425790565b600181018091116138785790565b63b41b6cb160e01b5f5260045ffd5b9061271090614a6f828285615188565b9209614a425790565b604051634d3c739760e11b81526001600160a01b0392831660048201819052939190921691602081602481865afa90811561349f575f91614b66575b50614ad990614ade935f52601160205260405f20855f5260205260405f20549061386b565b61386b565b60405191632c333e2560e01b835260048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa91821561349f575f92614b3557501190565b9091506020813d602011614b5e575b81614b5160209383613580565b8101031261086857511090565b3d9150614b44565b90506020813d602011614b92575b81614b8160209383613580565b810103126108685751614ade614ab4565b3d9150614b74565b600260015414614bab576002600155565b633ee5aeb560e01b5f5260045ffd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526136e691614bf6606483613580565b61521d565b6001600160a01b0360405191632474521560e21b83527f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f60048401521660248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa90811561349f575f91614c93575b5015614c8557565b6282b42960e81b5f5260045ffd5b614cac915060203d6020116127b8576127aa8183613580565b5f614c7d565b9091926001600160a01b036136e69481604051956323b872dd60e01b6020880152166024860152166044840152606483015260648252614bf6608483613580565b6001600160801b038211614d795760206001600160a01b037f06653c045d0a3144153a51ac6909baae43b8d5b67184cb74e988b72858727fe4921692835f526005825260405f206001600160801b03614d51818416828454166141b0565b166001600160801b0319825416179055614d6d81600f5461386b565b600f55604051908152a2565b6354ada05560e01b5f5260045ffd5b604051632474521560e21b81527f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f60048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561349f575f91614c93575015614c8557565b6001600160a01b03805f549216918282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b6001600160a01b031692833b1561086857604051635c1d516f60e11b81526001600160a01b038316600482015260248101849052604481018290525f92908381606481838a5af190816150de575b506143bb57604051634d3c739760e11b81526001600160a01b0382166004820181905296906020816024818a5afa90811561275657869086926150a8575b50614ad9614ef6928988526011602052604088208b5f5260205260405f20549061386b565b604051632c333e2560e01b815260048101899052906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa91821561509d578692615069575b50116150075750843b15610490576040516330f5344160e01b81526001600160a01b0391909116600482015260248101849052604481019190915281808260648183895af19182614ff2575b5050614fec577f8d05946ad7acf1695cdb2c1c7b76b11a907b33e5224f086eea17d6a23841e17f9160406020925b8581526011845220855f52825260405f20614fe182825461386b565b9055604051908152a3565b50505050565b81614ffc91613580565b61116557815f614f97565b7f8d05946ad7acf1695cdb2c1c7b76b11a907b33e5224f086eea17d6a23841e17f94925060409150926001600160a01b0360209416815260068452818120875f528452815f20660100000000000066ff00000000000019825416179055614fc5565b9091506020813d602011615095575b8161508560209383613580565b810103126108685751905f614f4b565b3d9150615078565b6040513d88823e3d90fd5b9150506020813d6020116150d6575b816150c460209383613580565b81010312610868575185614ad9614ed1565b3d91506150b7565b6150eb9194505f90613580565b5f925f614e93565b604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa5f9181615162575b506151455750600190565b801561515c57610e10810180911161387857421190565b50600190565b61517c91925060a03d60a0116121c4576121ad8183613580565b5092505050905f61513a565b9091828202915f198482099383808610950394808603951461520f578483111561520057829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b505091508115614126570490565b5f806001600160a01b0361524693169360208151910182865af161523f615289565b90836152b8565b805190811515918261526e575b505061525c5750565b635274afe760e01b5f5260045260245ffd5b615281925060208091830101910161413a565b155f80615253565b3d156152b3573d9061529a826135a2565b916152a86040519384613580565b82523d5f602084013e565b606090565b906152dc57508051156152cd57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580615309575b6152ed575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156152e556fef0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/core/variables/TEST_ACCOUNT_ADDRESSES.md b/api/@aastar/core/variables/TEST_ACCOUNT_ADDRESSES.md index ffce2b3cf..5345e8f62 100644 --- a/api/@aastar/core/variables/TEST_ACCOUNT_ADDRESSES.md +++ b/api/@aastar/core/variables/TEST_ACCOUNT_ADDRESSES.md @@ -1,6 +1,6 @@ > `const` **TEST\_ACCOUNT\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L62) +Defined in: [packages/core/src/contract-addresses.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L68) Test Account Addresses (For Development & Testing) diff --git a/api/@aastar/core/variables/TEST_ACCOUNT_POOL_SIZE.md b/api/@aastar/core/variables/TEST_ACCOUNT_POOL_SIZE.md index a72ab270d..51a80cb01 100644 --- a/api/@aastar/core/variables/TEST_ACCOUNT_POOL_SIZE.md +++ b/api/@aastar/core/variables/TEST_ACCOUNT_POOL_SIZE.md @@ -1,3 +1,3 @@ > `const` **TEST\_ACCOUNT\_POOL\_SIZE**: `20` = `20` -Defined in: [packages/core/src/constants.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L85) +Defined in: [packages/core/src/constants.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L91) diff --git a/api/@aastar/core/variables/TEST_COMMUNITIES.md b/api/@aastar/core/variables/TEST_COMMUNITIES.md index 55e2abc80..1dc9f6a4f 100644 --- a/api/@aastar/core/variables/TEST_COMMUNITIES.md +++ b/api/@aastar/core/variables/TEST_COMMUNITIES.md @@ -1,6 +1,6 @@ > `const` **TEST\_COMMUNITIES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L101) +Defined in: [packages/core/src/contract-addresses.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L107) Test Community Addresses (Registered in Registry v2.2.0 on 2025-11-08) diff --git a/api/@aastar/core/variables/TEST_TOKEN_ADDRESSES.md b/api/@aastar/core/variables/TEST_TOKEN_ADDRESSES.md index c54392341..ed5b2109a 100644 --- a/api/@aastar/core/variables/TEST_TOKEN_ADDRESSES.md +++ b/api/@aastar/core/variables/TEST_TOKEN_ADDRESSES.md @@ -1,6 +1,6 @@ > `const` **TEST\_TOKEN\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L53) +Defined in: [packages/core/src/contract-addresses.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L59) Test Token Addresses (For Development & Testing) diff --git a/api/@aastar/core/variables/TOKEN_ADDRESSES.md b/api/@aastar/core/variables/TOKEN_ADDRESSES.md index 32e117d01..90bbba408 100644 --- a/api/@aastar/core/variables/TOKEN_ADDRESSES.md +++ b/api/@aastar/core/variables/TOKEN_ADDRESSES.md @@ -1,6 +1,6 @@ > `const` **TOKEN\_ADDRESSES**: `object` -Defined in: [packages/core/src/contract-addresses.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-addresses.ts#L46) +Defined in: [packages/core/src/contract-addresses.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L52) Token System Addresses diff --git a/api/@aastar/core/variables/V2_SUMMARY.md b/api/@aastar/core/variables/V2_SUMMARY.md index 0953b3e43..afc687312 100644 --- a/api/@aastar/core/variables/V2_SUMMARY.md +++ b/api/@aastar/core/variables/V2_SUMMARY.md @@ -1,6 +1,6 @@ > `const` **V2\_SUMMARY**: `object` -Defined in: [packages/core/src/contract-versions.ts:364](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/contract-versions.ts#L364) +Defined in: [packages/core/src/contract-versions.ts:364](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L364) V2 Contract Summary diff --git a/api/@aastar/core/variables/X402FacilitatorABI.md b/api/@aastar/core/variables/X402FacilitatorABI.md new file mode 100644 index 000000000..fd9b0dd3b --- /dev/null +++ b/api/@aastar/core/variables/X402FacilitatorABI.md @@ -0,0 +1,3 @@ +> `const` **X402FacilitatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L137) diff --git a/api/@aastar/core/variables/X402FacilitatorArtifact.md b/api/@aastar/core/variables/X402FacilitatorArtifact.md new file mode 100644 index 000000000..4bbc0c2f8 --- /dev/null +++ b/api/@aastar/core/variables/X402FacilitatorArtifact.md @@ -0,0 +1,13 @@ +> `const` **X402FacilitatorArtifact**: `object` = `X402FacilitatorABIData` + +Defined in: [packages/core/src/abis/index.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L138) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60c03461012457601f61122938819003918201601f19168301916001600160401b038311848410176101285780849260409485528339810103126101245780516001600160a01b038116918282036101245760200151906001600160a01b0382168083036101245760015f5533156101115760018054336001600160a01b0319821681179092556040519591906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a315908115610108575b506100f95760805260a0526110ec908161013d8239608051818181610b270152610cf0015260a05181818161057a015261086e0152f35b63c52a9bd360e01b5f5260045ffd5b9050155f6100c2565b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b14610b0a575080632540c47114610aac5780634ee1a3d614610a7d57806354fd4d5014610a07578063715018a6146109b55780637344209c14610678578063761cda33146106495780638670d78d146105fc5780638da5cb5b146105d6578063928624e71461059e578063b08ec5ca1461055b578063bac256d61461053e578063c50cff87146104e8578063d4c38f5214610426578063ef842a46146103d2578063f2fde38b146103545763f3a729da146100d9575f80fd5b346102d9576101203660031901126102d9576100f3610b4b565b906100fc610b61565b610104610b77565b60643590608435926101043567ffffffffffffffff81116102d95761012d903690600401610b8d565b610138979197610c87565b60405160208101906001600160a01b038516825287604082015260e435606082015260608152610169608082610bbb565b5190209761017989878588610ca5565b968711610345576040516370a0823160e01b8152306004820152916001600160a01b0386169190602084602481865afa938415610306575f94610311575b50823b156102d9578a61010489835f9460405196879586946388b7ab6360e01b86526001600160a01b038d166004870152306024870152604486015260a435606486015260c435608486015260a485015260e060c48501528160e4850152848401378181018301859052601f01601f1916810103018183865af18015610306576102f0575b506020602491604051928380926370a0823160e01b82523060048301525afa9081156102e5579086929189916102a8575b509061027891610c3f565b106102995792602096926001959261028f95610e07565b9155604051908152f35b63760a602d60e01b8652600486fd5b919250506020813d6020116102dd575b816102c560209383610bbb565b810103126102d9575185919061027861026d565b5f80fd5b3d91506102b8565b6040513d8a823e3d90fd5b6102fd9198505f90610bbb565b5f96602061023c565b6040513d5f823e3d90fd5b9093506020813d60201161033d575b8161032d60209383610bbb565b810103126102d95751925f6101b7565b3d9150610320565b631fb915a760e31b5f5260045ffd5b346102d95760203660031901126102d9576001600160a01b03610375610b4b565b61037d610c60565b1680156103bf576001600160a01b03600154828219821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b346102d95760403660031901126102d9576103eb610b4b565b6001600160a01b036103fb610b61565b91165f5260056020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102d95760203660031901126102d95761043f610b4b565b610447610c87565b335f52600560205260405f206001600160a01b0382165f5260205260405f20549081156104d0576001600160a01b0390335f52600560205260405f208282165f526020525f6040812055169061049e813384610e9f565b6040519081527fdd3840d6dd5c33bfa3b3743f47978de59805ce10f5170e1659be2936e489d73e60203392a360015f55005b63cf47918160e01b5f525f600452600160245260445ffd5b346102d95760403660031901126102d957610501610b4b565b6024359061050d610c60565b6101f4821161052f576001600160a01b03165f52600360205260405f20555f80f35b6358d620b360e01b5f5260045ffd5b346102d9575f3660031901126102d9576020600254604051908152f35b346102d9575f3660031901126102d95760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d95760203660031901126102d9576001600160a01b036105bf610b4b565b165f526003602052602060405f2054604051908152f35b346102d9575f3660031901126102d95760206001600160a01b0360015416604051908152f35b346102d95760203660031901126102d9576001600160a01b0361061d610b4b565b165f90815260036020526040902054801561063e576020905b604051908152f35b506020600254610636565b346102d95760603660031901126102d9576020610636610667610b4b565b61066f610b61565b60443591610c09565b346102d9576101003660031901126102d957610692610b4b565b61069a610b61565b906106a3610b77565b916064356084359060a4359460c4359360e43567ffffffffffffffff81116102d9576106d3903690600401610b8d565b6106de979197610c87565b8842116109a65761083a906040519860208a017f1605d38f16362508f9156040bddd3aeadb19a55923f0d909d03527e49490c0f481526001600160a01b0385169a8b60408201526001600160a01b03871660608201526001600160a01b0388169c8d60808301528960a08301528a60c083015260e08201528a610100820152610100815261076e61012082610bbb565b51902060405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527fcf28fe6d6b103093f66376be2e9d1de0cc43069bc3a973154c752d0d0a98139060408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815261080360c082610bbb565b5190209060405190602082019261190160f01b84526022830152604282015260428152610831606282610bbb565b51902084610ed8565b156109975761084b86858386610ca5565b948511610345576040516312dc51a560e31b8152600481018990526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610306575f91610978575b501561096957604051633b2a7c0560e21b81523360048201526020816024818c5afa908115610306575f9161093a575b501561092c5761091b61092097602099604051916323b872dd60e01b8c840152602483015230604483015286606483015260648252610916608483610bbb565b610fdc565b610e07565b60015f55604051908152f35b6282b42960e81b5f5260045ffd5b61095c915060203d602011610962575b6109548183610bbb565b810190610bf1565b896108d6565b503d61094a565b6367cc8b7560e01b5f5260045ffd5b610991915060203d602011610962576109548183610bbb565b896108a6565b63f9d36a7160e01b5f5260045ffd5b63241d197f60e11b5f5260045ffd5b346102d9575f3660031901126102d9576109cd610c60565b5f6001600160a01b0360015481198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102d9575f3660031901126102d9576040805190610a268183610bbb565b6015825260208201917f58343032466163696c697461746f722d312e302e30000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b346102d95760203660031901126102d9576004355f526004602052602060ff60405f2054166040519015158152f35b346102d95760203660031901126102d957600435610ac8610c60565b6101f4811161052f5760407f9b6bf5a61deb3c460999ea46c3ff444018a6f424eb8807d5e7e7ca031461cb9891600254908060025582519182526020820152a1005b346102d9575f3660031901126102d9576020906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600435906001600160a01b03821682036102d957565b602435906001600160a01b03821682036102d957565b604435906001600160a01b03821682036102d957565b9181601f840112156102d95782359167ffffffffffffffff83116102d957602083818601950101116102d957565b90601f8019910116810190811067ffffffffffffffff821117610bdd57604052565b634e487b7160e01b5f52604160045260245ffd5b908160209103126102d9575180151581036102d95790565b916001600160a01b0360405192816020850195168552166040830152606082015260608152610c39608082610bbb565b51902090565b91908203918211610c4c57565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03600154163303610c7457565b63118cdaa760e01b5f523360045260245ffd5b60025f5414610c965760025f55565b633ee5aeb560e01b5f5260045ffd5b9392604051632474521560e21b81527f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f60048201523360248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610306575f91610de8575b501561092c57805f52600460205260ff60405f205416610dda57610d449185610c09565b805f52600460205260ff60405f205416610dda575f52600460205260405f20600160ff19825416179055335f52600360205260405f2054908115610dd0575b818102918183041490151715610c4c5761271090049182610da15750565b335f5260056020526001600160a01b0360405f2091165f5260205260405f20805490838201809211610c4c5755565b6002549150610d83565b623f613760e71b5f5260045ffd5b610e01915060203d602011610962576109548183610bbb565b5f610d20565b90936080947fecef7698217b345db7161a8d2ffa4e7109c3ca0fe6e64ca6627ee67be3e818fc6001600160a01b0380809997961694610e50610e498689610c3f565b8588610e9f565b1697889216968793604051908682528760208301526040820152876060820152a3604051936020850195865260408501526060840152608083015260a082015260a08152610c3960c082610bbb565b610ed6926001600160a01b036040519363a9059cbb60e01b6020860152166024840152604483015260448252610916606483610bbb565b565b90919392935f906001600160a01b03831615610fd3576040519160048301602484019560448501916064860193873b15610f425750936064938a80948a9b9c9460209b9a9998630b135d3f60e11b8a525260408a52523701915afa9051630b135d3f60e11b141690565b999350509395505080604014610f8f57604114610f5f5750505050565b60408092939496508101355f1a60205281375b5f526020600160805f825afa511860601b3d11915f606052604052565b507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9192939550602081013590601b8260ff1c016020523560405216606052610f72565b505f9450505050565b5f6001600160a01b038192169260208151910182855af13d15611079573d67ffffffffffffffff8111610bdd57604051611036929091611026601f8201601f191660200184610bbb565b82523d5f602084013e5b83611085565b805190811515918261105e575b505061104c5750565b635274afe760e01b5f5260045260245ffd5b6110719250602080918301019101610bf1565b155f80611043565b61103690606090611030565b906110a9575080511561109a57805190602001fd5b630a12f52160e11b5f5260045ffd5b815115806110d6575b6110ba575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156110b256fea164736f6c6343000821000a"` diff --git a/api/@aastar/core/variables/XPNTS_FACTORY_ADDRESS.md b/api/@aastar/core/variables/XPNTS_FACTORY_ADDRESS.md index 84d1a84b2..2b53be6aa 100644 --- a/api/@aastar/core/variables/XPNTS_FACTORY_ADDRESS.md +++ b/api/@aastar/core/variables/XPNTS_FACTORY_ADDRESS.md @@ -1,3 +1,3 @@ > **XPNTS\_FACTORY\_ADDRESS**: `` `0x${string}` `` -Defined in: [packages/core/src/constants.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/constants.ts#L38) +Defined in: [packages/core/src/constants.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L38) diff --git a/api/@aastar/core/variables/xPNTsFactoryABI.md b/api/@aastar/core/variables/xPNTsFactoryABI.md index 6049fe69b..0e33395c2 100644 --- a/api/@aastar/core/variables/xPNTsFactoryABI.md +++ b/api/@aastar/core/variables/xPNTsFactoryABI.md @@ -1,3 +1,3 @@ > `const` **xPNTsFactoryABI**: `any` -Defined in: [packages/core/src/abis/index.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L70) +Defined in: [packages/core/src/abis/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L104) diff --git a/api/@aastar/core/variables/xPNTsFactoryArtifact.md b/api/@aastar/core/variables/xPNTsFactoryArtifact.md index f332d07f4..323775e9b 100644 --- a/api/@aastar/core/variables/xPNTsFactoryArtifact.md +++ b/api/@aastar/core/variables/xPNTsFactoryArtifact.md @@ -1,6 +1,6 @@ > `const` **xPNTsFactoryArtifact**: `object` = `xPNTsFactoryABIData` -Defined in: [packages/core/src/abis/index.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L71) +Defined in: [packages/core/src/abis/index.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L105) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:71](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x60c03461022457601f614e0f38819003918201601f19168301916001600160401b038311848410176101ea57808492604094855283398101031261022457610052602061004b83610228565b9201610228565b903315610211575f8054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b038316156101fe576135298181016001600160401b038111838210176101ea5782916118e6833903905ff080156101df5760018060a01b031660a05260018060a01b031660018060a01b0319600154161760015560805266470de4df820000600655671bc16d674ec800006024604051634465466960e01b81526005600482015220556714d1120d7b16000060266040516547616d696e6760d01b8152600560068201522055670de0b6b3a764000060266040516514dbd8da585b60d21b81526005600682015220556710a741a46278000060236040516244414f60e81b815260056003820152205567120a871cc002000060236040516213919560ea1b81526005600382015220556040516116a9908161023d823960805181818161078e0152611348015260a0518181816107fd0152610e740152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b634726455360e11b5f525f60045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b51906001600160a01b03821682036102245756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b1461131e5750806308c2ddcd146112c35780630ff65414146112a65780632598c32a146111ed5780632a5c792a1461110b578063358064a81461109e57806335fa61fa14611037578063382c803614610f7157806354fd4d5014610ee8578063594a6f2314610ecb57806359734e1a14610ecb5780635ae48ba414610e985780635c60da1b14610e48578063715018a614610dcc5780637ade132c14610d045780638da5cb5b14610cd25780638dbb03b114610caf578063954ebd3b146106685780639bb0f5991461061f578063a137891e146105fc578063a5509758146104dd578063ab7984491461027f578063ae9a6d6f14610432578063b2bcfd3414610406578063b8d7b669146103bf578063be382cdb146102d6578063df9a70ea1461027f578063ec81aadb1461022f5763f2fde38b1461015d575f80fd5b3461022c57602060031936011261022c5773ffffffffffffffffffffffffffffffffffffffff61018b61136c565b610193611627565b1680156102005773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b80fd5b503461022c57602060031936011261022c576004359060045482101561022c57602073ffffffffffffffffffffffffffffffffffffffff61026f846114d0565b90549060031b1c16604051908152f35b503461022c57602060031936011261022c576004359067ffffffffffffffff821161022c57602080806102b53660048701611419565b604051928184925191829101835e8101600581520301902054604051908152f35b503461022c57602060031936011261022c576102f061136c565b9073ffffffffffffffffffffffffffffffffffffffff82168152600360205260408120906040516103208161138f565b6103518354808352600185015490816020850152606060036002880154976040870198895201549401938452611515565b92601e840292848404601e1485151715610392575061037160a095611555565b90519151926040519485526020850152604084015260608301526080820152f35b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526011600452fd5b503461022c57602060031936011261022c5773ffffffffffffffffffffffffffffffffffffffff6040602092826103f461136c565b16815260028452205416604051908152f35b503461022c57602060031936011261022c57602061042a61042561136c565b611555565b604051908152f35b503461022c57602060031936011261022c57604060809173ffffffffffffffffffffffffffffffffffffffff61046661136c565b82606085516104748161138f565b828152826020820152828782015201521681526003602052206040516104998161138f565b815491828252600181015460208301908152606060036002840154936040860194855201549301928352604051938452516020840152516040830152516060820152f35b503461022c57604060031936011261022c5760043567ffffffffffffffff81116105f85761050f903690600401611419565b6024359061051b611627565b811515806105e6575b156105885760207f4bea76f3309d60543efdcea3904bba05cd2c7a2e58668e7de988d525fd6a3f969160405190848151928481818501958087835e8101600581520301902055604051918291518091835e810186815203902092604051908152a280f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c6964206d756c7469706c69657200000000000000000000000000006044820152fd5b50678ac7230489e80000821115610524565b5080fd5b503461022c578060031936011261022c5760206040516714d1120d7b1600008152f35b503461022c57602060031936011261022c5773ffffffffffffffffffffffffffffffffffffffff60406020928261065461136c565b168152600284522054161515604051908152f35b5034610bbe5760c0600319360112610bbe5760043567ffffffffffffffff8111610bbe5761069a903690600401611419565b9060243567ffffffffffffffff8111610bbe576106bb903690600401611419565b9160443567ffffffffffffffff8111610bbe576106dc903690600401611419565b9160643567ffffffffffffffff8111610bbe576106fd903690600401611419565b60a4359073ffffffffffffffffffffffffffffffffffffffff8216809203610bbe576040517f91d148540000000000000000000000000000000000000000000000000000000081527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c074600482015233602482015260208160448173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610bb3575f91610c74575b5015610c1657335f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f205416610bea576e5af43d82803e903d91602b57fd5bf37f0000000000000000000000000000000000000000000000000000000000000000763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff8260881c16175f5260781b1760205273ffffffffffffffffffffffffffffffffffffffff603760095ff016948515610bc257853b15610bbe576108e75f916108f960405194859384937ff0ce3dd200000000000000000000000000000000000000000000000000000000855260c060048601526108cf8d6108bd8d60c489019061148d565b9060031988830301602489015261148d565b9033604487015260031986830301606487015261148d565b9060031984830301608485015261148d565b60843560a4830152038183895af18015610bb357610b9e575b5073ffffffffffffffffffffffffffffffffffffffff6001541680610ab0575b5080610a40575b50338152600260205260408120837fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556004549068010000000000000000821015610a135750927fabfc2cb9c596be68324e2badae1694b9003727b1c82695e6c2cfa7ad8a5875926109fa84936109bd876001602099016004556114d0565b81549060031b9073ffffffffffffffffffffffffffffffffffffffff88831b921b1916179055610a0860405192839260408452604084019061148d565b82810389840152339561148d565b0390a3604051908152f35b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b833b156105f857604051907faae64da20000000000000000000000000000000000000000000000000000000082526004820152818160248183885af18015610aa557908291610a90575b50610939565b81610a9a916113d8565b61022c57805f610a8a565b6040513d84823e3d90fd5b843b15610b8557604051907f7ade132c0000000000000000000000000000000000000000000000000000000082526004820152828160248183895af18015610b7a57908391610b89575b505073ffffffffffffffffffffffffffffffffffffffff60015416843b15610b8557604051907faae64da20000000000000000000000000000000000000000000000000000000082526004820152828160248183895af18015610b7a57908391610b65575b50610932565b81610b6f916113d8565b6105f857815f610b5f565b6040513d85823e3d90fd5b8280fd5b81610b93916113d8565b6105f857815f610afa565b610bab9192505f906113d8565b5f905f610912565b6040513d5f823e3d90fd5b5f80fd5b7fc2f868f4000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f29ab51bf000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f43616c6c6572206d75737420626520436f6d6d756e69747900000000000000006044820152fd5b90506020813d602011610ca7575b81610c8f602093836113d8565b81010312610bbe57518015158103610bbe575f6107be565b3d9150610c82565b34610bbe575f600319360112610bbe57602060405168056bc75e2d631000008152f35b34610bbe575f600319360112610bbe57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610bbe576020600319360112610bbe5773ffffffffffffffffffffffffffffffffffffffff610d3261136c565b610d3a611627565b168015610d6e577fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001555f80f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152fd5b34610bbe575f600319360112610bbe57610de4611627565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610bbe575f600319360112610bbe57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610bbe575f600319360112610bbe57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b34610bbe575f600319360112610bbe576020600654604051908152f35b34610bbe575f600319360112610bbe57610f6d604051610f096060826113d8565b602281527f78504e5473466163746f72792d322e312e302d636c6f6e652d6f7074696d697a60208201527f6564000000000000000000000000000000000000000000000000000000000000604082015260405191829160208352602083019061148d565b0390f35b34610bbe576080600319360112610bbe576044356064358115611027575b8015611018575b60039060405192610fa68461138f565b60043584526020840160243581526040850191825260608501928352335f528360205260405f209451855551600185015551600284015551910155610fea33611555565b6040519081527f2b4eaa806f1ef4367c0f395b151c87df87dcd9a99bdfa956df2e02a9a24d805e60203392a2005b506714d1120d7b160000610f96565b670de0b6b3a76400009150610f8f565b34610bbe576020600319360112610bbe5773ffffffffffffffffffffffffffffffffffffffff61106561136c565b165f526003602052608060405f208054906001810154906003600282015491015491604051938452602084015260408301526060820152f35b34610bbe576080600319360112610bbe5760443567ffffffffffffffff8111610bbe576110cf903690600401611419565b604051815160643592602091839181908401835e81016005815203019020549081156110275780156110185760039060405192610fa68461138f565b34610bbe575f600319360112610bbe576040518060206004549283815201809260045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b905f5b8181106111c157505050816111699103826113d8565b604051918291602083019060208452518091526040830191905f5b818110611192575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611184565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201611153565b34610bbe576020600319360112610bbe57600435611209611627565b80156112485760407ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d291600654908060065582519182526020820152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5072696365206d75737420626520706f736974697665000000000000000000006044820152fd5b34610bbe575f600319360112610bbe576020600454604051908152f35b34610bbe576020600319360112610bbe5773ffffffffffffffffffffffffffffffffffffffff6112f161136c565b165f526002602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b34610bbe575f600319360112610bbe5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610bbe57565b6080810190811067ffffffffffffffff8211176113ab57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176113ab57604052565b81601f82011215610bbe5780359067ffffffffffffffff82116113ab576040519261146c601f84017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016602001856113d8565b82845260208383010111610bbe57815f926020809301838601378301015290565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b6004548110156114e85760045f5260205f2001905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181029291811591840414171561152857565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff165f52600360205260405f206040516115828161138f565b815480825260018301548060208401526060600360028601549560408601968752015493019283528115611616576115b991611515565b90601e820291808304601e1490151715611528576115ec6115f4926ec097ce7bc90715b34b9f1000000000945190611515565b905190611515565b049068056bc75e2d63100000821061160857565b68056bc75e2d631000009150565b5050505068056bc75e2d6310000090565b73ffffffffffffffffffffffffffffffffffffffff5f5416330361164757565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea2646970667358221220027d66aad81966788341afb47a3a012a4b2c221a99ecd296ecfa76720337cd5a64736f6c634300082100336101606040523461049a5760405161001860208261049e565b5f81526040519061002a60208361049e565b5f82526040519161003c60208461049e565b5f83526040519161004e60408461049e565b60018352603160f81b60208401908152825190926001600160401b0382116103955760035490600182811c92168015610490575b60208310146103775781601f84931161041a575b50602090601f83116001146103b4575f926103a9575b50508160011b915f199060031b1c1916176003555b83516001600160401b03811161039557600454600181811c9116801561038b575b602082101461037757601f8111610309575b50602094601f82116001146102a6579481929394955f9261029b575b50508160011b915f199060031b1c1916176004555b61012e816104c1565b6101205261013b83610654565b6101405260208151910120918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526101a860c08261049e565b5190206080523060c0525f5160206135095f395f51905f525460ff8160401c1661028c576002600160401b03196001600160401b03821601610236575b604051612d7090816107998239608051816123cd015260a0518161248a015260c0518161239e015260e0518161241c0152610100518161244201526101205181611385015261014051816113ae0152f35b6001600160401b0319166001600160401b039081175f5160206135095f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f6101e5565b63f92ee8a960e01b5f5260045ffd5b015190505f80610110565b601f1982169560045f52805f20915f5b8881106102f1575083600195969798106102d9575b505050811b01600455610125565b01515f1960f88460031b161c191690555f80806102cb565b919260206001819286850151815501940192016102b6565b818111156100f45760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b6020841061036f575b81601f9101920160051c03905f5b8281106103625750506100f4565b5f82820155600101610354565b5f9150610346565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e2565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100ac565b60035f9081528281209350601f198516905b81811061040257509084600195949392106103ea575b505050811b016003556100c1565b01515f1960f88460031b161c191690555f80806103dc565b929360206001819287860151815501950193016103c6565b828111156100965760035f52909150601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60208510610488575b849392601f0160051c82900391015f5b828110610478575050610096565b5f8183015585945060010161046a565b5f915061045a565b91607f1691610082565b5f80fd5b601f909101601f19168101906001600160401b0382119082101761039557604052565b908151602081105f1461053b575090601f8151116104fb5760208151910151602082106104ec571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161039557600554600181811c9116801561064a575b602082101461037757601f811161060b575b50602092601f82116001146105aa57928192935f9261059f575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610586565b601f1982169360055f52805f20915f5b8681106105f357508360019596106105db575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806105cd565b919260206001819286850151815501940192016105ba565b8181111561056c5760055f5260205f20601f80840160051c809201920160051c03905f5b82811061063d57505061056c565b5f8282015560010161062f565b90607f169061055a565b908151602081105f1461067f575090601f8151116104fb5760208151910151602082106104ec571790565b6001600160401b03811161039557600654600181811c9116801561078e575b602082101461037757601f811161074f575b50602092601f82116001146106ee57928192935f926106e3575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806106ca565b601f1982169360065f52805f20915f5b868110610737575083600195961061071f575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f8080610711565b919260206001819286850151815501940192016106fe565b818111156106b05760065f5260205f20601f80840160051c809201920160051c03905f5b8281106107815750506106b0565b5f82820155600101610773565b90607f169061069e56fe60806040526004361015610011575f80fd5b5f3560e01c806306fdde0314611c8e578063095ea7b314611c685780631296ee6214611c3057806318160ddd14611c1357806323b872dd14611ac457806325073b3a14611a375780632dd3100014611a115780632ecd4e7d146112f7578063313ce567146119f65780633644e515146119dc57806338518bfe146119b65780633ba0b9a9146119995780634000aea01461193557806340c10f191461189c57806342966c681461187f5780635054dbd01461185957806354fd4d50146117fa578063623330ae1461174257806366b48f91146117275780636b09de451461170b57806370a08231146116d45780637a5b4f59146116425780637ade132c146114e85780637ecebe00146114b05780637fd6327a1461148157806384b0196e1461136d5780638d0745471461134a57806395d89b411461132f5780639a78e72e146112f75780639dc29fac14611198578063a9059cbb14611167578063aae64da2146110d4578063b83aa2de14610fff578063b9e205ae14610f3c578063c504e20914610ece578063c6d572ae14610e9b578063d49bdad014610e4f578063d505accf14610cc9578063dd62ed3e14610c95578063f0ce3dd2146103ed578063f1d85d55146103b0578063f9ec7f241461038c5763fa74542d146101f2575f80fd5b346103885760406003193601126103885761020b611cce565b602435906001600160a01b03600a5416801561031e5733036102f25769010f0cf064dd5920000082116102875760206001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5921692835f526012825260405f2061027c828254612387565b9055604051908152a2005b60405162461bcd60e51b815260206004820152602160248201527f53696e676c65207472616e73616374696f6e206c696d6974206578636565646560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608490fd5b7f8e4a23d6000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b608460405162461bcd60e51b815260206004820152602560248201527f53797374656d3a2053757065725061796d6173746572206e6f7420636f6e666960448201527f67757265640000000000000000000000000000000000000000000000000000006064820152fd5b5f80fd5b34610388575f60031936011261038857602060405169010f0cf064dd592000008152f35b34610388576020600319360112610388576001600160a01b036103d1611cce565b165f52600b602052602060ff60405f2054166040519015158152f35b346103885760c06003193601126103885760043567ffffffffffffffff81116103885761041e903690600401612064565b60243567ffffffffffffffff81116103885761043e903690600401612064565b6044356001600160a01b0381168091036103885760643567ffffffffffffffff811161038857610472903690600401612064565b60843567ffffffffffffffff811161038857610492903690600401612064565b60a435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610c8d575b6001149081610c83575b159081610c7a575b50610c52578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055610bfd575b508015610bd257337fffffffffffffffffffffffff000000000000000000000000000000000000000060085416176008557fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095580519067ffffffffffffffff82116108a35781906105b4600d54611d9d565b601f8111610b5b575b50602090601f8311600114610ad9575f92610ace575b50505f198260011b9260031b1c191617600d555b80519067ffffffffffffffff82116108a3578190610606600e54611d9d565b601f8111610a57575b50602090601f83116001146109d5575f926109ca575b50505f198260011b9260031b1c191617600e555b835167ffffffffffffffff81116108a357610655601054611d9d565b601f811161095c575b50602094601f82116001146108db579481929394955f926108d0575b50505f198260011b9260031b1c1916176010555b825167ffffffffffffffff81116108a3576106aa601154611d9d565b601f8111610835575b506020601f82116001146107b457819293945f926107a9575b50505f198260011b9260031b1c1916176011555b801561079a575b600f55335f52600b60205260405f20600160ff1982541617905561070757005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b50670de0b6b3a76400006106e7565b0151905084806106cc565b601f1982169060115f527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68915f5b81811061081d57509583600195969710610805575b505050811b016011556106e0565b01515f1960f88460031b161c191690558480806107f7565b9192602060018192868b0151815501940192016107e2565b818111156106b35760115f52601f820160051c906020831061089b575b601f82910160051c03905f5b82811061086c5750506106b3565b5f8282017f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68015560010161085e565b5f9150610852565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b01519050858061067a565b601f1982169560105f527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae672915f5b8881106109445750836001959697981061092c575b505050811b0160105561068e565b01515f1960f88460031b161c1916905585808061091e565b91926020600181928685015181550194019201610909565b8181111561065e5760105f52601f820160051c90602083106109c2575b601f82910160051c03905f5b82811061099357505061065e565b5f8282017f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720155600101610985565b5f9150610979565b015190508680610625565b91601f191691600e5f527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd925f5b818110610a3f5750908460019594939210610a27575b505050811b01600e55610639565b01515f1960f88460031b161c19169055868080610a19565b92936020600181928786015181550195019301610a03565b8281111561060f57909150600e5f52601f830160051c9060208410610ac6575b9080601f8594930160051c03905f5b828110610a9457505061060f565b5f8183017fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0155859450600101610a86565b5f9150610a77565b0151905087806105d3565b91601f191691600d5f527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5925f5b818110610b435750908460019594939210610b2b575b505050811b01600d556105e7565b01515f1960f88460031b161c19169055878080610b1d565b92936020600181928786015181550195019301610b07565b828111156105bd57909150600d5f52601f830160051c9060208410610bca575b9080601f8594930160051c03905f5b828110610b985750506105bd565b5f8183017fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50155859450600101610b8a565b5f9150610b7b565b7f8e4c8aa6000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00558761053b565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b905015896104e8565b303b1591506104e0565b8791506104d6565b34610388576040600319360112610388576020610cc1610cb3611cce565b610cbb611ce4565b90612338565b604051908152f35b346103885760e060031936011261038857610ce2611cce565b610cea611ce4565b604435906064359260843560ff8116810361038857844211610e2357610dde610dd56001600160a01b039283851697885f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b6040840152878a1660608401528a608084015260a083015260c082015260c08152610d8860e082611d34565b519020610d93612394565b90604051917f190100000000000000000000000000000000000000000000000000000000000083526002830152602282015260c43591604260a4359220612ad6565b90929192612b63565b16848103610df35750610df19350612677565b005b84907f4b800e46000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b847f62791302000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b34610388575f600319360112610388576001600160a01b036009541633036102f257600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055005b34610388575f60031936011261038857610eca610eb6611fcf565b604051918291602083526020830190611ca9565b0390f35b3461038857602060031936011261038857610ee7611cce565b6001600160a01b036009541633036102f2576001600160a01b0316805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b34610388576020600319360112610388576004356001600160a01b036008541633141580610fea575b6102f2578015610fa6577fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde6040600f548151908152836020820152a1600f55005b606460405162461bcd60e51b815260206004820152601c60248201527f45786368616e676520726174652063616e6e6f74206265207a65726f000000006044820152fd5b506001600160a01b0360095416331415610f65565b3461038857606060031936011261038857611018611cce565b6024356044356001600160a01b03600a5416330361109f57805f52600c60205260ff60405f205416611074575f52600c60205260405f20600160ff1982541617905569010f0cf064dd59200000811161028757610df1916125dc565b7fe18b4060000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f8e4a23d6000000000000000000000000000000000000000000000000000000005f526001600160a01b03331660045260245ffd5b34610388576020600319360112610388576110ed611cce565b6001600160a01b036009541633141580611152575b6102f2576001600160a01b03168015610bd257805f52600b60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b506001600160a01b0360085416331415611102565b346103885760406003193601126103885761118d611183611cce565b6024359033612622565b602060405160018152f35b34610388576040600319360112610388576111b1611cce565b6024356001600160a01b03600a5416331461128d576001600160a01b03821633036111e0575b610df1916125dc565b6111ea3383612338565b918183106112245781835f19610df19503611209575b505091506111d7565b61121d9161121691612165565b3383612677565b8184611200565b608460405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602c60248201527f53757065725061796d6173746572206d75737420757365206275726e46726f6d60448201527f576974684f7048617368282900000000000000000000000000000000000000006064820152fd5b34610388576020600319360112610388576001600160a01b03611318611cce565b165f526012602052602060405f2054604051908152f35b34610388575f60031936011261038857610eca610eb6611f3a565b3461038857602061136461135d36611cfa565b9291612338565b10604051908152f35b34610388575f600319360112610388576114256113a97f000000000000000000000000000000000000000000000000000000000000000061290b565b6113d27f0000000000000000000000000000000000000000000000000000000000000000612a1e565b6020611433604051926113e58385611d34565b5f84525f3681376040519586957f0f00000000000000000000000000000000000000000000000000000000000000875260e08588015260e0870190611ca9565b908582036040870152611ca9565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b82811061146a57505050500390f35b83518552869550938101939281019260010161145b565b34610388576020600319360112610388576004355f52600c602052602060ff60405f2054166040519015158152f35b34610388576020600319360112610388576001600160a01b036114d1611cce565b165f526007602052602060405f2054604051908152f35b3461038857602060031936011261038857611501611cce565b6001600160a01b03600854163314158061162d575b6102f2576001600160a01b03168015610bd2576001600160a01b03600a541680151580611623575b6115d0575b50807fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a55805f52600b60205260405f20600160ff19825416179055807fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a27f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b805f52600b60205260ff60405f2054161561154357805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a281611543565b508181141561153e565b506001600160a01b0360095416331415611516565b34610388575f600319360112610388576116a061165d611dee565b611665611f3a565b6116ca6001600160a01b0360095416916116bc611680611fcf565b6116ae61168b611ea5565b9360405198899860a08a5260a08a0190611ca9565b9088820360208a0152611ca9565b908682036040880152611ca9565b908482036060860152611ca9565b9060808301520390f35b34610388576020600319360112610388576001600160a01b036116f5611cce565b165f525f602052602060405f2054604051908152f35b3461038857602060031936011261038857610df160043561219f565b34610388575f60031936011261038857610eca610eb6611ea5565b346103885760206003193601126103885761175b611cce565b600954906001600160a01b038216908133036102f2576001600160a01b0316809281156117ce577fffffffffffffffffffffffff000000000000000000000000000000000000000016176009557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b507f8e4c8aa6000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b34610388575f60031936011261038857610eca60405161181b604082611d34565b601581527f58504e54732d332e302e302d756e6c696d6974656400000000000000000000006020820152604051918291602083526020830190611ca9565b34610388575f6003193601126103885760206001600160a01b03600a5416604051908152f35b3461038857602060031936011261038857610df1600435336125dc565b34610388576040600319360112610388576118b5611cce565b6001600160a01b036008541633141580611920575b61109f576001600160a01b038116156118eb57610df190602435905f6127df565b6001600160a01b03907f8e4c8aa6000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b506001600160a01b03600954163314156118ca565b346103885760606003193601126103885761194e611cce565b60443567ffffffffffffffff811161038857366023820112156103885760209161198561198f923690602481600401359101611d57565b9060243590612082565b6040519015158152f35b34610388575f600319360112610388576020600f54604051908152f35b34610388575f6003193601126103885760206001600160a01b0360095416604051908152f35b34610388575f600319360112610388576020610cc1612394565b34610388575f60031936011261038857602060405160128152f35b34610388575f6003193601126103885760206001600160a01b0360085416604051908152f35b34610388575f600319360112610388576001600160a01b036009541633036102f2576001600160a01b03600a541680151580611aae575b611a7457005b805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b50805f52600b60205260ff60405f205416611a6e565b3461038857611ad236611cfa565b90335f52600b60205260ff60405f205416611afc575b61118d92611af7833383612732565b612622565b6001600160a01b038116338114159081611bfd575b50611b935769010f0cf064dd59200000821115611ae85760405162461bcd60e51b815260206004820152602160248201527f53696e676c65207472616e73616374696f6e206c696d6974206578636565646560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608490fd5b608460405162461bcd60e51b815260206004820152603a60248201527f53656375726974793a20556e617574686f72697a656420726563697069656e7460448201527f20666f72206175746f2d617070726f766564207370656e6465720000000000006064820152fd5b90506001600160a01b03600a5416141584611b11565b34610388575f600319360112610388576020600254604051908152f35b3461038857604060031936011261038857602061198f611c4e611cce565b60405190611c5c8483611d34565b5f825260243590612082565b346103885760406003193601126103885761118d611c84611cce565b6024359033612677565b34610388575f60031936011261038857610eca610eb6611dee565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b600435906001600160a01b038216820361038857565b602435906001600160a01b038216820361038857565b6003196060910112610388576004356001600160a01b038116810361038857906024356001600160a01b0381168103610388579060443590565b90601f601f19910116810190811067ffffffffffffffff8211176108a357604052565b92919267ffffffffffffffff82116108a35760405191611d81601f8201601f191660200184611d34565b829481845281830111610388578281602093845f960137010152565b90600182811c92168015611de4575b6020831014611db757565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611dac565b604051905f8260105491611e0183611d9d565b8083529260018116908115611e865750600114611e27575b611e2592500383611d34565b565b5060105f90815290917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6725b818310611e6a575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492611e52565b60209250611e2594915060ff191682840152151560051b820101611e19565b604051905f82600e5491611eb883611d9d565b8083529260018116908115611e865750600114611edb57611e2592500383611d34565b50600e5f90815290917fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd5b818310611f1e575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492611f06565b604051905f8260115491611f4d83611d9d565b8083529260018116908115611e865750600114611f7057611e2592500383611d34565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b818310611fb3575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492611f9b565b604051905f82600d5491611fe283611d9d565b8083529260018116908115611e86575060011461200557611e2592500383611d34565b50600d5f90815290917fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b818310612048575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492612030565b9080601f830112156103885781602061207f93359101611d57565b90565b9190600260135414612121576120a89260026013556120a18282612328565b50336124b0565b156120b7576001906001601355565b608460405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d7265636569766560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b9190820391821161217257565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b335f52601260205260405f205481156123245780156122e05780821161229c57335f525f6020528160405f20541061223257816121db91612165565b335f52601260205260405f20556121f281336125dc565b335f52601260205260405f205460405191825260208201527f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d60403392a2565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601960248201527f526570617920616d6f756e7420657863656564732064656274000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601060248201527f4e6f206465627420746f207265706179000000000000000000000000000000006044820152fd5b5050565b906123339133612622565b600190565b6001600160a01b0382165f52600b60205260ff60405f205416612380576001600160a01b03165f5260016020526001600160a01b0360405f2091165f5260205260405f205490565b50505f1990565b9190820180921161217257565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016301480612487575b156123ef577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261248160c082611d34565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000046146123c6565b9190803b156125d3576001600160a01b035f81602095612518604051988997889687947f88a7ca5c0000000000000000000000000000000000000000000000000000000086523360048701521660248501526044840152608060648401526084830190611ca9565b0393165af15f9181612576575b5061252f57505f90565b7fffffffff00000000000000000000000000000000000000000000000000000000167f88a7ca5c000000000000000000000000000000000000000000000000000000001490565b9091506020813d6020116125cb575b8161259260209383611d34565b8101031261038857517fffffffff000000000000000000000000000000000000000000000000000000008116810361038857905f612525565b3d9150612585565b50505050600190565b906001600160a01b038216156125f6575f611e25926127df565b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b91906001600160a01b038316156125f6576001600160a01b0381161561264b57611e25926127df565b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b6001600160a01b0316908115612706576001600160a01b03169182156126da5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b91906001600160a01b03811690815f52600b60205260ff60405f2054166127675761275d9084612338565b925f19840361276d575b50505050565b8284106127ab576001600160a01b031680156127065781156126da575f52600160205260405f20905f5260205260405f20910390555f808080612767565b5082907ffb8f41b2000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b91906001600160a01b03831615806128f9575b806128f0575b612806575b611e2592612c3b565b612821816001600160a01b03165f52601260205260405f2090565b548061282d57506127fd565b918161286c92938083115f146128e857945b61285a826001600160a01b03165f52601260205260405f2090565b612865878254612165565b9055612c3b565b81612875575050565b61287f82826125dc565b6001600160a01b03816128e36128c77f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d946001600160a01b03165f52601260205260405f2090565b5460405193849316958360209093929193604081019481520152565b0390a2565b50819461283f565b508115156127f8565b506001600160a01b03811615156127f2565b60ff811461296a5760ff811690601f8211612942576040519161292f604084611d34565b6020808452838101919036833783525290565b7fb3512b0c000000000000000000000000000000000000000000000000000000005f5260045ffd5b50604051600554815f61297c83611d9d565b80835292600181169081156129ff57506001146129a0575b61207f92500382611d34565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b8183106129e357505090602061207f92820101612994565b60209193508060019154838588010152019101909183926129cb565b6020925061207f94915060ff191682840152151560051b820101612994565b60ff8114612a425760ff811690601f8211612942576040519161292f604084611d34565b50604051600654815f612a5483611d9d565b80835292600181169081156129ff5750600114612a775761207f92500382611d34565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310612aba57505090602061207f92820101612994565b6020919350806001915483858801015201910190918392612aa2565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411612b58579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15612b4d575f516001600160a01b03811615612b4357905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b6004811015612c0e5780612b75575050565b60018103612ba5577ff645eedf000000000000000000000000000000000000000000000000000000005f5260045ffd5b60028103612bd957507ffce698f7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b600314612be35750565b7fd78bce0c000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6001600160a01b03169081612cb45760206001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92612c8286600254612387565b6002555b169384612c9f5780600254036002555b604051908152a3565b845f525f825260405f20818154019055612c96565b815f525f60205260405f2054838110612d06576001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9285602093865f525f85520360405f2055612c86565b9190507fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffdfea2646970667358221220e5547380639544a70415454e7e6be2d7b81652dd79b625615c458a80c6c69c4464736f6c63430008210033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` +> **bytecode**: `string` = `"0x60c03461022257601f614fd938819003918201601f19168301916001600160401b038311848410176101e857808492604094855283398101031261022257610052602061004b83610226565b9201610226565b90331561020f575f8054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b038316156101fc576139398181016001600160401b038111838210176101e85782916116a0833903905ff080156101dd5760018060a01b031660a05260018060a01b031660018060a01b0319600154161760015560805266470de4df820000600755671bc16d674ec800006024604051634465466960e01b81526006600482015220556714d1120d7b16000060266040516547616d696e6760d01b81526006808201522055670de0b6b3a764000060266040516514dbd8da585b60d21b815260068082015220556710a741a46278000060236040516244414f60e81b815260066003820152205567120a871cc002000060236040516213919560ea1b8152600660038201522055604051611465908161023b82396080518181816106d901526110eb015260a0518181816107490152610c380152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b634726455360e11b5f525f60045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b51906001600160a01b03821682036102225756fe6080806040526004361015610012575f80fd5b5f905f3560e01c9081621b4db81461110f5750806306433b1b146110cc57806308c2ddcd1461108b5780630ff654141461106e5780632598c32a14610f785780632a5c792a14610eb0578063358064a814610e3857806335fa61fa14610dde578063382c803614610d0d57806354fd4d5014610c9f578063594a6f2314610c8257806359734e1a14610c825780635ae48ba414610c5c5780635c60da1b14610c1957806367d7bc0614610bf0578063715018a614610b995780637ade132c14610b155780638da5cb5b14610af05780638dbb03b11461056d578063931c706514610acf578063954ebd3b146105eb57806396e28d28146105ae5780639bb0f59914610572578063a121377a1461056d578063a137891e1461054a578063a55097581461047c578063ab7984491461025e578063ae9a6d6f146103de578063b2bcfd34146103b2578063b8d7b66914610378578063be382cdb146102b5578063df9a70ea1461025e578063ec81aadb1461021b5763f2fde38b14610193575f80fd5b34610218576020366003190112610218576001600160a01b036101b4611129565b6101bc611432565b1680156102045781546001600160a01b03198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b503461021857602036600319011261021857600435906005548210156102185760206001600160a01b0361024e8461122e565b90549060031b1c16604051908152f35b5034610218576020366003190112610218576004359067ffffffffffffffff821161021857602080806102943660048701611191565b604051928184925191829101835e8101600681520301902054604051908152f35b5034610218576020366003190112610218576102cf611129565b906001600160a01b0382168152600460205260408120906040516102f28161113f565b610323835480835260018501549081602085015260606003600288015497604087019889520154940193845261125a565b92601e840292848404601e1485151715610364575061034360a09561136d565b90519151926040519485526020850152604084015260608301526080820152f35b634e487b7160e01b81526011600452602490fd5b5034610218576020366003190112610218576001600160a01b036040602092826103a0611129565b16815260028452205416604051908152f35b50346102185760203660031901126102185760206103d66103d1611129565b61136d565b604051908152f35b50346102185760203660031901126102185760406080916001600160a01b03610405611129565b82606085516104138161113f565b828152826020820152828782015201521681526004602052206040516104388161113f565b815491828252600181015460208301908152606060036002840154936040860194855201549301928352604051938452516020840152516040830152516060820152f35b50346102185760403660031901126102185760043567ffffffffffffffff8111610546576104ae903690600401611191565b602435906104ba611432565b81158015610535575b6105265760207f4bea76f3309d60543efdcea3904bba05cd2c7a2e58668e7de988d525fd6a3f969160405190848151928481818501958087835e8101600681520301902055604051918291518091835e810186815203902092604051908152a280f35b631bc4bcf760e21b8352600483fd5b50678ac7230489e8000082116104c3565b5080fd5b503461021857806003193601126102185760206040516714d1120d7b1600008152f35b61120b565b5034610218576020366003190112610218576001600160a01b0360406020928261059a611129565b168152600284522054161515604051908152f35b50346102185760203660031901126102185760ff60406020926001600160a01b036105d7611129565b168152600384522054166040519015158152f35b5034610a505760c0366003190112610a505760043567ffffffffffffffff8111610a505761061d903690600401611191565b60243567ffffffffffffffff8111610a505761063d903690600401611191565b60443567ffffffffffffffff8111610a505761065d903690600401611191565b9160643567ffffffffffffffff8111610a505761067e903690600401611191565b926084359360a435916001600160a01b038316809303610a5057604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610a45575f91610a94575b5015610a8557335f5260026020526001600160a01b0360405f205416610a72578515610a63576e5af43d82803e903d91602b57fd5bf37f0000000000000000000000000000000000000000000000000000000000000000763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff8260881c16175f5260781b176020526001600160a01b03603760095ff016958615610a5457863b15610a50575f9161080c9161081e60405195869485946378671ee960e11b865260c060048701526107f46107e260c488018d6111e7565b8781036003190160248901528d6111e7565b336044880152868103600319016064880152906111e7565b848103600319016084860152906111e7565b9060a4830152038183895af18015610a4557610a30575b5084906001600160a01b036001541680610981575b508061092f575b505033845260026020526040842080546001600160a01b031916841790556005546801000000000000000081101561091b5761090284939260406020976108bf8560017fabfc2cb9c596be68324e2badae1694b9003727b1c82695e6c2cfa7ad8a587592970160055561122e565b81549060031b906001600160a01b038a831b921b19161790558681526003895220600160ff198254161790556109106040519283926040845260408401906111e7565b8281038984015233956111e7565b0390a3604051908152f35b634e487b7160e01b85526041600452602485fd5b843b15610546576040519063557326d160e11b82526004820152818160248183895af18015610976571561085157816109679161116f565b61097257835f610851565b8380fd5b6040513d84823e3d90fd5b853b15610a175760405190631eb784cb60e21b825260048201528281602481838a5af1908115610a0c578391610a1b575b50506001600160a01b0360015416853b15610a17576040519063557326d160e11b825260048201528281602481838a5af1908115610a0c5783916109f7575b5061084a565b81610a019161116f565b61054657815f6109f1565b6040513d85823e3d90fd5b8280fd5b81610a259161116f565b61054657815f6109b2565b610a3d9195505f9061116f565b5f935f610835565b6040513d5f823e3d90fd5b5f80fd5b6330be1a3d60e21b5f5260045ffd5b630e52390960e41b5f5260045ffd5b6329ab51bf60e01b5f523360045260245ffd5b631e82e51960e01b5f5260045ffd5b90506020813d602011610ac7575b81610aaf6020938361116f565b81010312610a5057518015158103610a50575f610711565b3d9150610aa2565b34610a50575f366003190112610a5057602060405166038d7ea4c680008152f35b34610a50575f366003190112610a505760206001600160a01b035f5416604051908152f35b34610a50576020366003190112610a50576001600160a01b03610b36611129565b610b3e611432565b168015610b8757600154816001600160a01b0382167f8c48ef656e85255b7e51330f2d5bca7663b2f2f34d2d812c43f780c7c852fd175f80a36001600160a01b03191617600155005b634726455360e11b5f5260045260245ffd5b34610a50575f366003190112610a5057610bb1611432565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610a50576040366003190112610a5057610c09611432565b610c1760243560043561126d565b005b34610a50575f366003190112610a505760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610a50575f366003190112610a505760206001600160a01b0360015416604051908152f35b34610a50575f366003190112610a50576020600754604051908152f35b34610a50575f366003190112610a5057610d09604051610cc060608261116f565b602281527f78504e5473466163746f72792d322e332e302d636c6f6e652d6f7074696d697a602082015261195960f21b60408201526040519182916020835260208301906111e7565b0390f35b34610a50576080366003190112610a505760043560443560643581620f42408411610a635760039215610dcf575b8115610dbf575b60405193610d4f8561113f565b84526020840160243581526040850191825260608501928352335f52600460205260405f209451855551600185015551600284015551910155610d913361136d565b6040519081527f2b4eaa806f1ef4367c0f395b151c87df87dcd9a99bdfa956df2e02a9a24d805e60203392a2005b6714d1120d7b1600009150610d42565b50670de0b6b3a7640000610d3b565b34610a50576020366003190112610a50576001600160a01b03610dff611129565b165f526004602052608060405f208054906001810154906003600282015491015491604051938452602084015260408301526060820152f35b34610a50576080366003190112610a505760043560443567ffffffffffffffff8111610a5057610e6c903690600401611191565b606435620f42408311610a63576040518251600393602091839181908401835e81016006815203019020548015610dcf578115610dbf5760405193610d4f8561113f565b34610a50575f366003190112610a50576040518060206005549283815201809260055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0905f5b818110610f595750505081610f0e91038261116f565b604051918291602083019060208452518091526040830191905f5b818110610f37575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610f29565b82546001600160a01b0316845260209093019260019283019201610ef8565b34610a50576020366003190112610a5057600435610f94611432565b66038d7ea4c680008110801561105c575b61102c576007549081158015610fec575b7ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d2604084848060075582519182526020820152a1005b611b588302838104611b5814821715611048576132c88402918483046132c8141715611048576127109004821090811561103a575b5061102c5782610fb6565b62bfc92160e01b5f5260045ffd5b612710915004811183611021565b634e487b7160e01b5f52601160045260245ffd5b5068056bc75e2d631000008111610fa5565b34610a50575f366003190112610a50576020600554604051908152f35b34610a50576020366003190112610a50576001600160a01b036110ac611129565b165f52600260205260206001600160a01b0360405f205416604051908152f35b34610a50575f366003190112610a505760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610a50575f366003190112610a505780610bb860209252f35b600435906001600160a01b0382168203610a5057565b6080810190811067ffffffffffffffff82111761115b57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff82111761115b57604052565b81601f82011215610a505780359067ffffffffffffffff821161115b57604051926111c6601f8401601f19166020018561116f565b82845260208383010111610a5057815f926020809301838601378301015290565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b34610a50575f366003190112610a5057602060405168056bc75e2d631000008152f35b6005548110156112465760055f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b8181029291811591840414171561104857565b906005548083101561136857828103908111611048578082101561136157505b8101808211611048576001600160a01b0360015416915b8181106112b057505050565b6001600160a01b036112c18261122e565b90549060031b1c1690813b15610a505783600192604051631eb784cb60e21b81528260048201525f8160248183865af19081611351575b50611328577f5d4bb2355e56aab4ce3c351d050e2a54fb3096e84130577503d5f4b940e0e59e5f80a35b016112a4565b7f41c3159aaba10d821e771f08c4f9f3370426fd58cb304fdbd96b5b9e75c872d15f80a3611322565b5f61135b9161116f565b5f6112f8565b905061128d565b505050565b6001600160a01b03165f52600460205260405f2060405161138d8161113f565b815480825260018301548060208401526060600360028601549560408601968752015493019283528115611421576113c49161125a565b90601e820291808304601e1490151715611048576113f76113ff926ec097ce7bc90715b34b9f100000000094519061125a565b90519061125a565b049068056bc75e2d63100000821061141357565b68056bc75e2d631000009150565b5050505068056bc75e2d6310000090565b6001600160a01b035f5416330361144557565b63118cdaa760e01b5f523360045260245ffdfea164736f6c6343000821000a610160604052346104a8576040516100186020826104ac565b5f81526040519061002a6020836104ac565b5f82526040519161003c6020846104ac565b5f83526040519161004e6040846104ac565b60018352603160f81b60208401908152825190926001600160401b0382116103a35760035490600182811c9216801561049e575b60208310146103855781601f849311610428575b50602090601f83116001146103c2575f926103b7575b50508160011b915f199060031b1c1916176003555b83516001600160401b0381116103a357600454600181811c91168015610399575b602082101461038557601f8111610317575b50602094601f82116001146102b4579481929394955f926102a9575b50508160011b915f199060031b1c1916176004555b61012e816104cf565b6101205261013b83610662565b6101405260208151910120918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526101a860c0826104ac565b5190206080523060c05269010f0cf064dd592000006018555f5160206139195f395f51905f525460ff8160401c1661029a576002600160401b03196001600160401b03821601610244575b60405161317290816107a782396080518161292a015260a051816129e7015260c051816128fb015260e051816129790152610100518161299f015261012051816114c7015261014051816114f00152f35b6001600160401b0319166001600160401b039081175f5160206139195f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f6101f3565b63f92ee8a960e01b5f5260045ffd5b015190505f80610110565b601f1982169560045f52805f20915f5b8881106102ff575083600195969798106102e7575b505050811b01600455610125565b01515f1960f88460031b161c191690555f80806102d9565b919260206001819286850151815501940192016102c4565b818111156100f45760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b6020841061037d575b81601f9101920160051c03905f5b8281106103705750506100f4565b5f82820155600101610362565b5f9150610354565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e2565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100ac565b60035f9081528281209350601f198516905b81811061041057509084600195949392106103f8575b505050811b016003556100c1565b01515f1960f88460031b161c191690555f80806103ea565b929360206001819287860151815501950193016103d4565b828111156100965760035f52909150601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60208510610496575b849392601f0160051c82900391015f5b828110610486575050610096565b5f81830155859450600101610478565b5f9150610468565b91607f1691610082565b5f80fd5b601f909101601f19168101906001600160401b038211908210176103a357604052565b908151602081105f14610549575090601f8151116105095760208151910151602082106104fa571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b0381116103a357600554600181811c91168015610658575b602082101461038557601f8111610619575b50602092601f82116001146105b857928192935f926105ad575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610594565b601f1982169360055f52805f20915f5b86811061060157508360019596106105e9575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806105db565b919260206001819286850151815501940192016105c8565b8181111561057a5760055f5260205f20601f80840160051c809201920160051c03905f5b82811061064b57505061057a565b5f8282015560010161063d565b90607f1690610568565b908151602081105f1461068d575090601f8151116105095760208151910151602082106104fa571790565b6001600160401b0381116103a357600654600181811c9116801561079c575b602082101461038557601f811161075d575b50602092601f82116001146106fc57928192935f926106f1575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806106d8565b601f1982169360065f52805f20915f5b868110610745575083600195961061072d575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f808061071f565b9192602060018192868501518155019401920161070c565b818111156106be5760065f5260205f20601f80840160051c809201920160051c03905f5b82811061078f5750506106be565b5f82820155600101610781565b90607f16906106ac56fe6080806040526004361015610012575f80fd5b5f3560e01c908162ef5f4f1461206657508063027e6d671461204e57806306fdde0314612033578063095ea7b31461200d5780631296ee6214611fd557806318160ddd14611fb85780631eb6ca0314611f4b57806320b0585914611f2557806323b872dd14611e4c57806325073b3a14611d6c5780632d6f3a3a14611d4f5780632dd3100014611d295780632ecd4e7d146113cb57806330f5344114611c50578063313ce56714611c355780633258f04514611c065780633644e51514611bec57806338518bfe14611bc65780633ba0b9a914611ba95780634000aea014611b4557806340c10f1914611adf57806342966c6814611ac25780634e4852f314611a365780635054dbd014611a1057806354fd4d50146119c3578063623330ae1461194257806366b48f91146119275780636b09de451461190b57806370a08231146118d45780637a5b4f59146118425780637ade132c146116d35780637c3c26e6146116b35780637ecebe001461167b5780637fd6327a1461164c578063819c2ff8146115a757806384b0196e146114af5780638501dd1b146114415780638d0745471461141e57806395d89b41146114035780639a78e72e146113cb5780639dc29fac14611312578063a9059cbb146112e1578063aae64da21461124e578063ae8866d91461122c578063af43e2d114611208578063b83aa2de1461112f578063b8441cd61461110b578063b9e205ae14610f68578063bf85556514610f4b578063c1550b2814610f2f578063c504e20914610ec1578063c6d572ae14610e8e578063d49bdad014610e04578063d505accf14610ccb578063d5f6e0dd14610cae578063da21d73e14610c51578063dd62ed3e14610c1d578063eca9f01414610be0578063f0ce3dd2146103d2578063f1d85d55146103955763fa74542d146102ba575f80fd5b34610391576040366003190112610391576102d36120a4565b6024359060ff600c5416610382576001600160a01b03600a541680156103735733036103605760185482116103515760206001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5921692835f526016825260405f2061034682825461254d565b9055604051908152a2005b632c1032b560e01b5f5260045ffd5b63472511eb60e11b5f523360045260245ffd5b632da2b14160e21b5f5260045ffd5b6313a5ef3f60e21b5f5260045ffd5b5f80fd5b34610391576020366003190112610391576001600160a01b036103b66120a4565b165f52600b602052602060ff60405f2054166040519015158152f35b346103915760c03660031901126103915760043567ffffffffffffffff81116103915761040390369060040161244a565b60243567ffffffffffffffff81116103915761042390369060040161244a565b6044356001600160a01b0381168091036103915760643567ffffffffffffffff81116103915761045790369060040161244a565b60843567ffffffffffffffff81116103915761047790369060040161244a565b60a435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610bd8575b6001149081610bce575b159081610bc5575b50610bb65767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005585610b77575b508015610b6557336001600160a01b031960085416176008556001600160a01b0319600954161760095580519067ffffffffffffffff821161084b57819061055260105461219c565b601f8111610aee575b50602090601f8311600114610a6a575f92610a5f575b50508160011b915f199060031b1c1916176010555b80519067ffffffffffffffff821161084b5781906105a560115461219c565b601f81116109e8575b50602090601f8311600114610964575f92610959575b50508160011b915f199060031b1c1916176011555b835167ffffffffffffffff811161084b576105f560145461219c565b601f81116108eb575b50602094601f821160011461086a579481929394955f9261085f575b50508160011b915f199060031b1c1916176014555b825167ffffffffffffffff811161084b5761064b60155461219c565b601f81116107dd575b506020601f821160011461075c57819293945f92610751575b50508160011b915f199060031b1c1916176015555b8015610742575b601255335f52600b60205260405f20600160ff19825416179055690a968163f0a57b400000601a5569010f0cf064dd592000006018556106c557005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b50670de0b6b3a7640000610689565b01519050848061066d565b601f1982169060155f527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915f5b8181106107c5575095836001959697106107ad575b505050811b01601555610682565b01515f1960f88460031b161c1916905584808061079f565b9192602060018192868b01518155019401920161078a565b818111156106545760155f52601f820160051c9060208310610843575b601f82910160051c03905f5b828110610814575050610654565b5f8282017f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750155600101610806565b5f91506107fa565b634e487b7160e01b5f52604160045260245ffd5b01519050858061061a565b601f1982169560145f527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec915f5b8881106108d3575083600195969798106108bb575b505050811b0160145561062f565b01515f1960f88460031b161c191690558580806108ad565b91926020600181928685015181550194019201610898565b818111156105fe5760145f52601f820160051c9060208310610951575b601f82910160051c03905f5b8281106109225750506105fe565b5f8282017fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155600101610914565b5f9150610908565b0151905086806105c4565b60115f9081527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c689350601f198516905b8181106109d057509084600195949392106109b8575b505050811b016011556105d9565b01515f1960f88460031b161c191690558680806109aa565b92936020600181928786015181550195019301610994565b828111156105ae5790915060115f52601f830160051c9060208410610a57575b9080601f8594930160051c03905f5b828110610a255750506105ae565b5f8183017f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680155859450600101610a17565b5f9150610a08565b015190508780610571565b60105f9081527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6729350601f198516905b818110610ad65750908460019594939210610abe575b505050811b01601055610586565b01515f1960f88460031b161c19169055878080610ab0565b92936020600181928786015181550195019301610a9a565b8281111561055b5790915060105f52601f830160051c9060208410610b5d575b9080601f8594930160051c03905f5b828110610b2b57505061055b565b5f8183017f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720155859450600101610b1d565b5f9150610b0e565b634726455360e11b5f5260045260245ffd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005587610509565b63f92ee8a960e01b5f5260045ffd5b905015896104cd565b303b1591506104c5565b8791506104bb565b34610391576020366003190112610391576001600160a01b03610c016120a4565b165f52600d602052602060ff60405f2054166040519015158152f35b34610391576040366003190112610391576020610c49610c3b6120a4565b610c436120ba565b9061274a565b604051908152f35b34610391576020366003190112610391576001600160a01b03610c726120a4565b165f526019602052606060405f2054604051906001600160801b038116825267ffffffffffffffff8160801c16602083015260c01c6040820152f35b34610391575f366003190112610391576020601354604051908152f35b346103915760e036600319011261039157610ce46120a4565b610cec6120ba565b604435906064359260843560ff8116810361039157844211610df157610dc5610dbc6001600160a01b039283851697885f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b6040840152878a1660608401528a608084015260a083015260c082015260c08152610d8a60e082612134565b519020610d956128f1565b906040519161190160f01b83526002830152602282015260c43591604260a4359220612f7e565b9092919261300b565b16848103610dda5750610dd89350612bfa565b005b84906325c0072360e11b5f5260045260245260445ffd5b8463313c898160e11b5f5260045260245ffd5b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b036008541680151580610e78575b610e5f575b6008805473ffffffffffffffffffffffffffffffffffffffff19169055005b5f52600b60205260405f2060ff19815416905580610e40565b50805f52600b60205260ff60405f205416610e3b565b34610391575f36600319011261039157610ebd610ea96123b5565b604051918291602083526020830190612080565b0390f35b3461039157602036600319011261039157610eda6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b34610391575f366003190112610391576020604051610e108152f35b34610391575f366003190112610391576020601a54604051908152f35b34610391576020366003190112610391576004356001600160a01b0360085416331415806110f6575b6103605780156110e757655af3107a4000811080156110d4575b6110aa576013548015159081611094575b506110855760125480158015611007575b5060407fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde918151908152836020820152a160125542601355005b611f408202828104611f401482171561107157612ee0830291838304612ee01417156110715761271090048310908115611063575b506110475782610fcd565b90635dd2c95d60e11b5f526004526024526107d060445260645ffd5b61271091500482118361103c565b634e487b7160e01b5f52601160045260245ffd5b6348deb07960e11b5f5260045ffd5b9050610e10810180911161107157421082610fbc565b63068c0e8960e31b5f52600452655af3107a400060245269021e19e0c9bab240000060445260645ffd5b5069021e19e0c9bab24000008111610fab565b63150c57e560e01b5f5260045ffd5b506001600160a01b0360095416331415610f91565b34610391575f366003190112610391576020604051690a968163f0a57b4000008152f35b346103915761113d3661210a565b60ff600c9392935416610382576001600160a01b03600a541633036111f357805f52600f60205260ff60405f20541680156111dd575b6111cb575f52600f60205260405f20600160ff19825416179055601854821161035157670de0b6b3a76400006111c46111bf6111ba610dd8956111b4612799565b90612507565b612538565b612623565b0490612ad7565b63070c5a0360e51b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611173565b63472511eb60e11b5f90815233600452602490fd5b34610391575f36600319011261039157602060405169021e19e0c9bab24000008152f35b34610391575f36600319011261039157602060ff600c54166040519015158152f35b34610391576020366003190112610391576112676120a4565b6001600160a01b0360085416331415806112cc575b610360576001600160a01b03168015610b6557805f52600b60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b506001600160a01b036009541633141561127c565b34610391576040366003190112610391576113076112fd6120a4565b6024359033612bbe565b602060405160018152f35b346103915760403660031901126103915761132b6120a4565b60243560ff600c5416806113b8575b610382576001600160a01b03600a541633146113a9576001600160a01b038216330361136a575b610dd891612ad7565b80611375338461274a565b1061139a57610dd891611389823383612b04565b61139382336127a5565b9150611361565b6307df453760e01b5f5260045ffd5b632d0513d960e11b5f5260045ffd5b506001600160a01b03821633141561133a565b34610391576020366003190112610391576001600160a01b036113ec6120a4565b165f526016602052602060405f2054604051908152f35b34610391575f36600319011261039157610ebd610ea9612320565b34610391576020611438611431366120d0565b929161274a565b10604051908152f35b346103915760203660031901126103915761145a6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600d60205260405f2060ff1981541690557fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf5f80a2005b34610391575f3660031901126103915761154b6114eb7f0000000000000000000000000000000000000000000000000000000000000000612dcc565b6115147f0000000000000000000000000000000000000000000000000000000000000000612ec6565b6020611559604051926115278385612134565b5f84525f368137604051958695600f60f81b875260e08588015260e0870190612080565b908582036040870152612080565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b82811061159057505050500390f35b835185528695509381019392810192600101611581565b34610391576020366003190112610391576115c06120a4565b6001600160a01b036009541690813303610360576001600160a01b031690811561163957811461162757805f52600d60205260405f20600160ff198254161790557f14b842314c1bed1881a6aaf3371cb59429fa3f849dbd8ad0698501dc4aa0574c5f80a2005b63472511eb60e11b5f5260045260245ffd5b50634726455360e11b5f5260045260245ffd5b34610391576020366003190112610391576004355f52600f602052602060ff60405f2054166040519015158152f35b34610391576020366003190112610391576001600160a01b0361169c6120a4565b165f526007602052602060405f2054604051908152f35b34610391575f366003190112610391576020604051655af3107a40008152f35b34610391576020366003190112610391576116ec6120a4565b600c5460ff1615611806576001600160a01b03600954163303610360576001600160a01b03905b168015610b65576001600160a01b03600a5416801515806117fc575b6117a9575b50806001600160a01b0319600a541617600a55805f52600b60205260405f20600160ff19825416179055807fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a27f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b805f52600b60205260ff60405f2054161561173457805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a281611734565b508181141561172f565b6001600160a01b03600854163314158061182d575b610360576001600160a01b0390611713565b506001600160a01b036009541633141561181b565b34610391575f366003190112610391576118a061185d6121d4565b611865612320565b6118ca6001600160a01b0360095416916118bc6118806123b5565b6118ae61188b61228b565b9360405198899860a08a5260a08a0190612080565b9088820360208a0152612080565b908682036040880152612080565b908482036060860152612080565b9060808301520390f35b34610391576020366003190112610391576001600160a01b036118f56120a4565b165f525f602052602060405f2054604051908152f35b3461039157602036600319011261039157610dd860043561263e565b34610391575f36600319011261039157610ebd610ea961228b565b346103915760203660031901126103915761195b6120a4565b600954906001600160a01b03821690813303610360576001600160a01b0316809281156116395773ffffffffffffffffffffffffffffffffffffffff1916176009557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b34610391575f36600319011261039157610ebd6040516119e4604082612134565b600b81526a058504e54732d332e342e360ac1b6020820152604051918291602083526020830190612080565b34610391575f3660031901126103915760206001600160a01b03600a5416604051908152f35b34610391576020366003190112610391576004356001600160a01b036009541633036103605780158015611aaf575b611aa0577ffabe53bf01983df9c24aab2e57a83e6f8a69975380cf9bd0811dd2f431ac4d4660406018548151908152836020820152a1601855005b633494a40d60e21b5f5260045ffd5b50690a968163f0a57b4000008111611a65565b3461039157602036600319011261039157610dd860043533612ad7565b3461039157604036600319011261039157611af86120a4565b6001600160a01b036008541633141580611b30575b6111f3576001600160a01b03811690811561163957610dd890602435905f612c5d565b506001600160a01b0360095416331415611b0d565b3461039157606036600319011261039157611b5e6120a4565b60443567ffffffffffffffff8111610391573660238201121561039157602091611b95611b9f923690602481600401359101612156565b906024359061255a565b6040519015158152f35b34610391575f366003190112610391576020601254604051908152f35b34610391575f3660031901126103915760206001600160a01b0360095416604051908152f35b34610391575f366003190112610391576020610c496128f1565b34610391576020366003190112610391576004355f52601b602052602060ff60405f2054166040519015158152f35b34610391575f36600319011261039157602060405160128152f35b3461039157611c5e3661210a565b60ff600c9392935416610382576001600160a01b03600a5416801561037357330361036057601854831161035157805f52600f60205260ff60405f2054168015611d13575b611d01576001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5926020925f52601b835260405f20600160ff198254161790551692835f526016825260405f2061034682825461254d565b634e7074b160e11b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611ca3565b34610391575f3660031901126103915760206001600160a01b0360085416604051908152f35b34610391575f366003190112610391576020601854604051908152f35b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b03600a541680151580611e36575b611df8575b6001600160a01b0319600e541617600e55600c5460ff811615611dc757005b60ff1916600117600c55337f51745cdc5b4ed1fe5c20c1cbf61290785ef5df0cb643101a29618bed23d8305c5f80a2005b805f52600b60205260405f2060ff198154169055807f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2611da8565b50805f52600b60205260ff60405f205416611da3565b3461039157611e5a366120d0565b90335f52600b60205260ff60405f205416611e84575b61130792611e7f833383612b04565b612bbe565b6001600160a01b03811633811490811580611f10575b611f0157611eb8611eaa856124e3565b611eb2612799565b9061251a565b601854106103515781611eeb575b5015611e705760ff600c54166103825761130792611ee483336127a5565b9250611e70565b90506001600160a01b03600a5416141584611ec6565b634a02e04360e11b5f5260045ffd5b506001600160a01b03600a5416811415611e9a565b34610391575f3660031901126103915760206001600160a01b03600e5416604051908152f35b34610391576020366003190112610391576004356001600160a01b03600954163303610360576001600160801b0381116103515760407f68639863c58fa667262fab7192372355b1b2cb2731dcd7636cedbfcd1900f05d91601a549080601a5582519182526020820152a1005b34610391575f366003190112610391576020600254604051908152f35b34610391576040366003190112610391576020611b9f611ff36120a4565b604051906120018483612134565b5f82526024359061255a565b34610391576040366003190112610391576113076120296120a4565b6024359033612bfa565b34610391575f36600319011261039157610ebd610ea96121d4565b34610391575f36600319011261039157610dd8612468565b34610391575f36600319011261039157806107d060209252f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361039157565b602435906001600160a01b038216820361039157565b6060906003190112610391576004356001600160a01b038116810361039157906024356001600160a01b0381168103610391579060443590565b6060906003190112610391576004356001600160a01b038116810361039157906024359060443590565b90601f8019910116810190811067ffffffffffffffff82111761084b57604052565b92919267ffffffffffffffff821161084b5760405191612180601f8201601f191660200184612134565b829481845281830111610391578281602093845f960137010152565b90600182811c921680156121ca575b60208310146121b657565b634e487b7160e01b5f52602260045260245ffd5b91607f16916121ab565b604051905f82601454916121e78361219c565b808352926001811690811561226c575060011461220d575b61220b92500383612134565b565b5060145f90815290917fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b81831061225057505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612238565b6020925061220b94915060ff191682840152151560051b8201016121ff565b604051905f826011549161229e8361219c565b808352926001811690811561226c57506001146122c15761220b92500383612134565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b81831061230457505090602061220b928201016121ff565b60209193508060019154838589010152019101909184926122ec565b604051905f82601554916123338361219c565b808352926001811690811561226c57506001146123565761220b92500383612134565b5060155f90815290917f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b81831061239957505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612381565b604051905f82601054916123c88361219c565b808352926001811690811561226c57506001146123eb5761220b92500383612134565b5060105f90815290917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6725b81831061242e57505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612416565b9080601f830112156103915781602061246593359101612156565b90565b6001600160a01b0360095416330361036057600c5460ff8116156124e0576001600160a01b03600a54166001600160a01b03600e5416146124d15760ff1916600c55337f56a64ec95bb93ae6af923c082ef9ab2bd5bdd6f1a121c45e8c05a39ab73bbf065f80a2565b637f7fe78560e11b5f5260045ffd5b50565b90670de0b6b3a7640000820291808304670de0b6b3a7640000149015171561107157565b8181029291811591840414171561107157565b8115612524570490565b634e487b7160e01b5f52601260045260245ffd5b90670de0b6b3a7640000820180921161107157565b9190820180921161107157565b91906002601754146125de57612580926002601755612579828261273a565b5033612a0d565b1561258f576001906001601755565b60405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d726563656976656044820152603960f91b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b5f1981019190821161107157565b9190820391821161107157565b335f52601660205260405f2054811561273657801561272857335f525f6020528160405f20541061271957612671612799565b670de0b6b3a7640000830290838204670de0b6b3a764000003611071576126979161251a565b91821561271457818311612705576126b2836126c593612631565b335f52601660205260405f205533612ad7565b335f52601660205260405f205460405191825260208201527f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d60403392a2565b63718e827560e11b5f5260045ffd5b505050565b63588569f760e01b5f5260045ffd5b6254641f60e81b5f5260045ffd5b5050565b906127459133612bbe565b600190565b6001600160a01b0382165f52600b60205260ff60405f205416612792576001600160a01b03165f5260016020526001600160a01b0360405f2091165f5260205260405f205490565b50505f1990565b6012549081156110e757565b6001600160a01b031690815f52601960205260405f2091825467ffffffffffffffff8160801c1680159081156128d9575b50612851575b506001600160801b03835416916127f3818461254d565b92601a549081851161281d57505050506001600160801b03166001600160801b0319825416179055565b808211156128485761282e91612631565b915b63c4fae44360e01b5f5260045260245260445260645ffd5b50505f91612830565b7fffffffffffffffff0000000000000000000000000000000000000000000000001642608090811b77ffffffffffffffff000000000000000000000000000000001691909117808555604051911c67ffffffffffffffff16815281907fbee963043b15401a5f01418733a5739b29c9d9e128ecfadc5b2078bffe8ba91790602090a25f6127dc565b9050620151808101809111611071574210155f6127d6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163014806129e4575b1561294c577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a081526129de60c082612134565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614612923565b9190803b15612ace576001600160a01b035f81602095612a5c60405198899788968794632229f29760e21b86523360048701521660248501526044840152608060648401526084830190612080565b0393165af15f9181612a89575b50612a7357505f90565b6001600160e01b031916632229f29760e21b1490565b9091506020813d602011612ac6575b81612aa560209383612134565b8101031261039157516001600160e01b03198116810361039157905f612a69565b3d9150612a98565b50505050600190565b906001600160a01b03821615612af1575f61220b92612c5d565b634b637e8f60e11b5f525f60045260245ffd5b91906001600160a01b03811690815f52600b60205260ff60405f205416612b3957612b2f908461274a565b9260018401612b3f575b50505050565b828410612ba3576001600160a01b03168015612b90578115612b7d575f52600160205260405f20905f5260205260405f20910390555f808080612b39565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b508290637dc7a0d960e11b5f5260045260245260445260645ffd5b91906001600160a01b03831615612af1576001600160a01b03811615612be75761220b92612c5d565b63ec442f0560e01b5f525f60045260245ffd5b6001600160a01b0316908115612b90576001600160a01b0316918215612b7d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b91906001600160a01b0383161580612dba575b80612db1575b612c84575b61220b9261307f565b612c9f816001600160a01b03165f52601660205260405f2090565b549283612cae575b9250612c7b565b612cb6612799565b93612cc985612cc4866124e3565b61251a565b80612cd5575050612ca7565b9383612d0c612cfe6111bf6111ba612d3a96612d40999a8181115f14612da957509a5b8b612507565b670de0b6b3a7640000900490565b93612d28826001600160a01b03165f52601660205260405f2090565b612d33898254612631565b905561307f565b82612ad7565b6001600160a01b0381612da4612d887f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d946001600160a01b03165f52601660205260405f2090565b5460405193849316958360209093929193604081019481520152565b0390a2565b90509a612cf8565b50811515612c76565b506001600160a01b0381161515612c70565b60ff8114612e125760ff811690601f8211612e035760405191612df0604084612134565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600554815f612e248361219c565b8083529260018116908115612ea75750600114612e48575b61246592500382612134565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b818310612e8b57505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612e73565b6020925061246594915060ff191682840152151560051b820101612e3c565b60ff8114612eea5760ff811690601f8211612e035760405191612df0604084612134565b50604051600654815f612efc8361219c565b8083529260018116908115612ea75750600114612f1f5761246592500382612134565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310612f6257505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612f4a565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411613000579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15612ff5575f516001600160a01b03811615612feb57905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b600481101561306b578061301d575050565b600181036130345763f645eedf60e01b5f5260045ffd5b6002810361304f575063fce698f760e01b5f5260045260245ffd5b6003146130595750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b031690816130f85760206001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926130c68660025461254d565b6002555b1693846130e35780600254036002555b604051908152a3565b845f525f825260405f208181540190556130da565b815f525f60205260405f205483811061314a576001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9285602093865f525f85520360405f20556130ca565b91905063391434e360e21b5f5260045260245260445260645ffdfea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/core/variables/xPNTsTokenABI.md b/api/@aastar/core/variables/xPNTsTokenABI.md index f1eafa7f6..8ec597e24 100644 --- a/api/@aastar/core/variables/xPNTsTokenABI.md +++ b/api/@aastar/core/variables/xPNTsTokenABI.md @@ -1,3 +1,3 @@ > `const` **xPNTsTokenABI**: `any` -Defined in: [packages/core/src/abis/index.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L67) +Defined in: [packages/core/src/abis/index.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L101) diff --git a/api/@aastar/core/variables/xPNTsTokenArtifact.md b/api/@aastar/core/variables/xPNTsTokenArtifact.md index d200eae57..e5890dd8e 100644 --- a/api/@aastar/core/variables/xPNTsTokenArtifact.md +++ b/api/@aastar/core/variables/xPNTsTokenArtifact.md @@ -1,6 +1,6 @@ > `const` **xPNTsTokenArtifact**: `object` = `xPNTsTokenABIData` -Defined in: [packages/core/src/abis/index.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/core/src/abis/index.ts#L68) +Defined in: [packages/core/src/abis/index.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L102) ## Type Declaration @@ -10,4 +10,4 @@ Defined in: [packages/core/src/abis/index.ts:68](https://github.com/AAStarCommun ### bytecode -> **bytecode**: `string` = `"0x6101606040523461049a5760405161001860208261049e565b5f81526040519061002a60208361049e565b5f82526040519161003c60208461049e565b5f83526040519161004e60408461049e565b60018352603160f81b60208401908152825190926001600160401b0382116103955760035490600182811c92168015610490575b60208310146103775781601f84931161041a575b50602090601f83116001146103b4575f926103a9575b50508160011b915f199060031b1c1916176003555b83516001600160401b03811161039557600454600181811c9116801561038b575b602082101461037757601f8111610309575b50602094601f82116001146102a6579481929394955f9261029b575b50508160011b915f199060031b1c1916176004555b61012e816104c1565b6101205261013b83610654565b6101405260208151910120918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526101a860c08261049e565b5190206080523060c0525f5160206135095f395f51905f525460ff8160401c1661028c576002600160401b03196001600160401b03821601610236575b604051612d7090816107998239608051816123cd015260a0518161248a015260c0518161239e015260e0518161241c0152610100518161244201526101205181611385015261014051816113ae0152f35b6001600160401b0319166001600160401b039081175f5160206135095f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f6101e5565b63f92ee8a960e01b5f5260045ffd5b015190505f80610110565b601f1982169560045f52805f20915f5b8881106102f1575083600195969798106102d9575b505050811b01600455610125565b01515f1960f88460031b161c191690555f80806102cb565b919260206001819286850151815501940192016102b6565b818111156100f45760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b6020841061036f575b81601f9101920160051c03905f5b8281106103625750506100f4565b5f82820155600101610354565b5f9150610346565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e2565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100ac565b60035f9081528281209350601f198516905b81811061040257509084600195949392106103ea575b505050811b016003556100c1565b01515f1960f88460031b161c191690555f80806103dc565b929360206001819287860151815501950193016103c6565b828111156100965760035f52909150601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60208510610488575b849392601f0160051c82900391015f5b828110610478575050610096565b5f8183015585945060010161046a565b5f915061045a565b91607f1691610082565b5f80fd5b601f909101601f19168101906001600160401b0382119082101761039557604052565b908151602081105f1461053b575090601f8151116104fb5760208151910151602082106104ec571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161039557600554600181811c9116801561064a575b602082101461037757601f811161060b575b50602092601f82116001146105aa57928192935f9261059f575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610586565b601f1982169360055f52805f20915f5b8681106105f357508360019596106105db575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806105cd565b919260206001819286850151815501940192016105ba565b8181111561056c5760055f5260205f20601f80840160051c809201920160051c03905f5b82811061063d57505061056c565b5f8282015560010161062f565b90607f169061055a565b908151602081105f1461067f575090601f8151116104fb5760208151910151602082106104ec571790565b6001600160401b03811161039557600654600181811c9116801561078e575b602082101461037757601f811161074f575b50602092601f82116001146106ee57928192935f926106e3575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806106ca565b601f1982169360065f52805f20915f5b868110610737575083600195961061071f575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f8080610711565b919260206001819286850151815501940192016106fe565b818111156106b05760065f5260205f20601f80840160051c809201920160051c03905f5b8281106107815750506106b0565b5f82820155600101610773565b90607f169061069e56fe60806040526004361015610011575f80fd5b5f3560e01c806306fdde0314611c8e578063095ea7b314611c685780631296ee6214611c3057806318160ddd14611c1357806323b872dd14611ac457806325073b3a14611a375780632dd3100014611a115780632ecd4e7d146112f7578063313ce567146119f65780633644e515146119dc57806338518bfe146119b65780633ba0b9a9146119995780634000aea01461193557806340c10f191461189c57806342966c681461187f5780635054dbd01461185957806354fd4d50146117fa578063623330ae1461174257806366b48f91146117275780636b09de451461170b57806370a08231146116d45780637a5b4f59146116425780637ade132c146114e85780637ecebe00146114b05780637fd6327a1461148157806384b0196e1461136d5780638d0745471461134a57806395d89b411461132f5780639a78e72e146112f75780639dc29fac14611198578063a9059cbb14611167578063aae64da2146110d4578063b83aa2de14610fff578063b9e205ae14610f3c578063c504e20914610ece578063c6d572ae14610e9b578063d49bdad014610e4f578063d505accf14610cc9578063dd62ed3e14610c95578063f0ce3dd2146103ed578063f1d85d55146103b0578063f9ec7f241461038c5763fa74542d146101f2575f80fd5b346103885760406003193601126103885761020b611cce565b602435906001600160a01b03600a5416801561031e5733036102f25769010f0cf064dd5920000082116102875760206001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5921692835f526012825260405f2061027c828254612387565b9055604051908152a2005b60405162461bcd60e51b815260206004820152602160248201527f53696e676c65207472616e73616374696f6e206c696d6974206578636565646560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608490fd5b7f8e4a23d6000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b608460405162461bcd60e51b815260206004820152602560248201527f53797374656d3a2053757065725061796d6173746572206e6f7420636f6e666960448201527f67757265640000000000000000000000000000000000000000000000000000006064820152fd5b5f80fd5b34610388575f60031936011261038857602060405169010f0cf064dd592000008152f35b34610388576020600319360112610388576001600160a01b036103d1611cce565b165f52600b602052602060ff60405f2054166040519015158152f35b346103885760c06003193601126103885760043567ffffffffffffffff81116103885761041e903690600401612064565b60243567ffffffffffffffff81116103885761043e903690600401612064565b6044356001600160a01b0381168091036103885760643567ffffffffffffffff811161038857610472903690600401612064565b60843567ffffffffffffffff811161038857610492903690600401612064565b60a435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610c8d575b6001149081610c83575b159081610c7a575b50610c52578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055610bfd575b508015610bd257337fffffffffffffffffffffffff000000000000000000000000000000000000000060085416176008557fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095580519067ffffffffffffffff82116108a35781906105b4600d54611d9d565b601f8111610b5b575b50602090601f8311600114610ad9575f92610ace575b50505f198260011b9260031b1c191617600d555b80519067ffffffffffffffff82116108a3578190610606600e54611d9d565b601f8111610a57575b50602090601f83116001146109d5575f926109ca575b50505f198260011b9260031b1c191617600e555b835167ffffffffffffffff81116108a357610655601054611d9d565b601f811161095c575b50602094601f82116001146108db579481929394955f926108d0575b50505f198260011b9260031b1c1916176010555b825167ffffffffffffffff81116108a3576106aa601154611d9d565b601f8111610835575b506020601f82116001146107b457819293945f926107a9575b50505f198260011b9260031b1c1916176011555b801561079a575b600f55335f52600b60205260405f20600160ff1982541617905561070757005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b50670de0b6b3a76400006106e7565b0151905084806106cc565b601f1982169060115f527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68915f5b81811061081d57509583600195969710610805575b505050811b016011556106e0565b01515f1960f88460031b161c191690558480806107f7565b9192602060018192868b0151815501940192016107e2565b818111156106b35760115f52601f820160051c906020831061089b575b601f82910160051c03905f5b82811061086c5750506106b3565b5f8282017f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c68015560010161085e565b5f9150610852565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b01519050858061067a565b601f1982169560105f527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae672915f5b8881106109445750836001959697981061092c575b505050811b0160105561068e565b01515f1960f88460031b161c1916905585808061091e565b91926020600181928685015181550194019201610909565b8181111561065e5760105f52601f820160051c90602083106109c2575b601f82910160051c03905f5b82811061099357505061065e565b5f8282017f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720155600101610985565b5f9150610979565b015190508680610625565b91601f191691600e5f527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd925f5b818110610a3f5750908460019594939210610a27575b505050811b01600e55610639565b01515f1960f88460031b161c19169055868080610a19565b92936020600181928786015181550195019301610a03565b8281111561060f57909150600e5f52601f830160051c9060208410610ac6575b9080601f8594930160051c03905f5b828110610a9457505061060f565b5f8183017fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0155859450600101610a86565b5f9150610a77565b0151905087806105d3565b91601f191691600d5f527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5925f5b818110610b435750908460019594939210610b2b575b505050811b01600d556105e7565b01515f1960f88460031b161c19169055878080610b1d565b92936020600181928786015181550195019301610b07565b828111156105bd57909150600d5f52601f830160051c9060208410610bca575b9080601f8594930160051c03905f5b828110610b985750506105bd565b5f8183017fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50155859450600101610b8a565b5f9150610b7b565b7f8e4c8aa6000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00558761053b565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b905015896104e8565b303b1591506104e0565b8791506104d6565b34610388576040600319360112610388576020610cc1610cb3611cce565b610cbb611ce4565b90612338565b604051908152f35b346103885760e060031936011261038857610ce2611cce565b610cea611ce4565b604435906064359260843560ff8116810361038857844211610e2357610dde610dd56001600160a01b039283851697885f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b6040840152878a1660608401528a608084015260a083015260c082015260c08152610d8860e082611d34565b519020610d93612394565b90604051917f190100000000000000000000000000000000000000000000000000000000000083526002830152602282015260c43591604260a4359220612ad6565b90929192612b63565b16848103610df35750610df19350612677565b005b84907f4b800e46000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b847f62791302000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b34610388575f600319360112610388576001600160a01b036009541633036102f257600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055005b34610388575f60031936011261038857610eca610eb6611fcf565b604051918291602083526020830190611ca9565b0390f35b3461038857602060031936011261038857610ee7611cce565b6001600160a01b036009541633036102f2576001600160a01b0316805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b34610388576020600319360112610388576004356001600160a01b036008541633141580610fea575b6102f2578015610fa6577fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde6040600f548151908152836020820152a1600f55005b606460405162461bcd60e51b815260206004820152601c60248201527f45786368616e676520726174652063616e6e6f74206265207a65726f000000006044820152fd5b506001600160a01b0360095416331415610f65565b3461038857606060031936011261038857611018611cce565b6024356044356001600160a01b03600a5416330361109f57805f52600c60205260ff60405f205416611074575f52600c60205260405f20600160ff1982541617905569010f0cf064dd59200000811161028757610df1916125dc565b7fe18b4060000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f8e4a23d6000000000000000000000000000000000000000000000000000000005f526001600160a01b03331660045260245ffd5b34610388576020600319360112610388576110ed611cce565b6001600160a01b036009541633141580611152575b6102f2576001600160a01b03168015610bd257805f52600b60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b506001600160a01b0360085416331415611102565b346103885760406003193601126103885761118d611183611cce565b6024359033612622565b602060405160018152f35b34610388576040600319360112610388576111b1611cce565b6024356001600160a01b03600a5416331461128d576001600160a01b03821633036111e0575b610df1916125dc565b6111ea3383612338565b918183106112245781835f19610df19503611209575b505091506111d7565b61121d9161121691612165565b3383612677565b8184611200565b608460405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602c60248201527f53757065725061796d6173746572206d75737420757365206275726e46726f6d60448201527f576974684f7048617368282900000000000000000000000000000000000000006064820152fd5b34610388576020600319360112610388576001600160a01b03611318611cce565b165f526012602052602060405f2054604051908152f35b34610388575f60031936011261038857610eca610eb6611f3a565b3461038857602061136461135d36611cfa565b9291612338565b10604051908152f35b34610388575f600319360112610388576114256113a97f000000000000000000000000000000000000000000000000000000000000000061290b565b6113d27f0000000000000000000000000000000000000000000000000000000000000000612a1e565b6020611433604051926113e58385611d34565b5f84525f3681376040519586957f0f00000000000000000000000000000000000000000000000000000000000000875260e08588015260e0870190611ca9565b908582036040870152611ca9565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b82811061146a57505050500390f35b83518552869550938101939281019260010161145b565b34610388576020600319360112610388576004355f52600c602052602060ff60405f2054166040519015158152f35b34610388576020600319360112610388576001600160a01b036114d1611cce565b165f526007602052602060405f2054604051908152f35b3461038857602060031936011261038857611501611cce565b6001600160a01b03600854163314158061162d575b6102f2576001600160a01b03168015610bd2576001600160a01b03600a541680151580611623575b6115d0575b50807fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a55805f52600b60205260405f20600160ff19825416179055807fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a27f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b805f52600b60205260ff60405f2054161561154357805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a281611543565b508181141561153e565b506001600160a01b0360095416331415611516565b34610388575f600319360112610388576116a061165d611dee565b611665611f3a565b6116ca6001600160a01b0360095416916116bc611680611fcf565b6116ae61168b611ea5565b9360405198899860a08a5260a08a0190611ca9565b9088820360208a0152611ca9565b908682036040880152611ca9565b908482036060860152611ca9565b9060808301520390f35b34610388576020600319360112610388576001600160a01b036116f5611cce565b165f525f602052602060405f2054604051908152f35b3461038857602060031936011261038857610df160043561219f565b34610388575f60031936011261038857610eca610eb6611ea5565b346103885760206003193601126103885761175b611cce565b600954906001600160a01b038216908133036102f2576001600160a01b0316809281156117ce577fffffffffffffffffffffffff000000000000000000000000000000000000000016176009557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b507f8e4c8aa6000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b34610388575f60031936011261038857610eca60405161181b604082611d34565b601581527f58504e54732d332e302e302d756e6c696d6974656400000000000000000000006020820152604051918291602083526020830190611ca9565b34610388575f6003193601126103885760206001600160a01b03600a5416604051908152f35b3461038857602060031936011261038857610df1600435336125dc565b34610388576040600319360112610388576118b5611cce565b6001600160a01b036008541633141580611920575b61109f576001600160a01b038116156118eb57610df190602435905f6127df565b6001600160a01b03907f8e4c8aa6000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b506001600160a01b03600954163314156118ca565b346103885760606003193601126103885761194e611cce565b60443567ffffffffffffffff811161038857366023820112156103885760209161198561198f923690602481600401359101611d57565b9060243590612082565b6040519015158152f35b34610388575f600319360112610388576020600f54604051908152f35b34610388575f6003193601126103885760206001600160a01b0360095416604051908152f35b34610388575f600319360112610388576020610cc1612394565b34610388575f60031936011261038857602060405160128152f35b34610388575f6003193601126103885760206001600160a01b0360085416604051908152f35b34610388575f600319360112610388576001600160a01b036009541633036102f2576001600160a01b03600a541680151580611aae575b611a7457005b805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b50805f52600b60205260ff60405f205416611a6e565b3461038857611ad236611cfa565b90335f52600b60205260ff60405f205416611afc575b61118d92611af7833383612732565b612622565b6001600160a01b038116338114159081611bfd575b50611b935769010f0cf064dd59200000821115611ae85760405162461bcd60e51b815260206004820152602160248201527f53696e676c65207472616e73616374696f6e206c696d6974206578636565646560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608490fd5b608460405162461bcd60e51b815260206004820152603a60248201527f53656375726974793a20556e617574686f72697a656420726563697069656e7460448201527f20666f72206175746f2d617070726f766564207370656e6465720000000000006064820152fd5b90506001600160a01b03600a5416141584611b11565b34610388575f600319360112610388576020600254604051908152f35b3461038857604060031936011261038857602061198f611c4e611cce565b60405190611c5c8483611d34565b5f825260243590612082565b346103885760406003193601126103885761118d611c84611cce565b6024359033612677565b34610388575f60031936011261038857610eca610eb6611dee565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b600435906001600160a01b038216820361038857565b602435906001600160a01b038216820361038857565b6003196060910112610388576004356001600160a01b038116810361038857906024356001600160a01b0381168103610388579060443590565b90601f601f19910116810190811067ffffffffffffffff8211176108a357604052565b92919267ffffffffffffffff82116108a35760405191611d81601f8201601f191660200184611d34565b829481845281830111610388578281602093845f960137010152565b90600182811c92168015611de4575b6020831014611db757565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611dac565b604051905f8260105491611e0183611d9d565b8083529260018116908115611e865750600114611e27575b611e2592500383611d34565b565b5060105f90815290917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6725b818310611e6a575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492611e52565b60209250611e2594915060ff191682840152151560051b820101611e19565b604051905f82600e5491611eb883611d9d565b8083529260018116908115611e865750600114611edb57611e2592500383611d34565b50600e5f90815290917fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd5b818310611f1e575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492611f06565b604051905f8260115491611f4d83611d9d565b8083529260018116908115611e865750600114611f7057611e2592500383611d34565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b818310611fb3575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492611f9b565b604051905f82600d5491611fe283611d9d565b8083529260018116908115611e86575060011461200557611e2592500383611d34565b50600d5f90815290917fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b818310612048575050906020611e2592820101611e19565b6020919350806001915483858901015201910190918492612030565b9080601f830112156103885781602061207f93359101611d57565b90565b9190600260135414612121576120a89260026013556120a18282612328565b50336124b0565b156120b7576001906001601355565b608460405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d7265636569766560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b9190820391821161217257565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b335f52601260205260405f205481156123245780156122e05780821161229c57335f525f6020528160405f20541061223257816121db91612165565b335f52601260205260405f20556121f281336125dc565b335f52601260205260405f205460405191825260208201527f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d60403392a2565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601960248201527f526570617920616d6f756e7420657863656564732064656274000000000000006044820152fd5b606460405162461bcd60e51b815260206004820152601060248201527f4e6f206465627420746f207265706179000000000000000000000000000000006044820152fd5b5050565b906123339133612622565b600190565b6001600160a01b0382165f52600b60205260ff60405f205416612380576001600160a01b03165f5260016020526001600160a01b0360405f2091165f5260205260405f205490565b50505f1990565b9190820180921161217257565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016301480612487575b156123ef577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261248160c082611d34565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000046146123c6565b9190803b156125d3576001600160a01b035f81602095612518604051988997889687947f88a7ca5c0000000000000000000000000000000000000000000000000000000086523360048701521660248501526044840152608060648401526084830190611ca9565b0393165af15f9181612576575b5061252f57505f90565b7fffffffff00000000000000000000000000000000000000000000000000000000167f88a7ca5c000000000000000000000000000000000000000000000000000000001490565b9091506020813d6020116125cb575b8161259260209383611d34565b8101031261038857517fffffffff000000000000000000000000000000000000000000000000000000008116810361038857905f612525565b3d9150612585565b50505050600190565b906001600160a01b038216156125f6575f611e25926127df565b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b91906001600160a01b038316156125f6576001600160a01b0381161561264b57611e25926127df565b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b6001600160a01b0316908115612706576001600160a01b03169182156126da5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b91906001600160a01b03811690815f52600b60205260ff60405f2054166127675761275d9084612338565b925f19840361276d575b50505050565b8284106127ab576001600160a01b031680156127065781156126da575f52600160205260405f20905f5260205260405f20910390555f808080612767565b5082907ffb8f41b2000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b91906001600160a01b03831615806128f9575b806128f0575b612806575b611e2592612c3b565b612821816001600160a01b03165f52601260205260405f2090565b548061282d57506127fd565b918161286c92938083115f146128e857945b61285a826001600160a01b03165f52601260205260405f2090565b612865878254612165565b9055612c3b565b81612875575050565b61287f82826125dc565b6001600160a01b03816128e36128c77f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d946001600160a01b03165f52601260205260405f2090565b5460405193849316958360209093929193604081019481520152565b0390a2565b50819461283f565b508115156127f8565b506001600160a01b03811615156127f2565b60ff811461296a5760ff811690601f8211612942576040519161292f604084611d34565b6020808452838101919036833783525290565b7fb3512b0c000000000000000000000000000000000000000000000000000000005f5260045ffd5b50604051600554815f61297c83611d9d565b80835292600181169081156129ff57506001146129a0575b61207f92500382611d34565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b8183106129e357505090602061207f92820101612994565b60209193508060019154838588010152019101909183926129cb565b6020925061207f94915060ff191682840152151560051b820101612994565b60ff8114612a425760ff811690601f8211612942576040519161292f604084611d34565b50604051600654815f612a5483611d9d565b80835292600181169081156129ff5750600114612a775761207f92500382611d34565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310612aba57505090602061207f92820101612994565b6020919350806001915483858801015201910190918392612aa2565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411612b58579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15612b4d575f516001600160a01b03811615612b4357905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b6004811015612c0e5780612b75575050565b60018103612ba5577ff645eedf000000000000000000000000000000000000000000000000000000005f5260045ffd5b60028103612bd957507ffce698f7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b600314612be35750565b7fd78bce0c000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6001600160a01b03169081612cb45760206001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92612c8286600254612387565b6002555b169384612c9f5780600254036002555b604051908152a3565b845f525f825260405f20818154019055612c96565b815f525f60205260405f2054838110612d06576001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9285602093865f525f85520360405f2055612c86565b9190507fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffdfea2646970667358221220e5547380639544a70415454e7e6be2d7b81652dd79b625615c458a80c6c69c4464736f6c63430008210033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` +> **bytecode**: `string` = `"0x610160604052346104a8576040516100186020826104ac565b5f81526040519061002a6020836104ac565b5f82526040519161003c6020846104ac565b5f83526040519161004e6040846104ac565b60018352603160f81b60208401908152825190926001600160401b0382116103a35760035490600182811c9216801561049e575b60208310146103855781601f849311610428575b50602090601f83116001146103c2575f926103b7575b50508160011b915f199060031b1c1916176003555b83516001600160401b0381116103a357600454600181811c91168015610399575b602082101461038557601f8111610317575b50602094601f82116001146102b4579481929394955f926102a9575b50508160011b915f199060031b1c1916176004555b61012e816104cf565b6101205261013b83610662565b6101405260208151910120918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526101a860c0826104ac565b5190206080523060c05269010f0cf064dd592000006018555f5160206139195f395f51905f525460ff8160401c1661029a576002600160401b03196001600160401b03821601610244575b60405161317290816107a782396080518161292a015260a051816129e7015260c051816128fb015260e051816129790152610100518161299f015261012051816114c7015261014051816114f00152f35b6001600160401b0319166001600160401b039081175f5160206139195f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f6101f3565b63f92ee8a960e01b5f5260045ffd5b015190505f80610110565b601f1982169560045f52805f20915f5b8881106102ff575083600195969798106102e7575b505050811b01600455610125565b01515f1960f88460031b161c191690555f80806102d9565b919260206001819286850151815501940192016102c4565b818111156100f45760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b6020841061037d575b81601f9101920160051c03905f5b8281106103705750506100f4565b5f82820155600101610362565b5f9150610354565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e2565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100ac565b60035f9081528281209350601f198516905b81811061041057509084600195949392106103f8575b505050811b016003556100c1565b01515f1960f88460031b161c191690555f80806103ea565b929360206001819287860151815501950193016103d4565b828111156100965760035f52909150601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60208510610496575b849392601f0160051c82900391015f5b828110610486575050610096565b5f81830155859450600101610478565b5f9150610468565b91607f1691610082565b5f80fd5b601f909101601f19168101906001600160401b038211908210176103a357604052565b908151602081105f14610549575090601f8151116105095760208151910151602082106104fa571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b0381116103a357600554600181811c91168015610658575b602082101461038557601f8111610619575b50602092601f82116001146105b857928192935f926105ad575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610594565b601f1982169360055f52805f20915f5b86811061060157508360019596106105e9575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806105db565b919260206001819286850151815501940192016105c8565b8181111561057a5760055f5260205f20601f80840160051c809201920160051c03905f5b82811061064b57505061057a565b5f8282015560010161063d565b90607f1690610568565b908151602081105f1461068d575090601f8151116105095760208151910151602082106104fa571790565b6001600160401b0381116103a357600654600181811c9116801561079c575b602082101461038557601f811161075d575b50602092601f82116001146106fc57928192935f926106f1575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806106d8565b601f1982169360065f52805f20915f5b868110610745575083600195961061072d575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f808061071f565b9192602060018192868501518155019401920161070c565b818111156106be5760065f5260205f20601f80840160051c809201920160051c03905f5b82811061078f5750506106be565b5f82820155600101610781565b90607f16906106ac56fe6080806040526004361015610012575f80fd5b5f3560e01c908162ef5f4f1461206657508063027e6d671461204e57806306fdde0314612033578063095ea7b31461200d5780631296ee6214611fd557806318160ddd14611fb85780631eb6ca0314611f4b57806320b0585914611f2557806323b872dd14611e4c57806325073b3a14611d6c5780632d6f3a3a14611d4f5780632dd3100014611d295780632ecd4e7d146113cb57806330f5344114611c50578063313ce56714611c355780633258f04514611c065780633644e51514611bec57806338518bfe14611bc65780633ba0b9a914611ba95780634000aea014611b4557806340c10f1914611adf57806342966c6814611ac25780634e4852f314611a365780635054dbd014611a1057806354fd4d50146119c3578063623330ae1461194257806366b48f91146119275780636b09de451461190b57806370a08231146118d45780637a5b4f59146118425780637ade132c146116d35780637c3c26e6146116b35780637ecebe001461167b5780637fd6327a1461164c578063819c2ff8146115a757806384b0196e146114af5780638501dd1b146114415780638d0745471461141e57806395d89b41146114035780639a78e72e146113cb5780639dc29fac14611312578063a9059cbb146112e1578063aae64da21461124e578063ae8866d91461122c578063af43e2d114611208578063b83aa2de1461112f578063b8441cd61461110b578063b9e205ae14610f68578063bf85556514610f4b578063c1550b2814610f2f578063c504e20914610ec1578063c6d572ae14610e8e578063d49bdad014610e04578063d505accf14610ccb578063d5f6e0dd14610cae578063da21d73e14610c51578063dd62ed3e14610c1d578063eca9f01414610be0578063f0ce3dd2146103d2578063f1d85d55146103955763fa74542d146102ba575f80fd5b34610391576040366003190112610391576102d36120a4565b6024359060ff600c5416610382576001600160a01b03600a541680156103735733036103605760185482116103515760206001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5921692835f526016825260405f2061034682825461254d565b9055604051908152a2005b632c1032b560e01b5f5260045ffd5b63472511eb60e11b5f523360045260245ffd5b632da2b14160e21b5f5260045ffd5b6313a5ef3f60e21b5f5260045ffd5b5f80fd5b34610391576020366003190112610391576001600160a01b036103b66120a4565b165f52600b602052602060ff60405f2054166040519015158152f35b346103915760c03660031901126103915760043567ffffffffffffffff81116103915761040390369060040161244a565b60243567ffffffffffffffff81116103915761042390369060040161244a565b6044356001600160a01b0381168091036103915760643567ffffffffffffffff81116103915761045790369060040161244a565b60843567ffffffffffffffff81116103915761047790369060040161244a565b60a435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610bd8575b6001149081610bce575b159081610bc5575b50610bb65767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005585610b77575b508015610b6557336001600160a01b031960085416176008556001600160a01b0319600954161760095580519067ffffffffffffffff821161084b57819061055260105461219c565b601f8111610aee575b50602090601f8311600114610a6a575f92610a5f575b50508160011b915f199060031b1c1916176010555b80519067ffffffffffffffff821161084b5781906105a560115461219c565b601f81116109e8575b50602090601f8311600114610964575f92610959575b50508160011b915f199060031b1c1916176011555b835167ffffffffffffffff811161084b576105f560145461219c565b601f81116108eb575b50602094601f821160011461086a579481929394955f9261085f575b50508160011b915f199060031b1c1916176014555b825167ffffffffffffffff811161084b5761064b60155461219c565b601f81116107dd575b506020601f821160011461075c57819293945f92610751575b50508160011b915f199060031b1c1916176015555b8015610742575b601255335f52600b60205260405f20600160ff19825416179055690a968163f0a57b400000601a5569010f0cf064dd592000006018556106c557005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b50670de0b6b3a7640000610689565b01519050848061066d565b601f1982169060155f527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915f5b8181106107c5575095836001959697106107ad575b505050811b01601555610682565b01515f1960f88460031b161c1916905584808061079f565b9192602060018192868b01518155019401920161078a565b818111156106545760155f52601f820160051c9060208310610843575b601f82910160051c03905f5b828110610814575050610654565b5f8282017f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750155600101610806565b5f91506107fa565b634e487b7160e01b5f52604160045260245ffd5b01519050858061061a565b601f1982169560145f527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec915f5b8881106108d3575083600195969798106108bb575b505050811b0160145561062f565b01515f1960f88460031b161c191690558580806108ad565b91926020600181928685015181550194019201610898565b818111156105fe5760145f52601f820160051c9060208310610951575b601f82910160051c03905f5b8281106109225750506105fe565b5f8282017fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155600101610914565b5f9150610908565b0151905086806105c4565b60115f9081527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c689350601f198516905b8181106109d057509084600195949392106109b8575b505050811b016011556105d9565b01515f1960f88460031b161c191690558680806109aa565b92936020600181928786015181550195019301610994565b828111156105ae5790915060115f52601f830160051c9060208410610a57575b9080601f8594930160051c03905f5b828110610a255750506105ae565b5f8183017f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680155859450600101610a17565b5f9150610a08565b015190508780610571565b60105f9081527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6729350601f198516905b818110610ad65750908460019594939210610abe575b505050811b01601055610586565b01515f1960f88460031b161c19169055878080610ab0565b92936020600181928786015181550195019301610a9a565b8281111561055b5790915060105f52601f830160051c9060208410610b5d575b9080601f8594930160051c03905f5b828110610b2b57505061055b565b5f8183017f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720155859450600101610b1d565b5f9150610b0e565b634726455360e11b5f5260045260245ffd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005587610509565b63f92ee8a960e01b5f5260045ffd5b905015896104cd565b303b1591506104c5565b8791506104bb565b34610391576020366003190112610391576001600160a01b03610c016120a4565b165f52600d602052602060ff60405f2054166040519015158152f35b34610391576040366003190112610391576020610c49610c3b6120a4565b610c436120ba565b9061274a565b604051908152f35b34610391576020366003190112610391576001600160a01b03610c726120a4565b165f526019602052606060405f2054604051906001600160801b038116825267ffffffffffffffff8160801c16602083015260c01c6040820152f35b34610391575f366003190112610391576020601354604051908152f35b346103915760e036600319011261039157610ce46120a4565b610cec6120ba565b604435906064359260843560ff8116810361039157844211610df157610dc5610dbc6001600160a01b039283851697885f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b6040840152878a1660608401528a608084015260a083015260c082015260c08152610d8a60e082612134565b519020610d956128f1565b906040519161190160f01b83526002830152602282015260c43591604260a4359220612f7e565b9092919261300b565b16848103610dda5750610dd89350612bfa565b005b84906325c0072360e11b5f5260045260245260445ffd5b8463313c898160e11b5f5260045260245ffd5b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b036008541680151580610e78575b610e5f575b6008805473ffffffffffffffffffffffffffffffffffffffff19169055005b5f52600b60205260405f2060ff19815416905580610e40565b50805f52600b60205260ff60405f205416610e3b565b34610391575f36600319011261039157610ebd610ea96123b5565b604051918291602083526020830190612080565b0390f35b3461039157602036600319011261039157610eda6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b34610391575f366003190112610391576020604051610e108152f35b34610391575f366003190112610391576020601a54604051908152f35b34610391576020366003190112610391576004356001600160a01b0360085416331415806110f6575b6103605780156110e757655af3107a4000811080156110d4575b6110aa576013548015159081611094575b506110855760125480158015611007575b5060407fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde918151908152836020820152a160125542601355005b611f408202828104611f401482171561107157612ee0830291838304612ee01417156110715761271090048310908115611063575b506110475782610fcd565b90635dd2c95d60e11b5f526004526024526107d060445260645ffd5b61271091500482118361103c565b634e487b7160e01b5f52601160045260245ffd5b6348deb07960e11b5f5260045ffd5b9050610e10810180911161107157421082610fbc565b63068c0e8960e31b5f52600452655af3107a400060245269021e19e0c9bab240000060445260645ffd5b5069021e19e0c9bab24000008111610fab565b63150c57e560e01b5f5260045ffd5b506001600160a01b0360095416331415610f91565b34610391575f366003190112610391576020604051690a968163f0a57b4000008152f35b346103915761113d3661210a565b60ff600c9392935416610382576001600160a01b03600a541633036111f357805f52600f60205260ff60405f20541680156111dd575b6111cb575f52600f60205260405f20600160ff19825416179055601854821161035157670de0b6b3a76400006111c46111bf6111ba610dd8956111b4612799565b90612507565b612538565b612623565b0490612ad7565b63070c5a0360e51b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611173565b63472511eb60e11b5f90815233600452602490fd5b34610391575f36600319011261039157602060405169021e19e0c9bab24000008152f35b34610391575f36600319011261039157602060ff600c54166040519015158152f35b34610391576020366003190112610391576112676120a4565b6001600160a01b0360085416331415806112cc575b610360576001600160a01b03168015610b6557805f52600b60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b506001600160a01b036009541633141561127c565b34610391576040366003190112610391576113076112fd6120a4565b6024359033612bbe565b602060405160018152f35b346103915760403660031901126103915761132b6120a4565b60243560ff600c5416806113b8575b610382576001600160a01b03600a541633146113a9576001600160a01b038216330361136a575b610dd891612ad7565b80611375338461274a565b1061139a57610dd891611389823383612b04565b61139382336127a5565b9150611361565b6307df453760e01b5f5260045ffd5b632d0513d960e11b5f5260045ffd5b506001600160a01b03821633141561133a565b34610391576020366003190112610391576001600160a01b036113ec6120a4565b165f526016602052602060405f2054604051908152f35b34610391575f36600319011261039157610ebd610ea9612320565b34610391576020611438611431366120d0565b929161274a565b10604051908152f35b346103915760203660031901126103915761145a6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600d60205260405f2060ff1981541690557fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf5f80a2005b34610391575f3660031901126103915761154b6114eb7f0000000000000000000000000000000000000000000000000000000000000000612dcc565b6115147f0000000000000000000000000000000000000000000000000000000000000000612ec6565b6020611559604051926115278385612134565b5f84525f368137604051958695600f60f81b875260e08588015260e0870190612080565b908582036040870152612080565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b82811061159057505050500390f35b835185528695509381019392810192600101611581565b34610391576020366003190112610391576115c06120a4565b6001600160a01b036009541690813303610360576001600160a01b031690811561163957811461162757805f52600d60205260405f20600160ff198254161790557f14b842314c1bed1881a6aaf3371cb59429fa3f849dbd8ad0698501dc4aa0574c5f80a2005b63472511eb60e11b5f5260045260245ffd5b50634726455360e11b5f5260045260245ffd5b34610391576020366003190112610391576004355f52600f602052602060ff60405f2054166040519015158152f35b34610391576020366003190112610391576001600160a01b0361169c6120a4565b165f526007602052602060405f2054604051908152f35b34610391575f366003190112610391576020604051655af3107a40008152f35b34610391576020366003190112610391576116ec6120a4565b600c5460ff1615611806576001600160a01b03600954163303610360576001600160a01b03905b168015610b65576001600160a01b03600a5416801515806117fc575b6117a9575b50806001600160a01b0319600a541617600a55805f52600b60205260405f20600160ff19825416179055807fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a27f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b805f52600b60205260ff60405f2054161561173457805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a281611734565b508181141561172f565b6001600160a01b03600854163314158061182d575b610360576001600160a01b0390611713565b506001600160a01b036009541633141561181b565b34610391575f366003190112610391576118a061185d6121d4565b611865612320565b6118ca6001600160a01b0360095416916118bc6118806123b5565b6118ae61188b61228b565b9360405198899860a08a5260a08a0190612080565b9088820360208a0152612080565b908682036040880152612080565b908482036060860152612080565b9060808301520390f35b34610391576020366003190112610391576001600160a01b036118f56120a4565b165f525f602052602060405f2054604051908152f35b3461039157602036600319011261039157610dd860043561263e565b34610391575f36600319011261039157610ebd610ea961228b565b346103915760203660031901126103915761195b6120a4565b600954906001600160a01b03821690813303610360576001600160a01b0316809281156116395773ffffffffffffffffffffffffffffffffffffffff1916176009557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b34610391575f36600319011261039157610ebd6040516119e4604082612134565b600b81526a058504e54732d332e342e360ac1b6020820152604051918291602083526020830190612080565b34610391575f3660031901126103915760206001600160a01b03600a5416604051908152f35b34610391576020366003190112610391576004356001600160a01b036009541633036103605780158015611aaf575b611aa0577ffabe53bf01983df9c24aab2e57a83e6f8a69975380cf9bd0811dd2f431ac4d4660406018548151908152836020820152a1601855005b633494a40d60e21b5f5260045ffd5b50690a968163f0a57b4000008111611a65565b3461039157602036600319011261039157610dd860043533612ad7565b3461039157604036600319011261039157611af86120a4565b6001600160a01b036008541633141580611b30575b6111f3576001600160a01b03811690811561163957610dd890602435905f612c5d565b506001600160a01b0360095416331415611b0d565b3461039157606036600319011261039157611b5e6120a4565b60443567ffffffffffffffff8111610391573660238201121561039157602091611b95611b9f923690602481600401359101612156565b906024359061255a565b6040519015158152f35b34610391575f366003190112610391576020601254604051908152f35b34610391575f3660031901126103915760206001600160a01b0360095416604051908152f35b34610391575f366003190112610391576020610c496128f1565b34610391576020366003190112610391576004355f52601b602052602060ff60405f2054166040519015158152f35b34610391575f36600319011261039157602060405160128152f35b3461039157611c5e3661210a565b60ff600c9392935416610382576001600160a01b03600a5416801561037357330361036057601854831161035157805f52600f60205260ff60405f2054168015611d13575b611d01576001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5926020925f52601b835260405f20600160ff198254161790551692835f526016825260405f2061034682825461254d565b634e7074b160e11b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611ca3565b34610391575f3660031901126103915760206001600160a01b0360085416604051908152f35b34610391575f366003190112610391576020601854604051908152f35b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b03600a541680151580611e36575b611df8575b6001600160a01b0319600e541617600e55600c5460ff811615611dc757005b60ff1916600117600c55337f51745cdc5b4ed1fe5c20c1cbf61290785ef5df0cb643101a29618bed23d8305c5f80a2005b805f52600b60205260405f2060ff198154169055807f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2611da8565b50805f52600b60205260ff60405f205416611da3565b3461039157611e5a366120d0565b90335f52600b60205260ff60405f205416611e84575b61130792611e7f833383612b04565b612bbe565b6001600160a01b03811633811490811580611f10575b611f0157611eb8611eaa856124e3565b611eb2612799565b9061251a565b601854106103515781611eeb575b5015611e705760ff600c54166103825761130792611ee483336127a5565b9250611e70565b90506001600160a01b03600a5416141584611ec6565b634a02e04360e11b5f5260045ffd5b506001600160a01b03600a5416811415611e9a565b34610391575f3660031901126103915760206001600160a01b03600e5416604051908152f35b34610391576020366003190112610391576004356001600160a01b03600954163303610360576001600160801b0381116103515760407f68639863c58fa667262fab7192372355b1b2cb2731dcd7636cedbfcd1900f05d91601a549080601a5582519182526020820152a1005b34610391575f366003190112610391576020600254604051908152f35b34610391576040366003190112610391576020611b9f611ff36120a4565b604051906120018483612134565b5f82526024359061255a565b34610391576040366003190112610391576113076120296120a4565b6024359033612bfa565b34610391575f36600319011261039157610ebd610ea96121d4565b34610391575f36600319011261039157610dd8612468565b34610391575f36600319011261039157806107d060209252f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361039157565b602435906001600160a01b038216820361039157565b6060906003190112610391576004356001600160a01b038116810361039157906024356001600160a01b0381168103610391579060443590565b6060906003190112610391576004356001600160a01b038116810361039157906024359060443590565b90601f8019910116810190811067ffffffffffffffff82111761084b57604052565b92919267ffffffffffffffff821161084b5760405191612180601f8201601f191660200184612134565b829481845281830111610391578281602093845f960137010152565b90600182811c921680156121ca575b60208310146121b657565b634e487b7160e01b5f52602260045260245ffd5b91607f16916121ab565b604051905f82601454916121e78361219c565b808352926001811690811561226c575060011461220d575b61220b92500383612134565b565b5060145f90815290917fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b81831061225057505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612238565b6020925061220b94915060ff191682840152151560051b8201016121ff565b604051905f826011549161229e8361219c565b808352926001811690811561226c57506001146122c15761220b92500383612134565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b81831061230457505090602061220b928201016121ff565b60209193508060019154838589010152019101909184926122ec565b604051905f82601554916123338361219c565b808352926001811690811561226c57506001146123565761220b92500383612134565b5060155f90815290917f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b81831061239957505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612381565b604051905f82601054916123c88361219c565b808352926001811690811561226c57506001146123eb5761220b92500383612134565b5060105f90815290917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6725b81831061242e57505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612416565b9080601f830112156103915781602061246593359101612156565b90565b6001600160a01b0360095416330361036057600c5460ff8116156124e0576001600160a01b03600a54166001600160a01b03600e5416146124d15760ff1916600c55337f56a64ec95bb93ae6af923c082ef9ab2bd5bdd6f1a121c45e8c05a39ab73bbf065f80a2565b637f7fe78560e11b5f5260045ffd5b50565b90670de0b6b3a7640000820291808304670de0b6b3a7640000149015171561107157565b8181029291811591840414171561107157565b8115612524570490565b634e487b7160e01b5f52601260045260245ffd5b90670de0b6b3a7640000820180921161107157565b9190820180921161107157565b91906002601754146125de57612580926002601755612579828261273a565b5033612a0d565b1561258f576001906001601755565b60405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d726563656976656044820152603960f91b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b5f1981019190821161107157565b9190820391821161107157565b335f52601660205260405f2054811561273657801561272857335f525f6020528160405f20541061271957612671612799565b670de0b6b3a7640000830290838204670de0b6b3a764000003611071576126979161251a565b91821561271457818311612705576126b2836126c593612631565b335f52601660205260405f205533612ad7565b335f52601660205260405f205460405191825260208201527f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d60403392a2565b63718e827560e11b5f5260045ffd5b505050565b63588569f760e01b5f5260045ffd5b6254641f60e81b5f5260045ffd5b5050565b906127459133612bbe565b600190565b6001600160a01b0382165f52600b60205260ff60405f205416612792576001600160a01b03165f5260016020526001600160a01b0360405f2091165f5260205260405f205490565b50505f1990565b6012549081156110e757565b6001600160a01b031690815f52601960205260405f2091825467ffffffffffffffff8160801c1680159081156128d9575b50612851575b506001600160801b03835416916127f3818461254d565b92601a549081851161281d57505050506001600160801b03166001600160801b0319825416179055565b808211156128485761282e91612631565b915b63c4fae44360e01b5f5260045260245260445260645ffd5b50505f91612830565b7fffffffffffffffff0000000000000000000000000000000000000000000000001642608090811b77ffffffffffffffff000000000000000000000000000000001691909117808555604051911c67ffffffffffffffff16815281907fbee963043b15401a5f01418733a5739b29c9d9e128ecfadc5b2078bffe8ba91790602090a25f6127dc565b9050620151808101809111611071574210155f6127d6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163014806129e4575b1561294c577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a081526129de60c082612134565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614612923565b9190803b15612ace576001600160a01b035f81602095612a5c60405198899788968794632229f29760e21b86523360048701521660248501526044840152608060648401526084830190612080565b0393165af15f9181612a89575b50612a7357505f90565b6001600160e01b031916632229f29760e21b1490565b9091506020813d602011612ac6575b81612aa560209383612134565b8101031261039157516001600160e01b03198116810361039157905f612a69565b3d9150612a98565b50505050600190565b906001600160a01b03821615612af1575f61220b92612c5d565b634b637e8f60e11b5f525f60045260245ffd5b91906001600160a01b03811690815f52600b60205260ff60405f205416612b3957612b2f908461274a565b9260018401612b3f575b50505050565b828410612ba3576001600160a01b03168015612b90578115612b7d575f52600160205260405f20905f5260205260405f20910390555f808080612b39565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b508290637dc7a0d960e11b5f5260045260245260445260645ffd5b91906001600160a01b03831615612af1576001600160a01b03811615612be75761220b92612c5d565b63ec442f0560e01b5f525f60045260245ffd5b6001600160a01b0316908115612b90576001600160a01b0316918215612b7d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b91906001600160a01b0383161580612dba575b80612db1575b612c84575b61220b9261307f565b612c9f816001600160a01b03165f52601660205260405f2090565b549283612cae575b9250612c7b565b612cb6612799565b93612cc985612cc4866124e3565b61251a565b80612cd5575050612ca7565b9383612d0c612cfe6111bf6111ba612d3a96612d40999a8181115f14612da957509a5b8b612507565b670de0b6b3a7640000900490565b93612d28826001600160a01b03165f52601660205260405f2090565b612d33898254612631565b905561307f565b82612ad7565b6001600160a01b0381612da4612d887f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d946001600160a01b03165f52601660205260405f2090565b5460405193849316958360209093929193604081019481520152565b0390a2565b90509a612cf8565b50811515612c76565b506001600160a01b0381161515612c70565b60ff8114612e125760ff811690601f8211612e035760405191612df0604084612134565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600554815f612e248361219c565b8083529260018116908115612ea75750600114612e48575b61246592500382612134565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b818310612e8b57505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612e73565b6020925061246594915060ff191682840152151560051b820101612e3c565b60ff8114612eea5760ff811690601f8211612e035760405191612df0604084612134565b50604051600654815f612efc8361219c565b8083529260018116908115612ea75750600114612f1f5761246592500382612134565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310612f6257505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612f4a565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411613000579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15612ff5575f516001600160a01b03811615612feb57905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b600481101561306b578061301d575050565b600181036130345763f645eedf60e01b5f5260045ffd5b6002810361304f575063fce698f760e01b5f5260045260245ffd5b6003146130595750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b031690816130f85760206001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926130c68660025461254d565b6002555b1693846130e35780600254036002555b604051908152a3565b845f525f825260405f208181540190556130da565b815f525f60205260405f205483811061314a576001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9285602093865f525f85520360405f20556130ca565b91905063391434e360e21b5f5260045260245260445260645ffdfea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/dapp/classes/AirAccountEIP1193Provider.md b/api/@aastar/dapp/classes/AirAccountEIP1193Provider.md new file mode 100644 index 000000000..76cd46f4d --- /dev/null +++ b/api/@aastar/dapp/classes/AirAccountEIP1193Provider.md @@ -0,0 +1,91 @@ +Defined in: [packages/dapp/src/eip1193.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L115) + +AirAccountEIP1193Provider — drop-in EIP-1193 wallet backed by an AirAccount M7 smart account. + +Usage: +```ts +const provider = new AirAccountEIP1193Provider({ + chainId: 11155111, + rpcUrl: 'https://rpc.sepolia.org', + bundlerUrl: 'https://api.pimlico.io/v2/11155111/rpc?apikey=...', + accountAddress: '0x...', + signer: async (hash) => passkeySign(hash), +}); +// Pass to wagmi, ethers.js BrowserProvider, or window.ethereum +``` + +## Constructors + +### Constructor + +> **new AirAccountEIP1193Provider**(`config`): `AirAccountEIP1193Provider` + +Defined in: [packages/dapp/src/eip1193.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L120) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`AirAccountProviderConfig`](../interfaces/AirAccountProviderConfig.md) | + +#### Returns + +`AirAccountEIP1193Provider` + +## Methods + +### on() + +> **on**(`event`, `listener`): `this` + +Defined in: [packages/dapp/src/eip1193.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L169) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `event` | `string` | +| `listener` | (...`args`) => `void` | + +#### Returns + +`this` + +*** + +### removeListener() + +> **removeListener**(`event`, `listener`): `this` + +Defined in: [packages/dapp/src/eip1193.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L175) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `event` | `string` | +| `listener` | (...`args`) => `void` | + +#### Returns + +`this` + +*** + +### request() + +> **request**(`__namedParameters`): `Promise`\<`unknown`\> + +Defined in: [packages/dapp/src/eip1193.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L125) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `__namedParameters` | \{ `method`: `string`; `params?`: `unknown`[]; \} | +| `__namedParameters.method` | `string` | +| `__namedParameters.params?` | `unknown`[] | + +#### Returns + +`Promise`\<`unknown`\> diff --git a/api/@aastar/dapp/classes/DVTClient.md b/api/@aastar/dapp/classes/DVTClient.md index 622a8903b..0b4c41360 100644 --- a/api/@aastar/dapp/classes/DVTClient.md +++ b/api/@aastar/dapp/classes/DVTClient.md @@ -1,4 +1,4 @@ -Defined in: [packages/dapp/src/ui/index.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/dapp/src/ui/index.ts#L10) +Defined in: [packages/dapp/src/ui/index.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/ui/index.ts#L10) ## Constructors @@ -16,13 +16,13 @@ Defined in: [packages/dapp/src/ui/index.ts:10](https://github.com/AAStarCommunit > `static` **registerValidator**(`wallet`, `dvtAddr`, `blsPublicKey`): `Promise`\<`` `0x${string}` ``\> -Defined in: [packages/dapp/src/ui/index.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/dapp/src/ui/index.ts#L11) +Defined in: [packages/dapp/src/ui/index.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/ui/index.ts#L11) #### Parameters | Parameter | Type | Description | | ------ | ------ | ------ | -| `wallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `wallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "gas" \| "blobVersionedHashes" \| "fees" \| "chainId"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | | `wallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | | `wallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | | `wallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | @@ -35,20 +35,20 @@ Defined in: [packages/dapp/src/ui/index.ts:11](https://github.com/AAStarCommunit | `wallet.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | | `wallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | | `wallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | -| `wallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | -| `wallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `wallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `wallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | | `wallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | | `wallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | | `wallet.key` | `string` | A key for the client. | | `wallet.name` | `string` | A name for the client. | | `wallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | | `wallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | -| `wallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? \{\} : Pick\))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `wallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "gas" \| "blobVersionedHashes" \| "fees" \| "chainId"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | | `wallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | | `wallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | | `wallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | | `wallet.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | -| `wallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `wallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | | `wallet.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | | `wallet.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | | `wallet.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | @@ -62,7 +62,7 @@ Defined in: [packages/dapp/src/ui/index.ts:11](https://github.com/AAStarCommunit | `wallet.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | | `wallet.type` | `string` | The type of client. | | `wallet.uid` | `string` | A unique ID for the client. | -| `wallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `wallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | | `wallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | | `wallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | | `wallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | diff --git a/api/@aastar/dapp/functions/announceAirAccount.md b/api/@aastar/dapp/functions/announceAirAccount.md new file mode 100644 index 000000000..2e0ef57c9 --- /dev/null +++ b/api/@aastar/dapp/functions/announceAirAccount.md @@ -0,0 +1,31 @@ +> **announceAirAccount**(`provider`, `info`): () => `void` + +Defined in: [packages/dapp/src/eip6963.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L48) + +Announce AirAccount as an EIP-6963 wallet so DApps can auto-discover it. + +Call this once at app startup. Returns a cleanup function that removes the +event listener when the wallet is no longer available. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `provider` | [`AirAccountEIP1193Provider`](../classes/AirAccountEIP1193Provider.md) | +| `info` | `Partial`\<[`EIP6963ProviderInfo`](../interfaces/EIP6963ProviderInfo.md)\> | + +## Returns + +> (): `void` + +### Returns + +`void` + +## Example + +```ts +const provider = new AirAccountEIP1193Provider({ ... }); +const cleanup = announceAirAccount(provider); +// later: cleanup() to stop announcing +``` diff --git a/api/@aastar/dapp/functions/useCreditScore.md b/api/@aastar/dapp/functions/useCreditScore.md index 944ee91e2..f716998bb 100644 --- a/api/@aastar/dapp/functions/useCreditScore.md +++ b/api/@aastar/dapp/functions/useCreditScore.md @@ -1,6 +1,6 @@ > **useCreditScore**(`__namedParameters`): `object` -Defined in: [packages/dapp/src/ui/hooks/useCreditScore.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/dapp/src/ui/hooks/useCreditScore.ts#L14) +Defined in: [packages/dapp/src/ui/hooks/useCreditScore.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/ui/hooks/useCreditScore.ts#L14) ## Parameters diff --git a/api/@aastar/dapp/functions/useSuperPaymaster.md b/api/@aastar/dapp/functions/useSuperPaymaster.md index 87669d8af..cf369cf2c 100644 --- a/api/@aastar/dapp/functions/useSuperPaymaster.md +++ b/api/@aastar/dapp/functions/useSuperPaymaster.md @@ -1,12 +1,12 @@ > **useSuperPaymaster**(`config`): `UseSuperPaymasterResult` -Defined in: [packages/dapp/src/ui/hooks/useSuperPaymaster.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/dapp/src/ui/hooks/useSuperPaymaster.ts#L11) +Defined in: [packages/dapp/src/ui/hooks/useSuperPaymaster.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/ui/hooks/useSuperPaymaster.ts#L11) ## Parameters | Parameter | Type | | ------ | ------ | -| `config` | [`PaymasterConfig`](../../paymaster/type-aliases/PaymasterConfig.md) | +| `config` | [`PaymasterConfig`](../../sdk/type-aliases/PaymasterConfig.md) | ## Returns diff --git a/api/@aastar/dapp/functions/watchProviders.md b/api/@aastar/dapp/functions/watchProviders.md new file mode 100644 index 000000000..e99f2cd61 --- /dev/null +++ b/api/@aastar/dapp/functions/watchProviders.md @@ -0,0 +1,22 @@ +> **watchProviders**(`onProvider`): () => `void` + +Defined in: [packages/dapp/src/eip6963.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L84) + +Listen for EIP-6963 wallet announcements from other providers in the page. +Useful for composing AirAccount with MetaMask fallback, etc. + +Returns a cleanup function to stop listening. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `onProvider` | (`detail`) => `void` | + +## Returns + +> (): `void` + +### Returns + +`void` diff --git a/api/@aastar/dapp/index.md b/api/@aastar/dapp/index.md index 3dd423e73..4bf3614ec 100644 --- a/api/@aastar/dapp/index.md +++ b/api/@aastar/dapp/index.md @@ -1,8 +1,17 @@ ## Classes +- [AirAccountEIP1193Provider](classes/AirAccountEIP1193Provider.md) - [DVTClient](classes/DVTClient.md) +## Interfaces + +- [AirAccountProviderConfig](interfaces/AirAccountProviderConfig.md) +- [EIP6963ProviderDetail](interfaces/EIP6963ProviderDetail.md) +- [EIP6963ProviderInfo](interfaces/EIP6963ProviderInfo.md) + ## Functions +- [announceAirAccount](functions/announceAirAccount.md) - [useCreditScore](functions/useCreditScore.md) - [useSuperPaymaster](functions/useSuperPaymaster.md) +- [watchProviders](functions/watchProviders.md) diff --git a/api/@aastar/dapp/interfaces/AirAccountProviderConfig.md b/api/@aastar/dapp/interfaces/AirAccountProviderConfig.md new file mode 100644 index 000000000..0b16b5107 --- /dev/null +++ b/api/@aastar/dapp/interfaces/AirAccountProviderConfig.md @@ -0,0 +1,72 @@ +Defined in: [packages/dapp/src/eip1193.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L74) + +## Properties + +### accountAddress + +> **accountAddress**: `` `0x${string}` `` + +Defined in: [packages/dapp/src/eip1193.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L84) + +The user's AirAccount smart contract address + +*** + +### bundlerUrl + +> **bundlerUrl**: `string` + +Defined in: [packages/dapp/src/eip1193.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L80) + +ERC-4337 bundler URL + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/dapp/src/eip1193.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L76) + +EVM chain ID + +*** + +### entryPoint? + +> `optional` **entryPoint**: `` `0x${string}` `` + +Defined in: [packages/dapp/src/eip1193.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L82) + +EntryPoint v0.7 address (defaults to canonical) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/dapp/src/eip1193.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L78) + +Public JSON-RPC URL + +*** + +### signer() + +> **signer**: (`userOpHash`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/dapp/src/eip1193.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip1193.ts#L89) + +Signs the UserOp hash and returns a 65-byte hex signature. +For passkey/ECDSA, format as M7 composite validator signature. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOpHash` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/dapp/interfaces/EIP6963ProviderDetail.md b/api/@aastar/dapp/interfaces/EIP6963ProviderDetail.md new file mode 100644 index 000000000..544eaa22b --- /dev/null +++ b/api/@aastar/dapp/interfaces/EIP6963ProviderDetail.md @@ -0,0 +1,17 @@ +Defined in: [packages/dapp/src/eip6963.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L23) + +## Properties + +### info + +> **info**: [`EIP6963ProviderInfo`](EIP6963ProviderInfo.md) + +Defined in: [packages/dapp/src/eip6963.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L24) + +*** + +### provider + +> **provider**: [`AirAccountEIP1193Provider`](../classes/AirAccountEIP1193Provider.md) + +Defined in: [packages/dapp/src/eip6963.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L25) diff --git a/api/@aastar/dapp/interfaces/EIP6963ProviderInfo.md b/api/@aastar/dapp/interfaces/EIP6963ProviderInfo.md new file mode 100644 index 000000000..ab157cbe9 --- /dev/null +++ b/api/@aastar/dapp/interfaces/EIP6963ProviderInfo.md @@ -0,0 +1,41 @@ +Defined in: [packages/dapp/src/eip6963.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L12) + +## Properties + +### icon + +> **icon**: `string` + +Defined in: [packages/dapp/src/eip6963.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L18) + +Wallet icon as a data URI (SVG or PNG, base64) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/dapp/src/eip6963.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L16) + +Human-readable wallet name displayed in DApp UI + +*** + +### rdns + +> **rdns**: `string` + +Defined in: [packages/dapp/src/eip6963.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L20) + +Reverse-DNS identifier, e.g. "community.aastar.airaccount" + +*** + +### uuid + +> **uuid**: `string` + +Defined in: [packages/dapp/src/eip6963.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/dapp/src/eip6963.ts#L14) + +Globally unique wallet identifier (UUID v4). Must not change across sessions. diff --git a/api/@aastar/enduser/classes/CommunityClient.md b/api/@aastar/enduser/classes/CommunityClient.md index 89e69197b..71028e1d8 100644 --- a/api/@aastar/enduser/classes/CommunityClient.md +++ b/api/@aastar/enduser/classes/CommunityClient.md @@ -1,10 +1,10 @@ -Defined in: [enduser/src/CommunityClient.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L27) +Defined in: [enduser/src/CommunityClient.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L27) Client for Community Managers (`ROLE_COMMUNITY`) ## Extends -- [`BaseClient`](../../core/classes/BaseClient.md) +- [`BaseClient`](../../sdk/classes/BaseClient.md) ## Constructors @@ -12,7 +12,7 @@ Client for Community Managers (`ROLE_COMMUNITY`) > **new CommunityClient**(`config`): `CommunityClient` -Defined in: [enduser/src/CommunityClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L32) +Defined in: [enduser/src/CommunityClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L32) #### Parameters @@ -26,19 +26,19 @@ Defined in: [enduser/src/CommunityClient.ts:32](https://github.com/AAStarCommuni #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`constructor`](../../core/classes/BaseClient.md#constructor) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`constructor`](../../sdk/classes/BaseClient.md#constructor) ## Properties ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/BaseClient.d.ts:5 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`client`](../../core/classes/BaseClient.md#client) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`client`](../../sdk/classes/BaseClient.md#client) *** @@ -50,7 +50,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:11 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`entryPointAddress`](../../core/classes/BaseClient.md#entrypointaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`entryPointAddress`](../../sdk/classes/BaseClient.md#entrypointaddress) *** @@ -58,7 +58,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:11 > `optional` **factoryAddress**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L29) +Defined in: [enduser/src/CommunityClient.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L29) *** @@ -70,7 +70,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:8 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenAddress`](../../core/classes/BaseClient.md#gtokenaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenAddress`](../../sdk/classes/BaseClient.md#gtokenaddress) *** @@ -82,7 +82,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:9 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenStakingAddress`](../../core/classes/BaseClient.md#gtokenstakingaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenStakingAddress`](../../sdk/classes/BaseClient.md#gtokenstakingaddress) *** @@ -94,19 +94,19 @@ Defined in: core/dist/clients/BaseClient.d.ts:10 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`paymasterFactoryAddress`](../../core/classes/BaseClient.md#paymasterfactoryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`paymasterFactoryAddress`](../../sdk/classes/BaseClient.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:6 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`publicClient`](../../core/classes/BaseClient.md#publicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`publicClient`](../../sdk/classes/BaseClient.md#publicclient) *** @@ -118,7 +118,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`registryAddress`](../../core/classes/BaseClient.md#registryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`registryAddress`](../../sdk/classes/BaseClient.md#registryaddress) *** @@ -126,7 +126,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 > `optional` **reputationAddress**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L30) +Defined in: [enduser/src/CommunityClient.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L30) *** @@ -134,7 +134,7 @@ Defined in: [enduser/src/CommunityClient.ts:30](https://github.com/AAStarCommuni > `optional` **sbtAddress**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L28) +Defined in: [enduser/src/CommunityClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L28) ## Methods @@ -142,7 +142,7 @@ Defined in: [enduser/src/CommunityClient.ts:28](https://github.com/AAStarCommuni > **airdropSBT**(`users`, `roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/CommunityClient.ts:285](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L285) +Defined in: [enduser/src/CommunityClient.ts:309](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L309) Airdrop SBTs to users to make them members @@ -152,7 +152,7 @@ Airdrop SBTs to users to make them members | ------ | ------ | | `users` | `` `0x${string}` ``[] | | `roleId` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -164,7 +164,7 @@ Airdrop SBTs to users to make them members > **createCommunityToken**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/CommunityClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L50) +Defined in: [enduser/src/CommunityClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L50) Create a new Community Token (xPNTs) and register it. Note: In the current architecture, creating a community often involves: @@ -177,7 +177,7 @@ Note: In the current architecture, creating a community often involves: | Parameter | Type | | ------ | ------ | | `params` | [`CreateCommunityParams`](../interfaces/CreateCommunityParams.md) | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -199,7 +199,7 @@ Get the account address of the connected wallet #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getAddress`](../../core/classes/BaseClient.md#getaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getAddress`](../../sdk/classes/BaseClient.md#getaddress) *** @@ -207,7 +207,7 @@ Get the account address of the connected wallet > **getCommunityInfo**(`communityAddress?`): `Promise`\<\{ `description`: `string`; `ensName`: `string`; `logoURI`: `string`; `name`: `string`; `stakeAmount`: `bigint`; `website`: `string`; \}\> -Defined in: [enduser/src/CommunityClient.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L76) +Defined in: [enduser/src/CommunityClient.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L76) Get Community Details (Decodes Role Metadata) @@ -225,7 +225,7 @@ Get Community Details (Decodes Role Metadata) ### getStartPublicClient() -> **getStartPublicClient**(): [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../core/interfaces/PublicClient.md) +> **getStartPublicClient**(): [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:20 @@ -233,11 +233,11 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor #### Returns -[`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../core/interfaces/PublicClient.md) +[`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getStartPublicClient`](../../core/classes/BaseClient.md#getstartpublicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getStartPublicClient`](../../sdk/classes/BaseClient.md#getstartpublicclient) *** @@ -245,7 +245,7 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > **registerAsCommunity**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/CommunityClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L142) +Defined in: [enduser/src/CommunityClient.ts:166](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L166) Register self as a Community Manager. This method handles all necessary steps: @@ -264,7 +264,7 @@ This method handles all necessary steps: | `params.name?` | `string` | - | | `params.stakeAmount?` | `bigint` | - | | `params.website?` | `string` | - | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | Transaction options | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | Transaction options | #### Returns @@ -286,7 +286,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:25 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireEntryPoint`](../../core/classes/BaseClient.md#requireentrypoint) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireEntryPoint`](../../sdk/classes/BaseClient.md#requireentrypoint) *** @@ -302,7 +302,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:22 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGToken`](../../core/classes/BaseClient.md#requiregtoken) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGToken`](../../sdk/classes/BaseClient.md#requiregtoken) *** @@ -318,7 +318,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:23 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGTokenStaking`](../../core/classes/BaseClient.md#requiregtokenstaking) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGTokenStaking`](../../sdk/classes/BaseClient.md#requiregtokenstaking) *** @@ -334,7 +334,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:24 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requirePaymasterFactory`](../../core/classes/BaseClient.md#requirepaymasterfactory) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requirePaymasterFactory`](../../sdk/classes/BaseClient.md#requirepaymasterfactory) *** @@ -350,7 +350,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireRegistry`](../../core/classes/BaseClient.md#requireregistry) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireRegistry`](../../sdk/classes/BaseClient.md#requireregistry) *** @@ -358,7 +358,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 > **revokeMembership**(`userAddr`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/CommunityClient.ts:336](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L336) +Defined in: [enduser/src/CommunityClient.ts:360](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L360) Revoke membership (Burn SBT) @@ -367,7 +367,7 @@ Revoke membership (Burn SBT) | Parameter | Type | | ------ | ------ | | `userAddr` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -379,7 +379,7 @@ Revoke membership (Burn SBT) > **setReputationRule**(`ruleId`, `ruleConfig`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/CommunityClient.ts:312](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L312) +Defined in: [enduser/src/CommunityClient.ts:336](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L336) #### Parameters @@ -387,7 +387,7 @@ Defined in: [enduser/src/CommunityClient.ts:312](https://github.com/AAStarCommun | ------ | ------ | | `ruleId` | `bigint` | | `ruleConfig` | `any` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -399,7 +399,7 @@ Defined in: [enduser/src/CommunityClient.ts:312](https://github.com/AAStarCommun > **setupCommunity**(`params`, `options?`): `Promise`\<\{ `hashes`: `` `0x${string}` ``[]; `tokenAddress`: `` `0x${string}` ``; \}\> -Defined in: [enduser/src/CommunityClient.ts:210](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L210) +Defined in: [enduser/src/CommunityClient.ts:234](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L234) One-click Setup: Register Community + Deploy Token Orchestrates the complete community initialization flow. @@ -416,7 +416,7 @@ Orchestrates the complete community initialization flow. | `params.tokenName?` | `string` | | `params.tokenSymbol?` | `string` | | `params.website?` | `string` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -428,7 +428,7 @@ Orchestrates the complete community initialization flow. > **transferCommunityTokenOwnership**(`tokenAddress`, `newOwner`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/CommunityClient.ts:353](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L353) +Defined in: [enduser/src/CommunityClient.ts:377](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L377) Transfer ownership of the Community Token @@ -438,7 +438,7 @@ Transfer ownership of the Community Token | ------ | ------ | | `tokenAddress` | `` `0x${string}` `` | | `newOwner` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns diff --git a/api/@aastar/enduser/classes/UserClient.md b/api/@aastar/enduser/classes/UserClient.md index c186c6a75..eb155d4c9 100644 --- a/api/@aastar/enduser/classes/UserClient.md +++ b/api/@aastar/enduser/classes/UserClient.md @@ -1,8 +1,8 @@ -Defined in: [enduser/src/UserClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L17) +Defined in: [enduser/src/UserClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L17) ## Extends -- [`BaseClient`](../../core/classes/BaseClient.md) +- [`BaseClient`](../../sdk/classes/BaseClient.md) ## Constructors @@ -10,7 +10,7 @@ Defined in: [enduser/src/UserClient.ts:17](https://github.com/AAStarCommunity/aa > **new UserClient**(`config`): `UserClient` -Defined in: [enduser/src/UserClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L26) +Defined in: [enduser/src/UserClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L26) #### Parameters @@ -24,7 +24,7 @@ Defined in: [enduser/src/UserClient.ts:26](https://github.com/AAStarCommunity/aa #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`constructor`](../../core/classes/BaseClient.md#constructor) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`constructor`](../../sdk/classes/BaseClient.md#constructor) ## Properties @@ -32,7 +32,7 @@ Defined in: [enduser/src/UserClient.ts:26](https://github.com/AAStarCommunity/aa > **accountAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L18) +Defined in: [enduser/src/UserClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L18) *** @@ -40,19 +40,19 @@ Defined in: [enduser/src/UserClient.ts:18](https://github.com/AAStarCommunity/aa > `optional` **bundlerClient**: `any` -Defined in: [enduser/src/UserClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L24) +Defined in: [enduser/src/UserClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L24) *** ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/BaseClient.d.ts:5 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`client`](../../core/classes/BaseClient.md#client) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`client`](../../sdk/classes/BaseClient.md#client) *** @@ -60,11 +60,11 @@ Defined in: core/dist/clients/BaseClient.d.ts:5 > `optional` **entryPointAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L20) +Defined in: [enduser/src/UserClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L20) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`entryPointAddress`](../../core/classes/BaseClient.md#entrypointaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`entryPointAddress`](../../sdk/classes/BaseClient.md#entrypointaddress) *** @@ -72,11 +72,11 @@ Defined in: [enduser/src/UserClient.ts:20](https://github.com/AAStarCommunity/aa > `optional` **gTokenAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L23) +Defined in: [enduser/src/UserClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L23) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenAddress`](../../core/classes/BaseClient.md#gtokenaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenAddress`](../../sdk/classes/BaseClient.md#gtokenaddress) *** @@ -84,11 +84,11 @@ Defined in: [enduser/src/UserClient.ts:23](https://github.com/AAStarCommunity/aa > `optional` **gTokenStakingAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L21) +Defined in: [enduser/src/UserClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L21) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenStakingAddress`](../../core/classes/BaseClient.md#gtokenstakingaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenStakingAddress`](../../sdk/classes/BaseClient.md#gtokenstakingaddress) *** @@ -100,19 +100,19 @@ Defined in: core/dist/clients/BaseClient.d.ts:10 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`paymasterFactoryAddress`](../../core/classes/BaseClient.md#paymasterfactoryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`paymasterFactoryAddress`](../../sdk/classes/BaseClient.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:6 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`publicClient`](../../core/classes/BaseClient.md#publicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`publicClient`](../../sdk/classes/BaseClient.md#publicclient) *** @@ -120,11 +120,11 @@ Defined in: core/dist/clients/BaseClient.d.ts:6 > `optional` **registryAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L22) +Defined in: [enduser/src/UserClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L22) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`registryAddress`](../../core/classes/BaseClient.md#registryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`registryAddress`](../../sdk/classes/BaseClient.md#registryaddress) *** @@ -132,7 +132,7 @@ Defined in: [enduser/src/UserClient.ts:22](https://github.com/AAStarCommunity/aa > `optional` **sbtAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L19) +Defined in: [enduser/src/UserClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L19) ## Methods @@ -140,7 +140,7 @@ Defined in: [enduser/src/UserClient.ts:19](https://github.com/AAStarCommunity/aa > **execute**(`target`, `value`, `data`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L155) +Defined in: [enduser/src/UserClient.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L155) Execute a transaction from the AA account @@ -151,7 +151,7 @@ Execute a transaction from the AA account | `target` | `` `0x${string}` `` | | `value` | `bigint` | | `data` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -163,7 +163,7 @@ Execute a transaction from the AA account > **executeBatch**(`targets`, `values`, `datas`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L174) +Defined in: [enduser/src/UserClient.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L174) Execute a batch of transactions @@ -174,7 +174,7 @@ Execute a batch of transactions | `targets` | `` `0x${string}` ``[] | | `values` | `bigint`[] | | `datas` | `` `0x${string}` ``[] | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -186,7 +186,7 @@ Execute a batch of transactions > **executeGasless**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:441](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L441) +Defined in: [enduser/src/UserClient.ts:441](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L441) Execute a transaction with Gasless Sponsorship @@ -202,7 +202,7 @@ Execute a transaction with Gasless Sponsorship | `params.paymasterType?` | `"V4"` \| `"Super"` | | `params.target?` | `` `0x${string}` `` | | `params.value?` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -214,14 +214,14 @@ Execute a transaction with Gasless Sponsorship > **exitRole**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:320](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L320) +Defined in: [enduser/src/UserClient.ts:320](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L320) #### Parameters | Parameter | Type | | ------ | ------ | | `roleId` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -243,7 +243,7 @@ Get the account address of the connected wallet #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getAddress`](../../core/classes/BaseClient.md#getaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getAddress`](../../sdk/classes/BaseClient.md#getaddress) *** @@ -251,7 +251,7 @@ Get the account address of the connected wallet > **getNonce**(`key`): `Promise`\<`bigint`\> -Defined in: [enduser/src/UserClient.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L125) +Defined in: [enduser/src/UserClient.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L125) Get the nonce of the account from EntryPoint (more reliable for 4337) @@ -271,7 +271,7 @@ Get the nonce of the account from EntryPoint (more reliable for 4337) > **getOwner**(): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L143) +Defined in: [enduser/src/UserClient.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L143) Get the owner of the AA account @@ -285,7 +285,7 @@ Get the owner of the AA account > **getSBTBalance**(): `Promise`\<`bigint`\> -Defined in: [enduser/src/UserClient.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L196) +Defined in: [enduser/src/UserClient.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L196) Get user's SBT balance @@ -299,7 +299,7 @@ Get user's SBT balance > **getStakedBalance**(`roleId`): `Promise`\<`bigint`\> -Defined in: [enduser/src/UserClient.ts:302](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L302) +Defined in: [enduser/src/UserClient.ts:302](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L302) Get staked balance for a specific role @@ -317,7 +317,7 @@ Get staked balance for a specific role ### getStartPublicClient() -> **getStartPublicClient**(): [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../core/interfaces/PublicClient.md) +> **getStartPublicClient**(): [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:20 @@ -325,11 +325,11 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor #### Returns -[`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../core/interfaces/PublicClient.md) +[`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getStartPublicClient`](../../core/classes/BaseClient.md#getstartpublicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getStartPublicClient`](../../sdk/classes/BaseClient.md#getstartpublicclient) *** @@ -337,7 +337,7 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > **getTokenBalance**(`token`): `Promise`\<`bigint`\> -Defined in: [enduser/src/UserClient.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L248) +Defined in: [enduser/src/UserClient.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L248) Get Token Balance @@ -357,14 +357,14 @@ Get Token Balance > **leaveCommunity**(`community`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:337](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L337) +Defined in: [enduser/src/UserClient.ts:337](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L337) #### Parameters | Parameter | Type | | ------ | ------ | | `community` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -376,14 +376,14 @@ Defined in: [enduser/src/UserClient.ts:337](https://github.com/AAStarCommunity/a > **mintSBT**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:209](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L209) +Defined in: [enduser/src/UserClient.ts:209](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L209) #### Parameters | Parameter | Type | | ------ | ------ | | `roleId` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -395,7 +395,7 @@ Defined in: [enduser/src/UserClient.ts:209](https://github.com/AAStarCommunity/a > **registerAsEndUser**(`communityAddress`, `stakeAmount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:358](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L358) +Defined in: [enduser/src/UserClient.ts:358](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L358) Register as EndUser (One-click: Approve + Register) Handles GToken approval to Staking contract and Role registration. @@ -406,7 +406,7 @@ Handles GToken approval to Staking contract and Role registration. | ------ | ------ | | `communityAddress` | `` `0x${string}` `` | | `stakeAmount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -426,7 +426,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:25 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireEntryPoint`](../../core/classes/BaseClient.md#requireentrypoint) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireEntryPoint`](../../sdk/classes/BaseClient.md#requireentrypoint) *** @@ -442,7 +442,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:22 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGToken`](../../core/classes/BaseClient.md#requiregtoken) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGToken`](../../sdk/classes/BaseClient.md#requiregtoken) *** @@ -458,7 +458,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:23 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGTokenStaking`](../../core/classes/BaseClient.md#requiregtokenstaking) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGTokenStaking`](../../sdk/classes/BaseClient.md#requiregtokenstaking) *** @@ -474,7 +474,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:24 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requirePaymasterFactory`](../../core/classes/BaseClient.md#requirepaymasterfactory) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requirePaymasterFactory`](../../sdk/classes/BaseClient.md#requirepaymasterfactory) *** @@ -490,7 +490,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireRegistry`](../../core/classes/BaseClient.md#requireregistry) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireRegistry`](../../sdk/classes/BaseClient.md#requireregistry) *** @@ -498,7 +498,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 > **stakeForRole**(`roleId`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L265) +Defined in: [enduser/src/UserClient.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L265) #### Parameters @@ -506,7 +506,7 @@ Defined in: [enduser/src/UserClient.ts:265](https://github.com/AAStarCommunity/a | ------ | ------ | | `roleId` | `` `0x${string}` `` | | `amount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -518,7 +518,7 @@ Defined in: [enduser/src/UserClient.ts:265](https://github.com/AAStarCommunity/a > **transferToken**(`token`, `to`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:230](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L230) +Defined in: [enduser/src/UserClient.ts:230](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L230) #### Parameters @@ -527,7 +527,7 @@ Defined in: [enduser/src/UserClient.ts:230](https://github.com/AAStarCommunity/a | `token` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` | | `amount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -539,14 +539,14 @@ Defined in: [enduser/src/UserClient.ts:230](https://github.com/AAStarCommunity/a > **unstakeFromRole**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserClient.ts:282](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L282) +Defined in: [enduser/src/UserClient.ts:282](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L282) #### Parameters | Parameter | Type | | ------ | ------ | | `roleId` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -558,7 +558,7 @@ Defined in: [enduser/src/UserClient.ts:282](https://github.com/AAStarCommunity/a > `static` **deployAccount**(`client`, `params`): `Promise`\<\{ `accountAddress`: `` `0x${string}` ``; `hash`: `` `0x${string}` ``; \}\> -Defined in: [enduser/src/UserClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L45) +Defined in: [enduser/src/UserClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L45) Deploy a new Smart Account (Supports multiple factory types) Static helper to facilitate onboarding before instantiating the UserClient. diff --git a/api/@aastar/enduser/classes/UserLifecycle.md b/api/@aastar/enduser/classes/UserLifecycle.md index 14b2b6223..e4bba62ae 100644 --- a/api/@aastar/enduser/classes/UserLifecycle.md +++ b/api/@aastar/enduser/classes/UserLifecycle.md @@ -1,4 +1,4 @@ -Defined in: [enduser/src/UserLifecycle.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L40) +Defined in: [enduser/src/UserLifecycle.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L40) UserLifecycle - L3 Pattern @@ -9,7 +9,7 @@ Responsibilities: ## Extends -- [`BaseClient`](../../core/classes/BaseClient.md) +- [`BaseClient`](../../sdk/classes/BaseClient.md) ## Constructors @@ -17,7 +17,7 @@ Responsibilities: > **new UserLifecycle**(`config`): `UserLifecycle` -Defined in: [enduser/src/UserLifecycle.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L51) +Defined in: [enduser/src/UserLifecycle.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L51) #### Parameters @@ -31,7 +31,7 @@ Defined in: [enduser/src/UserLifecycle.ts:51](https://github.com/AAStarCommunity #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`constructor`](../../core/classes/BaseClient.md#constructor) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`constructor`](../../sdk/classes/BaseClient.md#constructor) ## Properties @@ -39,19 +39,19 @@ Defined in: [enduser/src/UserLifecycle.ts:51](https://github.com/AAStarCommunity > **accountAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L41) +Defined in: [enduser/src/UserLifecycle.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L41) *** ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/BaseClient.d.ts:5 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`client`](../../core/classes/BaseClient.md#client) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`client`](../../sdk/classes/BaseClient.md#client) *** @@ -59,7 +59,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:5 > **config**: [`UserLifecycleConfig`](../interfaces/UserLifecycleConfig.md) -Defined in: [enduser/src/UserLifecycle.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L49) +Defined in: [enduser/src/UserLifecycle.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L49) *** @@ -67,11 +67,11 @@ Defined in: [enduser/src/UserLifecycle.ts:49](https://github.com/AAStarCommunity > **entryPointAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L46) +Defined in: [enduser/src/UserLifecycle.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L46) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`entryPointAddress`](../../core/classes/BaseClient.md#entrypointaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`entryPointAddress`](../../sdk/classes/BaseClient.md#entrypointaddress) *** @@ -79,7 +79,7 @@ Defined in: [enduser/src/UserLifecycle.ts:46](https://github.com/AAStarCommunity > `optional` **gaslessConfig**: [`GaslessConfig`](../interfaces/GaslessConfig.md) -Defined in: [enduser/src/UserLifecycle.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L47) +Defined in: [enduser/src/UserLifecycle.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L47) *** @@ -87,11 +87,11 @@ Defined in: [enduser/src/UserLifecycle.ts:47](https://github.com/AAStarCommunity > **gTokenAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L44) +Defined in: [enduser/src/UserLifecycle.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L44) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenAddress`](../../core/classes/BaseClient.md#gtokenaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenAddress`](../../sdk/classes/BaseClient.md#gtokenaddress) *** @@ -99,11 +99,11 @@ Defined in: [enduser/src/UserLifecycle.ts:44](https://github.com/AAStarCommunity > **gTokenStakingAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L45) +Defined in: [enduser/src/UserLifecycle.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L45) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenStakingAddress`](../../core/classes/BaseClient.md#gtokenstakingaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenStakingAddress`](../../sdk/classes/BaseClient.md#gtokenstakingaddress) *** @@ -115,19 +115,19 @@ Defined in: core/dist/clients/BaseClient.d.ts:10 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`paymasterFactoryAddress`](../../core/classes/BaseClient.md#paymasterfactoryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`paymasterFactoryAddress`](../../sdk/classes/BaseClient.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:6 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`publicClient`](../../core/classes/BaseClient.md#publicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`publicClient`](../../sdk/classes/BaseClient.md#publicclient) *** @@ -135,11 +135,11 @@ Defined in: core/dist/clients/BaseClient.d.ts:6 > **registryAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L42) +Defined in: [enduser/src/UserLifecycle.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L42) #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`registryAddress`](../../core/classes/BaseClient.md#registryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`registryAddress`](../../sdk/classes/BaseClient.md#registryaddress) *** @@ -147,7 +147,7 @@ Defined in: [enduser/src/UserLifecycle.ts:42](https://github.com/AAStarCommunity > **sbtAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L43) +Defined in: [enduser/src/UserLifecycle.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L43) ## Methods @@ -155,7 +155,7 @@ Defined in: [enduser/src/UserLifecycle.ts:43](https://github.com/AAStarCommunity > **checkEligibility**(`community`): `Promise`\<`boolean`\> -Defined in: [enduser/src/UserLifecycle.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L71) +Defined in: [enduser/src/UserLifecycle.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L71) Check if user is eligible to join a community @@ -175,14 +175,14 @@ Check if user is eligible to join a community > **claimSBT**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserLifecycle.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L170) +Defined in: [enduser/src/UserLifecycle.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L170) #### Parameters | Parameter | Type | | ------ | ------ | | `roleId` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -194,7 +194,7 @@ Defined in: [enduser/src/UserLifecycle.ts:170](https://github.com/AAStarCommunit > **enableGasless**(`config`): `Promise`\<`void`\> -Defined in: [enduser/src/UserLifecycle.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L123) +Defined in: [enduser/src/UserLifecycle.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L123) Enable or update Gasless configuration @@ -214,7 +214,7 @@ Enable or update Gasless configuration > **executeGaslessTx**(`params`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserLifecycle.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L135) +Defined in: [enduser/src/UserLifecycle.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L135) Execute a transaction effectively using Gasless configuration if available @@ -238,14 +238,14 @@ Execute a transaction effectively using Gasless configuration if available > **exitRole**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserLifecycle.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L217) +Defined in: [enduser/src/UserLifecycle.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L217) #### Parameters | Parameter | Type | | ------ | ------ | | `roleId` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -267,7 +267,7 @@ Get the account address of the connected wallet #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getAddress`](../../core/classes/BaseClient.md#getaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getAddress`](../../sdk/classes/BaseClient.md#getaddress) *** @@ -275,7 +275,7 @@ Get the account address of the connected wallet > **getCreditLimit**(): `Promise`\<`bigint`\> -Defined in: [enduser/src/UserLifecycle.ts:199](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L199) +Defined in: [enduser/src/UserLifecycle.ts:199](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L199) #### Returns @@ -287,7 +287,7 @@ Defined in: [enduser/src/UserLifecycle.ts:199](https://github.com/AAStarCommunit > **getMyReputation**(): `Promise`\<[`ReputationData`](../interfaces/ReputationData.md)\> -Defined in: [enduser/src/UserLifecycle.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L183) +Defined in: [enduser/src/UserLifecycle.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L183) #### Returns @@ -297,7 +297,7 @@ Defined in: [enduser/src/UserLifecycle.ts:183](https://github.com/AAStarCommunit ### getStartPublicClient() -> **getStartPublicClient**(): [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../core/interfaces/PublicClient.md) +> **getStartPublicClient**(): [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:20 @@ -305,11 +305,11 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor #### Returns -[`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../core/interfaces/PublicClient.md) +[`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> \| [`PublicClient`](../../sdk/interfaces/PublicClient.md) #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getStartPublicClient`](../../core/classes/BaseClient.md#getstartpublicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getStartPublicClient`](../../sdk/classes/BaseClient.md#getstartpublicclient) *** @@ -317,14 +317,14 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > **leaveCommunity**(`community`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserLifecycle.ts:208](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L208) +Defined in: [enduser/src/UserLifecycle.ts:208](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L208) #### Parameters | Parameter | Type | | ------ | ------ | | `community` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -336,7 +336,7 @@ Defined in: [enduser/src/UserLifecycle.ts:208](https://github.com/AAStarCommunit > **onboard**(`community`, `stakeAmount`): `Promise`\<[`OnboardResult`](../interfaces/OnboardResult.md)\> -Defined in: [enduser/src/UserLifecycle.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L84) +Defined in: [enduser/src/UserLifecycle.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L84) One-click Onboarding: Approve -> Stake -> Register -> Mint SBT @@ -365,7 +365,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:25 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireEntryPoint`](../../core/classes/BaseClient.md#requireentrypoint) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireEntryPoint`](../../sdk/classes/BaseClient.md#requireentrypoint) *** @@ -381,7 +381,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:22 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGToken`](../../core/classes/BaseClient.md#requiregtoken) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGToken`](../../sdk/classes/BaseClient.md#requiregtoken) *** @@ -397,7 +397,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:23 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGTokenStaking`](../../core/classes/BaseClient.md#requiregtokenstaking) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGTokenStaking`](../../sdk/classes/BaseClient.md#requiregtokenstaking) *** @@ -413,7 +413,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:24 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requirePaymasterFactory`](../../core/classes/BaseClient.md#requirepaymasterfactory) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requirePaymasterFactory`](../../sdk/classes/BaseClient.md#requirepaymasterfactory) *** @@ -429,7 +429,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireRegistry`](../../core/classes/BaseClient.md#requireregistry) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireRegistry`](../../sdk/classes/BaseClient.md#requireregistry) *** @@ -437,14 +437,14 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 > **unstakeAll**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [enduser/src/UserLifecycle.ts:226](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L226) +Defined in: [enduser/src/UserLifecycle.ts:226](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L226) #### Parameters | Parameter | Type | | ------ | ------ | | `roleId` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns diff --git a/api/@aastar/enduser/interfaces/CommunityClientConfig.md b/api/@aastar/enduser/interfaces/CommunityClientConfig.md index 8826abf4f..4d096da42 100644 --- a/api/@aastar/enduser/interfaces/CommunityClientConfig.md +++ b/api/@aastar/enduser/interfaces/CommunityClientConfig.md @@ -1,16 +1,16 @@ -Defined in: [enduser/src/CommunityClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L5) +Defined in: [enduser/src/CommunityClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L5) Base configuration for all L2 Business Clients ## Extends -- [`ClientConfig`](../../core/interfaces/ClientConfig.md) +- [`ClientConfig`](../../sdk/interfaces/ClientConfig.md) ## Properties ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/types.d.ts:11 @@ -19,7 +19,7 @@ Must have an account attached. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`client`](../../core/interfaces/ClientConfig.md#client) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`client`](../../sdk/interfaces/ClientConfig.md#client) *** @@ -31,7 +31,7 @@ Defined in: core/dist/clients/types.d.ts:41 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`entryPointAddress`](../../core/interfaces/ClientConfig.md#entrypointaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`entryPointAddress`](../../sdk/interfaces/ClientConfig.md#entrypointaddress) *** @@ -43,7 +43,7 @@ Defined in: core/dist/clients/types.d.ts:40 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../core/interfaces/ClientConfig.md#ethusdpricefeedaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../sdk/interfaces/ClientConfig.md#ethusdpricefeedaddress) *** @@ -51,7 +51,7 @@ Defined in: core/dist/clients/types.d.ts:40 > `optional` **factoryAddress**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L7) +Defined in: [enduser/src/CommunityClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L7) *** @@ -66,7 +66,7 @@ Required for operations involving token approvals and transfers. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenAddress`](../../core/interfaces/ClientConfig.md#gtokenaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenAddress`](../../sdk/interfaces/ClientConfig.md#gtokenaddress) *** @@ -81,7 +81,7 @@ Required for role registration that involves staking. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../core/interfaces/ClientConfig.md#gtokenstakingaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../sdk/interfaces/ClientConfig.md#gtokenstakingaddress) *** @@ -96,13 +96,13 @@ Required for deploying new PaymasterV4 instances. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../core/interfaces/ClientConfig.md#paymasterfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../sdk/interfaces/ClientConfig.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/types.d.ts:18 @@ -113,7 +113,7 @@ However, explicitly accepting PublicClient encourages separation. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`publicClient`](../../core/interfaces/ClientConfig.md#publicclient) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`publicClient`](../../sdk/interfaces/ClientConfig.md#publicclient) *** @@ -128,7 +128,7 @@ Essential for looking up other contracts if not provided explicitly. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`registryAddress`](../../core/interfaces/ClientConfig.md#registryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`registryAddress`](../../sdk/interfaces/ClientConfig.md#registryaddress) *** @@ -136,7 +136,7 @@ Essential for looking up other contracts if not provided explicitly. > `optional` **reputationAddress**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L8) +Defined in: [enduser/src/CommunityClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L8) *** @@ -144,7 +144,7 @@ Defined in: [enduser/src/CommunityClient.ts:8](https://github.com/AAStarCommunit > `optional` **sbtAddress**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L6) +Defined in: [enduser/src/CommunityClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L6) *** @@ -156,4 +156,4 @@ Defined in: core/dist/clients/types.d.ts:39 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../core/interfaces/ClientConfig.md#xpntsfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../sdk/interfaces/ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/enduser/interfaces/CommunityInfo.md b/api/@aastar/enduser/interfaces/CommunityInfo.md index 137aa5ba3..d1fd5c27e 100644 --- a/api/@aastar/enduser/interfaces/CommunityInfo.md +++ b/api/@aastar/enduser/interfaces/CommunityInfo.md @@ -1,4 +1,4 @@ -Defined in: [enduser/src/CommunityClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L18) +Defined in: [enduser/src/CommunityClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L18) ## Properties @@ -6,4 +6,4 @@ Defined in: [enduser/src/CommunityClient.ts:18](https://github.com/AAStarCommuni > **address**: `` `0x${string}` `` -Defined in: [enduser/src/CommunityClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L19) +Defined in: [enduser/src/CommunityClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L19) diff --git a/api/@aastar/enduser/interfaces/CreateCommunityParams.md b/api/@aastar/enduser/interfaces/CreateCommunityParams.md index a460156e3..be28b588c 100644 --- a/api/@aastar/enduser/interfaces/CreateCommunityParams.md +++ b/api/@aastar/enduser/interfaces/CreateCommunityParams.md @@ -1,4 +1,4 @@ -Defined in: [enduser/src/CommunityClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L11) +Defined in: [enduser/src/CommunityClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L11) ## Properties @@ -6,7 +6,7 @@ Defined in: [enduser/src/CommunityClient.ts:11](https://github.com/AAStarCommuni > `optional` **description**: `string` -Defined in: [enduser/src/CommunityClient.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L15) +Defined in: [enduser/src/CommunityClient.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L15) *** @@ -14,7 +14,7 @@ Defined in: [enduser/src/CommunityClient.ts:15](https://github.com/AAStarCommuni > `optional` **ensName**: `string` -Defined in: [enduser/src/CommunityClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L14) +Defined in: [enduser/src/CommunityClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L14) *** @@ -22,7 +22,7 @@ Defined in: [enduser/src/CommunityClient.ts:14](https://github.com/AAStarCommuni > **name**: `string` -Defined in: [enduser/src/CommunityClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L12) +Defined in: [enduser/src/CommunityClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L12) *** @@ -30,4 +30,4 @@ Defined in: [enduser/src/CommunityClient.ts:12](https://github.com/AAStarCommuni > **tokenSymbol**: `string` -Defined in: [enduser/src/CommunityClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/CommunityClient.ts#L13) +Defined in: [enduser/src/CommunityClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L13) diff --git a/api/@aastar/enduser/interfaces/GaslessConfig.md b/api/@aastar/enduser/interfaces/GaslessConfig.md index 727c46018..d77728f5c 100644 --- a/api/@aastar/enduser/interfaces/GaslessConfig.md +++ b/api/@aastar/enduser/interfaces/GaslessConfig.md @@ -1,4 +1,4 @@ -Defined in: [enduser/src/UserLifecycle.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L5) +Defined in: [enduser/src/UserLifecycle.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L5) ## Properties @@ -6,7 +6,7 @@ Defined in: [enduser/src/UserLifecycle.ts:5](https://github.com/AAStarCommunity/ > **paymasterUrl**: `string` -Defined in: [enduser/src/UserLifecycle.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L6) +Defined in: [enduser/src/UserLifecycle.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L6) *** @@ -14,4 +14,4 @@ Defined in: [enduser/src/UserLifecycle.ts:6](https://github.com/AAStarCommunity/ > `optional` **policy**: `"CREDIT"` \| `"TOKEN"` \| `"SPONSORED"` -Defined in: [enduser/src/UserLifecycle.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L7) +Defined in: [enduser/src/UserLifecycle.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L7) diff --git a/api/@aastar/enduser/interfaces/OnboardResult.md b/api/@aastar/enduser/interfaces/OnboardResult.md index e651bc69f..0b70e5971 100644 --- a/api/@aastar/enduser/interfaces/OnboardResult.md +++ b/api/@aastar/enduser/interfaces/OnboardResult.md @@ -1,4 +1,4 @@ -Defined in: [enduser/src/UserLifecycle.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L20) +Defined in: [enduser/src/UserLifecycle.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L20) ## Properties @@ -6,7 +6,7 @@ Defined in: [enduser/src/UserLifecycle.ts:20](https://github.com/AAStarCommunity > `optional` **sbtId**: `bigint` -Defined in: [enduser/src/UserLifecycle.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L22) +Defined in: [enduser/src/UserLifecycle.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L22) *** @@ -14,7 +14,7 @@ Defined in: [enduser/src/UserLifecycle.ts:22](https://github.com/AAStarCommunity > **success**: `boolean` -Defined in: [enduser/src/UserLifecycle.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L21) +Defined in: [enduser/src/UserLifecycle.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L21) *** @@ -22,4 +22,4 @@ Defined in: [enduser/src/UserLifecycle.ts:21](https://github.com/AAStarCommunity > `optional` **txHash**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L23) +Defined in: [enduser/src/UserLifecycle.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L23) diff --git a/api/@aastar/enduser/interfaces/ReputationData.md b/api/@aastar/enduser/interfaces/ReputationData.md index f31c524e4..e19c1bb17 100644 --- a/api/@aastar/enduser/interfaces/ReputationData.md +++ b/api/@aastar/enduser/interfaces/ReputationData.md @@ -1,4 +1,4 @@ -Defined in: [enduser/src/UserLifecycle.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L26) +Defined in: [enduser/src/UserLifecycle.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L26) ## Properties @@ -6,7 +6,7 @@ Defined in: [enduser/src/UserLifecycle.ts:26](https://github.com/AAStarCommunity > **creditLimit**: `bigint` -Defined in: [enduser/src/UserLifecycle.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L29) +Defined in: [enduser/src/UserLifecycle.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L29) *** @@ -14,7 +14,7 @@ Defined in: [enduser/src/UserLifecycle.ts:29](https://github.com/AAStarCommunity > **level**: `bigint` -Defined in: [enduser/src/UserLifecycle.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L28) +Defined in: [enduser/src/UserLifecycle.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L28) *** @@ -22,4 +22,4 @@ Defined in: [enduser/src/UserLifecycle.ts:28](https://github.com/AAStarCommunity > **score**: `bigint` -Defined in: [enduser/src/UserLifecycle.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L27) +Defined in: [enduser/src/UserLifecycle.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L27) diff --git a/api/@aastar/enduser/interfaces/UserClientConfig.md b/api/@aastar/enduser/interfaces/UserClientConfig.md index 7668184b1..8fa77fdbb 100644 --- a/api/@aastar/enduser/interfaces/UserClientConfig.md +++ b/api/@aastar/enduser/interfaces/UserClientConfig.md @@ -1,10 +1,10 @@ -Defined in: [enduser/src/UserClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L6) +Defined in: [enduser/src/UserClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L6) Base configuration for all L2 Business Clients ## Extends -- [`ClientConfig`](../../core/interfaces/ClientConfig.md) +- [`ClientConfig`](../../sdk/interfaces/ClientConfig.md) ## Properties @@ -12,7 +12,7 @@ Base configuration for all L2 Business Clients > **accountAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L7) +Defined in: [enduser/src/UserClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L7) *** @@ -20,13 +20,13 @@ Defined in: [enduser/src/UserClient.ts:7](https://github.com/AAStarCommunity/aas > `optional` **bundlerClient**: `any` -Defined in: [enduser/src/UserClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L14) +Defined in: [enduser/src/UserClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L14) *** ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/types.d.ts:11 @@ -35,7 +35,7 @@ Must have an account attached. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`client`](../../core/interfaces/ClientConfig.md#client) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`client`](../../sdk/interfaces/ClientConfig.md#client) *** @@ -43,11 +43,11 @@ Must have an account attached. > `optional` **entryPointAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L9) +Defined in: [enduser/src/UserClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L9) #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`entryPointAddress`](../../core/interfaces/ClientConfig.md#entrypointaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`entryPointAddress`](../../sdk/interfaces/ClientConfig.md#entrypointaddress) *** @@ -59,7 +59,7 @@ Defined in: core/dist/clients/types.d.ts:40 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../core/interfaces/ClientConfig.md#ethusdpricefeedaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../sdk/interfaces/ClientConfig.md#ethusdpricefeedaddress) *** @@ -67,14 +67,14 @@ Defined in: core/dist/clients/types.d.ts:40 > `optional` **gTokenAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L13) +Defined in: [enduser/src/UserClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L13) GToken contract address. Required for operations involving token approvals and transfers. #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenAddress`](../../core/interfaces/ClientConfig.md#gtokenaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenAddress`](../../sdk/interfaces/ClientConfig.md#gtokenaddress) *** @@ -82,14 +82,14 @@ Required for operations involving token approvals and transfers. > `optional` **gTokenStakingAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L11) +Defined in: [enduser/src/UserClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L11) GTokenStaking contract address. Required for role registration that involves staking. #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../core/interfaces/ClientConfig.md#gtokenstakingaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../sdk/interfaces/ClientConfig.md#gtokenstakingaddress) *** @@ -104,13 +104,13 @@ Required for deploying new PaymasterV4 instances. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../core/interfaces/ClientConfig.md#paymasterfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../sdk/interfaces/ClientConfig.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/types.d.ts:18 @@ -121,7 +121,7 @@ However, explicitly accepting PublicClient encourages separation. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`publicClient`](../../core/interfaces/ClientConfig.md#publicclient) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`publicClient`](../../sdk/interfaces/ClientConfig.md#publicclient) *** @@ -129,14 +129,14 @@ However, explicitly accepting PublicClient encourages separation. > `optional` **registryAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L12) +Defined in: [enduser/src/UserClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L12) Registry contract address. Essential for looking up other contracts if not provided explicitly. #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`registryAddress`](../../core/interfaces/ClientConfig.md#registryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`registryAddress`](../../sdk/interfaces/ClientConfig.md#registryaddress) *** @@ -144,7 +144,7 @@ Essential for looking up other contracts if not provided explicitly. > `optional` **sbtAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L8) +Defined in: [enduser/src/UserClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L8) *** @@ -152,7 +152,7 @@ Defined in: [enduser/src/UserClient.ts:8](https://github.com/AAStarCommunity/aas > `optional` **superPaymasterAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserClient.ts#L10) +Defined in: [enduser/src/UserClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L10) *** @@ -164,4 +164,4 @@ Defined in: core/dist/clients/types.d.ts:39 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../core/interfaces/ClientConfig.md#xpntsfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../sdk/interfaces/ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/enduser/interfaces/UserLifecycleConfig.md b/api/@aastar/enduser/interfaces/UserLifecycleConfig.md index 1bde7b19f..d829f3809 100644 --- a/api/@aastar/enduser/interfaces/UserLifecycleConfig.md +++ b/api/@aastar/enduser/interfaces/UserLifecycleConfig.md @@ -1,10 +1,10 @@ -Defined in: [enduser/src/UserLifecycle.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L10) +Defined in: [enduser/src/UserLifecycle.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L10) Base configuration for all L2 Business Clients ## Extends -- [`ClientConfig`](../../core/interfaces/ClientConfig.md) +- [`ClientConfig`](../../sdk/interfaces/ClientConfig.md) ## Properties @@ -12,13 +12,13 @@ Base configuration for all L2 Business Clients > **accountAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L11) +Defined in: [enduser/src/UserLifecycle.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L11) *** ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/types.d.ts:11 @@ -27,7 +27,7 @@ Must have an account attached. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`client`](../../core/interfaces/ClientConfig.md#client) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`client`](../../sdk/interfaces/ClientConfig.md#client) *** @@ -35,11 +35,11 @@ Must have an account attached. > **entryPointAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L16) +Defined in: [enduser/src/UserLifecycle.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L16) #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`entryPointAddress`](../../core/interfaces/ClientConfig.md#entrypointaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`entryPointAddress`](../../sdk/interfaces/ClientConfig.md#entrypointaddress) *** @@ -51,7 +51,7 @@ Defined in: core/dist/clients/types.d.ts:40 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../core/interfaces/ClientConfig.md#ethusdpricefeedaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../sdk/interfaces/ClientConfig.md#ethusdpricefeedaddress) *** @@ -59,7 +59,7 @@ Defined in: core/dist/clients/types.d.ts:40 > `optional` **gasless**: [`GaslessConfig`](GaslessConfig.md) -Defined in: [enduser/src/UserLifecycle.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L17) +Defined in: [enduser/src/UserLifecycle.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L17) *** @@ -67,14 +67,14 @@ Defined in: [enduser/src/UserLifecycle.ts:17](https://github.com/AAStarCommunity > **gTokenAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L14) +Defined in: [enduser/src/UserLifecycle.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L14) GToken contract address. Required for operations involving token approvals and transfers. #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenAddress`](../../core/interfaces/ClientConfig.md#gtokenaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenAddress`](../../sdk/interfaces/ClientConfig.md#gtokenaddress) *** @@ -82,14 +82,14 @@ Required for operations involving token approvals and transfers. > **gTokenStakingAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L15) +Defined in: [enduser/src/UserLifecycle.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L15) GTokenStaking contract address. Required for role registration that involves staking. #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../core/interfaces/ClientConfig.md#gtokenstakingaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../sdk/interfaces/ClientConfig.md#gtokenstakingaddress) *** @@ -104,13 +104,13 @@ Required for deploying new PaymasterV4 instances. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../core/interfaces/ClientConfig.md#paymasterfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../sdk/interfaces/ClientConfig.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/types.d.ts:18 @@ -121,7 +121,7 @@ However, explicitly accepting PublicClient encourages separation. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`publicClient`](../../core/interfaces/ClientConfig.md#publicclient) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`publicClient`](../../sdk/interfaces/ClientConfig.md#publicclient) *** @@ -129,14 +129,14 @@ However, explicitly accepting PublicClient encourages separation. > **registryAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L12) +Defined in: [enduser/src/UserLifecycle.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L12) Registry contract address. Essential for looking up other contracts if not provided explicitly. #### Overrides -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`registryAddress`](../../core/interfaces/ClientConfig.md#registryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`registryAddress`](../../sdk/interfaces/ClientConfig.md#registryaddress) *** @@ -144,7 +144,7 @@ Essential for looking up other contracts if not provided explicitly. > **sbtAddress**: `` `0x${string}` `` -Defined in: [enduser/src/UserLifecycle.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/enduser/src/UserLifecycle.ts#L13) +Defined in: [enduser/src/UserLifecycle.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L13) *** @@ -156,4 +156,4 @@ Defined in: core/dist/clients/types.d.ts:39 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../core/interfaces/ClientConfig.md#xpntsfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../sdk/interfaces/ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/identity/classes/ReputationClient.md b/api/@aastar/identity/classes/ReputationClient.md index 499f85904..aa161b609 100644 --- a/api/@aastar/identity/classes/ReputationClient.md +++ b/api/@aastar/identity/classes/ReputationClient.md @@ -1,4 +1,4 @@ -Defined in: [index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L7) +Defined in: [index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L7) ## Constructors @@ -6,7 +6,7 @@ Defined in: [index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c65 > **new ReputationClient**(`client`, `reputationAddress`, `walletClient?`): `ReputationClient` -Defined in: [index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L17) +Defined in: [index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L17) Initialize ReputationClient @@ -14,9 +14,9 @@ Initialize ReputationClient | Parameter | Type | Description | | ------ | ------ | ------ | -| `client` | [`PublicClient`](../../core/interfaces/PublicClient.md) | The public client for queries | +| `client` | [`PublicClient`](../../sdk/interfaces/PublicClient.md) | The public client for queries | | `reputationAddress` | `` `0x${string}` `` | The address of the reputation system contract | -| `walletClient?` | [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> | Optional wallet client for write operations | +| `walletClient?` | [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> | Optional wallet client for write operations | #### Returns @@ -28,7 +28,7 @@ Initialize ReputationClient > **computeScore**(`user`, `communities`, `ruleIds`, `activities`): `Promise`\<`bigint`\> -Defined in: [index.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L28) +Defined in: [index.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L28) Compute reputation score for a user @@ -51,7 +51,7 @@ Compute reputation score for a user > **getCreditLimit**(`user`): `Promise`\<`bigint`\> -Defined in: [index.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L58) +Defined in: [index.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L58) Get credit limit based on reputation @@ -73,7 +73,7 @@ Credit limit in wei (Mock logic closely tied to Reputation) > **getGlobalReputation**(`user`): `Promise`\<`number`\> -Defined in: [index.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L42) +Defined in: [index.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L42) Get global reputation score for a user @@ -95,7 +95,7 @@ Reputation score > **getReputationBreakdown**(`user`): `Promise`\<\{ `activityBonus`: `number`; `baseScore`: `number`; `penaltyDeduction`: `number`; `stakingBonus`: `number`; `total`: `number`; \}\> -Defined in: [index.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L77) +Defined in: [index.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L77) Get reputation score breakdown @@ -117,7 +117,7 @@ Detailed reputation breakdown (Mock implementation awaiting contract V4) > **submitReputationProof**(`params`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/index.ts#L101) +Defined in: [index.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L101) Submit reputation proof (off-chain data to on-chain) diff --git a/api/@aastar/identity/functions/checkMySBT.md b/api/@aastar/identity/functions/checkMySBT.md index a5c16fb80..7b6a9fce7 100644 --- a/api/@aastar/identity/functions/checkMySBT.md +++ b/api/@aastar/identity/functions/checkMySBT.md @@ -1,9 +1,15 @@ -> **checkMySBT**(`client`, `sbtAddress`, `user`): `Promise`\<\{ `balance?`: `bigint`; `hasSBT`: `boolean`; \}\> +> **checkMySBT**(`client`, `sbtAddress`, `user`): `Promise`\<\{ `balance`: `bigint`; `hasSBT`: `boolean`; \}\> -Defined in: [mysbt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/mysbt.ts#L8) +Defined in: [mysbt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/mysbt.ts#L14) Check if user holds MySBT token (identity verification). +Does NOT swallow read errors: `balanceOf` returns 0 for a non-holder, so any +thrown error is an RPC/transport/contract failure — masking it as +`{ hasSBT: false }` would turn a transient RPC blip into a false "no SBT" and +wrongly fail eligibility checks. The error propagates so the caller can retry +or surface "couldn't determine" rather than "no SBT". + ## Parameters | Parameter | Type | @@ -14,4 +20,4 @@ Check if user holds MySBT token (identity verification). ## Returns -`Promise`\<\{ `balance?`: `bigint`; `hasSBT`: `boolean`; \}\> +`Promise`\<\{ `balance`: `bigint`; `hasSBT`: `boolean`; \}\> diff --git a/api/@aastar/identity/functions/getMySBTId.md b/api/@aastar/identity/functions/getMySBTId.md index 5cfaecd26..931ec2fca 100644 --- a/api/@aastar/identity/functions/getMySBTId.md +++ b/api/@aastar/identity/functions/getMySBTId.md @@ -1,9 +1,15 @@ > **getMySBTId**(`client`, `sbtAddress`, `user`): `Promise`\<`bigint` \| `null`\> -Defined in: [mysbt.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/identity/src/mysbt.ts#L35) +Defined in: [mysbt.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/mysbt.ts#L39) -Fetch MySBT token ID for a specific user (if unique/SBT). -Note: Depends on whether the contract supports getTokenId or similar. +Fetch MySBT token ID for a specific user. +MySBT exposes `getUserSBT(address) -> uint256` (alias of the `userToSBT` +mapping), which returns the user's tokenId or 0 when they hold no SBT. + +Returns the tokenId, or `null` ONLY for the genuine "no SBT" sentinel (id == 0). +Read errors are NOT swallowed (see [checkMySBT](checkMySBT.md)): a transient RPC failure +must not be reported as "no SBT" (a false negative for eligibility). The error +propagates to the caller. ## Parameters diff --git a/api/@aastar/operator/classes/OperatorLifecycle.md b/api/@aastar/operator/classes/OperatorLifecycle.md index 03ab2aca4..972a279d8 100644 --- a/api/@aastar/operator/classes/OperatorLifecycle.md +++ b/api/@aastar/operator/classes/OperatorLifecycle.md @@ -1,4 +1,4 @@ -Defined in: [operator/src/OperatorLifecycle.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L19) +Defined in: [operator/src/OperatorLifecycle.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L19) OperatorLifecycle - L3 Pattern @@ -16,7 +16,7 @@ Responsibilities: > **new OperatorLifecycle**(`config`): `OperatorLifecycle` -Defined in: [operator/src/OperatorLifecycle.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L21) +Defined in: [operator/src/OperatorLifecycle.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L21) #### Parameters @@ -36,7 +36,7 @@ Defined in: [operator/src/OperatorLifecycle.ts:21](https://github.com/AAStarComm ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/BaseClient.d.ts:5 @@ -62,7 +62,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:11 > **ethUsdPriceFeed**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L23) +Defined in: [operator/src/PaymasterOperatorClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L23) #### Inherited from @@ -108,7 +108,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:10 ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:6 @@ -134,7 +134,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 > **superPaymasterAddress**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L21) +Defined in: [operator/src/PaymasterOperatorClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L21) #### Inherited from @@ -146,7 +146,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:21](https://github.com/AASt > `optional` **tokenAddress**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L22) +Defined in: [operator/src/PaymasterOperatorClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L22) #### Inherited from @@ -158,7 +158,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:22](https://github.com/AASt > **xpntsFactory**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L24) +Defined in: [operator/src/PaymasterOperatorClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L24) #### Inherited from @@ -170,7 +170,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:24](https://github.com/AASt > **addGasToken**(`token`, `price`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:415](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L415) +Defined in: [operator/src/PaymasterOperatorClient.ts:409](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L409) #### Parameters @@ -178,7 +178,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:415](https://github.com/AAS | ------ | ------ | | `token` | `` `0x${string}` `` | | `price` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -194,7 +194,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:415](https://github.com/AAS > **checkReadiness**(): `Promise`\<[`OperatorStatus`](../interfaces/OperatorStatus.md)\> -Defined in: [operator/src/OperatorLifecycle.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L33) +Defined in: [operator/src/OperatorLifecycle.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L33) Check if the account is ready to become an operator (e.g., has GToken, has ROLE_COMMUNITY, etc.) @@ -207,11 +207,12 @@ Check if the account is ready to become an operator ### configureOperator() -> **configureOperator**(`xPNTsToken?`, `treasury?`, `exchangeRate?`, `options?`): `Promise`\<`` `0x${string}` ``\> +> **configureOperator**(`xPNTsToken?`, `treasury?`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:327](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L327) +Defined in: [operator/src/PaymasterOperatorClient.ts:324](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L324) -Configure operator parameters (Token, Treasury, Exchange Rate). +Configure operator parameters (Token, Treasury). +Exchange rate is now read live from xPNTsToken.exchangeRate() at runtime. If parameters are undefined, existing values are preserved. #### Parameters @@ -220,8 +221,7 @@ If parameters are undefined, existing values are preserved. | ------ | ------ | | `xPNTsToken?` | `` `0x${string}` `` | | `treasury?` | `` `0x${string}` `` | -| `exchangeRate?` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -237,7 +237,7 @@ If parameters are undefined, existing values are preserved. > **deployAndRegisterPaymasterV4**(`params?`, `options?`): `Promise`\<\{ `deployHash`: `` `0x${string}` ``; `paymasterAddress`: `` `0x${string}` ``; `registerHash`: `` `0x${string}` ``; \}\> -Defined in: [operator/src/PaymasterOperatorClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L142) +Defined in: [operator/src/PaymasterOperatorClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L142) Deploy a new Paymaster V4 and Register as AOA Operator (one-stop API). This method handles: @@ -255,7 +255,7 @@ This method handles: | `params.salt?` | `bigint` | - | | `params.stakeAmount?` | `bigint` | - | | `params.version?` | `string` | - | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | Transaction options | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | Transaction options | #### Returns @@ -273,7 +273,7 @@ Object containing new paymaster address and transaction hashes > **depositCollateral**(`amount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L283) +Defined in: [operator/src/PaymasterOperatorClient.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L283) Deposit collateral (aPNTs/GToken) to SuperPaymaster. This is a helper method used by registerAsSuperPaymasterOperator. @@ -283,7 +283,7 @@ This is a helper method used by registerAsSuperPaymasterOperator. | Parameter | Type | | ------ | ------ | | `amount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -317,7 +317,7 @@ Get the account address of the connected wallet > **getOperatorDetails**(`operator?`): `Promise`\<`any`\> -Defined in: [operator/src/PaymasterOperatorClient.ts:378](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L378) +Defined in: [operator/src/PaymasterOperatorClient.ts:372](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L372) #### Parameters @@ -339,7 +339,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:378](https://github.com/AAS > **getOperatorStats**(): `Promise`\<`any`\> -Defined in: [operator/src/OperatorLifecycle.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L94) +Defined in: [operator/src/OperatorLifecycle.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L93) #### Returns @@ -349,7 +349,7 @@ Defined in: [operator/src/OperatorLifecycle.ts:94](https://github.com/AAStarComm ### getStartPublicClient() -> **getStartPublicClient**(): [`PublicClient`](../../core/interfaces/PublicClient.md) \| [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> +> **getStartPublicClient**(): [`PublicClient`](../../sdk/interfaces/PublicClient.md) \| [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> Defined in: core/dist/clients/BaseClient.d.ts:20 @@ -357,7 +357,7 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor #### Returns -[`PublicClient`](../../core/interfaces/PublicClient.md) \| [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> +[`PublicClient`](../../sdk/interfaces/PublicClient.md) \| [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> #### Inherited from @@ -369,7 +369,7 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > **getTokenPrice**(`token`): `Promise`\<`bigint`\> -Defined in: [operator/src/PaymasterOperatorClient.ts:428](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L428) +Defined in: [operator/src/PaymasterOperatorClient.ts:422](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L422) #### Parameters @@ -391,7 +391,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:428](https://github.com/AAS > **initiateExit**(`options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/OperatorLifecycle.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L105) +Defined in: [operator/src/OperatorLifecycle.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L104) Start the exit process: Unstake from Registry/SuperPaymaster and Unlock funds @@ -399,7 +399,7 @@ Start the exit process: Unstake from Registry/SuperPaymaster and Unlock funds | Parameter | Type | | ------ | ------ | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -415,7 +415,7 @@ Start the exit process: Unstake from Registry/SuperPaymaster and Unlock funds > **isOperator**(`operator`): `Promise`\<`boolean`\> -Defined in: [operator/src/PaymasterOperatorClient.ts:368](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L368) +Defined in: [operator/src/PaymasterOperatorClient.ts:362](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L362) #### Parameters @@ -437,7 +437,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:368](https://github.com/AAS > **registerAsSuperPaymasterOperator**(`params?`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L50) +Defined in: [operator/src/PaymasterOperatorClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L50) Register as SuperPaymaster Operator (one-stop API). This method handles all necessary steps: @@ -453,7 +453,7 @@ This method handles all necessary steps: | `params?` | \{ `depositAmount?`: `bigint`; `stakeAmount?`: `bigint`; \} | Registration parameters | | `params.depositAmount?` | `bigint` | - | | `params.stakeAmount?` | `bigint` | - | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | Transaction options | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | Transaction options | #### Returns @@ -551,7 +551,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 > **setupNode**(`params`, `options?`): `Promise`\<`` `0x${string}` ``[]\> -Defined in: [operator/src/OperatorLifecycle.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L50) +Defined in: [operator/src/OperatorLifecycle.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L50) One-click Setup: Register + Deposit + Deploy Node Wraps existing registerAsSuperPaymasterOperator or deployAndRegisterPaymasterV4 @@ -564,7 +564,7 @@ Wraps existing registerAsSuperPaymasterOperator or deployAndRegisterPaymasterV4 | `params.depositAmount?` | `bigint` | | `params.stakeAmount?` | `bigint` | | `params.type?` | `"V4"` \| `"SUPER"` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -576,7 +576,7 @@ Wraps existing registerAsSuperPaymasterOperator or deployAndRegisterPaymasterV4 > **setupPaymasterDeposit**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:437](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L437) +Defined in: [operator/src/PaymasterOperatorClient.ts:431](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L431) #### Parameters @@ -587,7 +587,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:437](https://github.com/AAS | `params.paymaster?` | `` `0x${string}` `` | | `params.token?` | `` `0x${string}` `` | | `params.user?` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -599,34 +599,11 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:437](https://github.com/AAS *** -### updateExchangeRate() - -> **updateExchangeRate**(`exchangeRate`, `options?`): `Promise`\<`` `0x${string}` ``\> - -Defined in: [operator/src/PaymasterOperatorClient.ts:319](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L319) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `exchangeRate` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | - -#### Returns - -`Promise`\<`` `0x${string}` ``\> - -#### Inherited from - -[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`updateExchangeRate`](PaymasterOperatorClient.md#updateexchangerate) - -*** - ### withdrawAllFunds() > **withdrawAllFunds**(`to?`, `options?`): `Promise`\<`` `0x${string}` ``[]\> -Defined in: [operator/src/OperatorLifecycle.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L113) +Defined in: [operator/src/OperatorLifecycle.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L112) Finalize exit: Withdraw all funds (Collateral + Rewards) @@ -635,7 +612,7 @@ Finalize exit: Withdraw all funds (Collateral + Rewards) | Parameter | Type | | ------ | ------ | | `to?` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -647,7 +624,7 @@ Finalize exit: Withdraw all funds (Collateral + Rewards) > **withdrawCollateral**(`to`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:355](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L355) +Defined in: [operator/src/PaymasterOperatorClient.ts:349](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L349) #### Parameters @@ -655,7 +632,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:355](https://github.com/AAS | ------ | ------ | | `to` | `` `0x${string}` `` | | `amount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -671,14 +648,14 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:355](https://github.com/AAS > **withdrawStake**(`to`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:399](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L399) +Defined in: [operator/src/PaymasterOperatorClient.ts:393](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L393) #### Parameters | Parameter | Type | | ------ | ------ | | `to` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns diff --git a/api/@aastar/operator/classes/PaymasterOperatorClient.md b/api/@aastar/operator/classes/PaymasterOperatorClient.md index 3fdf4a825..579cc9a02 100644 --- a/api/@aastar/operator/classes/PaymasterOperatorClient.md +++ b/api/@aastar/operator/classes/PaymasterOperatorClient.md @@ -1,10 +1,10 @@ -Defined in: [operator/src/PaymasterOperatorClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L20) +Defined in: [operator/src/PaymasterOperatorClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L20) Client for Paymaster Operators (ROLE_PAYMASTER_SUPER) ## Extends -- [`BaseClient`](../../core/classes/BaseClient.md) +- [`BaseClient`](../../sdk/classes/BaseClient.md) ## Extended by @@ -16,7 +16,7 @@ Client for Paymaster Operators (ROLE_PAYMASTER_SUPER) > **new PaymasterOperatorClient**(`config`): `PaymasterOperatorClient` -Defined in: [operator/src/PaymasterOperatorClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L26) +Defined in: [operator/src/PaymasterOperatorClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L26) #### Parameters @@ -30,19 +30,19 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:26](https://github.com/AASt #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`constructor`](../../core/classes/BaseClient.md#constructor) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`constructor`](../../sdk/classes/BaseClient.md#constructor) ## Properties ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/BaseClient.d.ts:5 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`client`](../../core/classes/BaseClient.md#client) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`client`](../../sdk/classes/BaseClient.md#client) *** @@ -54,7 +54,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:11 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`entryPointAddress`](../../core/classes/BaseClient.md#entrypointaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`entryPointAddress`](../../sdk/classes/BaseClient.md#entrypointaddress) *** @@ -62,7 +62,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:11 > **ethUsdPriceFeed**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L23) +Defined in: [operator/src/PaymasterOperatorClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L23) *** @@ -74,7 +74,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:8 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenAddress`](../../core/classes/BaseClient.md#gtokenaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenAddress`](../../sdk/classes/BaseClient.md#gtokenaddress) *** @@ -86,7 +86,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:9 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenStakingAddress`](../../core/classes/BaseClient.md#gtokenstakingaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenStakingAddress`](../../sdk/classes/BaseClient.md#gtokenstakingaddress) *** @@ -98,19 +98,19 @@ Defined in: core/dist/clients/BaseClient.d.ts:10 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`paymasterFactoryAddress`](../../core/classes/BaseClient.md#paymasterfactoryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`paymasterFactoryAddress`](../../sdk/classes/BaseClient.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:6 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`publicClient`](../../core/classes/BaseClient.md#publicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`publicClient`](../../sdk/classes/BaseClient.md#publicclient) *** @@ -122,7 +122,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`registryAddress`](../../core/classes/BaseClient.md#registryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`registryAddress`](../../sdk/classes/BaseClient.md#registryaddress) *** @@ -130,7 +130,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 > **superPaymasterAddress**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L21) +Defined in: [operator/src/PaymasterOperatorClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L21) *** @@ -138,7 +138,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:21](https://github.com/AASt > `optional` **tokenAddress**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L22) +Defined in: [operator/src/PaymasterOperatorClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L22) *** @@ -146,7 +146,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:22](https://github.com/AASt > **xpntsFactory**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L24) +Defined in: [operator/src/PaymasterOperatorClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L24) ## Methods @@ -154,7 +154,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:24](https://github.com/AASt > **addGasToken**(`token`, `price`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:415](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L415) +Defined in: [operator/src/PaymasterOperatorClient.ts:409](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L409) #### Parameters @@ -162,7 +162,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:415](https://github.com/AAS | ------ | ------ | | `token` | `` `0x${string}` `` | | `price` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -172,11 +172,12 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:415](https://github.com/AAS ### configureOperator() -> **configureOperator**(`xPNTsToken?`, `treasury?`, `exchangeRate?`, `options?`): `Promise`\<`` `0x${string}` ``\> +> **configureOperator**(`xPNTsToken?`, `treasury?`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:327](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L327) +Defined in: [operator/src/PaymasterOperatorClient.ts:324](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L324) -Configure operator parameters (Token, Treasury, Exchange Rate). +Configure operator parameters (Token, Treasury). +Exchange rate is now read live from xPNTsToken.exchangeRate() at runtime. If parameters are undefined, existing values are preserved. #### Parameters @@ -185,8 +186,7 @@ If parameters are undefined, existing values are preserved. | ------ | ------ | | `xPNTsToken?` | `` `0x${string}` `` | | `treasury?` | `` `0x${string}` `` | -| `exchangeRate?` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -198,7 +198,7 @@ If parameters are undefined, existing values are preserved. > **deployAndRegisterPaymasterV4**(`params?`, `options?`): `Promise`\<\{ `deployHash`: `` `0x${string}` ``; `paymasterAddress`: `` `0x${string}` ``; `registerHash`: `` `0x${string}` ``; \}\> -Defined in: [operator/src/PaymasterOperatorClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L142) +Defined in: [operator/src/PaymasterOperatorClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L142) Deploy a new Paymaster V4 and Register as AOA Operator (one-stop API). This method handles: @@ -216,7 +216,7 @@ This method handles: | `params.salt?` | `bigint` | - | | `params.stakeAmount?` | `bigint` | - | | `params.version?` | `string` | - | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | Transaction options | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | Transaction options | #### Returns @@ -230,7 +230,7 @@ Object containing new paymaster address and transaction hashes > **depositCollateral**(`amount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L283) +Defined in: [operator/src/PaymasterOperatorClient.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L283) Deposit collateral (aPNTs/GToken) to SuperPaymaster. This is a helper method used by registerAsSuperPaymasterOperator. @@ -240,7 +240,7 @@ This is a helper method used by registerAsSuperPaymasterOperator. | Parameter | Type | | ------ | ------ | | `amount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -262,7 +262,7 @@ Get the account address of the connected wallet #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getAddress`](../../core/classes/BaseClient.md#getaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getAddress`](../../sdk/classes/BaseClient.md#getaddress) *** @@ -270,7 +270,7 @@ Get the account address of the connected wallet > **getOperatorDetails**(`operator?`): `Promise`\<`any`\> -Defined in: [operator/src/PaymasterOperatorClient.ts:378](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L378) +Defined in: [operator/src/PaymasterOperatorClient.ts:372](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L372) #### Parameters @@ -286,7 +286,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:378](https://github.com/AAS ### getStartPublicClient() -> **getStartPublicClient**(): [`PublicClient`](../../core/interfaces/PublicClient.md) \| [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> +> **getStartPublicClient**(): [`PublicClient`](../../sdk/interfaces/PublicClient.md) \| [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> Defined in: core/dist/clients/BaseClient.d.ts:20 @@ -294,11 +294,11 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor #### Returns -[`PublicClient`](../../core/interfaces/PublicClient.md) \| [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> +[`PublicClient`](../../sdk/interfaces/PublicClient.md) \| [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getStartPublicClient`](../../core/classes/BaseClient.md#getstartpublicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getStartPublicClient`](../../sdk/classes/BaseClient.md#getstartpublicclient) *** @@ -306,7 +306,7 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > **getTokenPrice**(`token`): `Promise`\<`bigint`\> -Defined in: [operator/src/PaymasterOperatorClient.ts:428](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L428) +Defined in: [operator/src/PaymasterOperatorClient.ts:422](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L422) #### Parameters @@ -324,13 +324,13 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:428](https://github.com/AAS > **initiateExit**(`options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:388](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L388) +Defined in: [operator/src/PaymasterOperatorClient.ts:382](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L382) #### Parameters | Parameter | Type | | ------ | ------ | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -342,7 +342,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:388](https://github.com/AAS > **isOperator**(`operator`): `Promise`\<`boolean`\> -Defined in: [operator/src/PaymasterOperatorClient.ts:368](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L368) +Defined in: [operator/src/PaymasterOperatorClient.ts:362](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L362) #### Parameters @@ -360,7 +360,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:368](https://github.com/AAS > **registerAsSuperPaymasterOperator**(`params?`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L50) +Defined in: [operator/src/PaymasterOperatorClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L50) Register as SuperPaymaster Operator (one-stop API). This method handles all necessary steps: @@ -376,7 +376,7 @@ This method handles all necessary steps: | `params?` | \{ `depositAmount?`: `bigint`; `stakeAmount?`: `bigint`; \} | Registration parameters | | `params.depositAmount?` | `bigint` | - | | `params.stakeAmount?` | `bigint` | - | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | Transaction options | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | Transaction options | #### Returns @@ -398,7 +398,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:25 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireEntryPoint`](../../core/classes/BaseClient.md#requireentrypoint) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireEntryPoint`](../../sdk/classes/BaseClient.md#requireentrypoint) *** @@ -414,7 +414,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:22 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGToken`](../../core/classes/BaseClient.md#requiregtoken) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGToken`](../../sdk/classes/BaseClient.md#requiregtoken) *** @@ -430,7 +430,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:23 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGTokenStaking`](../../core/classes/BaseClient.md#requiregtokenstaking) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGTokenStaking`](../../sdk/classes/BaseClient.md#requiregtokenstaking) *** @@ -446,7 +446,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:24 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requirePaymasterFactory`](../../core/classes/BaseClient.md#requirepaymasterfactory) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requirePaymasterFactory`](../../sdk/classes/BaseClient.md#requirepaymasterfactory) *** @@ -462,7 +462,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireRegistry`](../../core/classes/BaseClient.md#requireregistry) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireRegistry`](../../sdk/classes/BaseClient.md#requireregistry) *** @@ -470,7 +470,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 > **setupPaymasterDeposit**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:437](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L437) +Defined in: [operator/src/PaymasterOperatorClient.ts:431](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L431) #### Parameters @@ -481,26 +481,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:437](https://github.com/AAS | `params.paymaster?` | `` `0x${string}` `` | | `params.token?` | `` `0x${string}` `` | | `params.user?` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | - -#### Returns - -`Promise`\<`` `0x${string}` ``\> - -*** - -### updateExchangeRate() - -> **updateExchangeRate**(`exchangeRate`, `options?`): `Promise`\<`` `0x${string}` ``\> - -Defined in: [operator/src/PaymasterOperatorClient.ts:319](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L319) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `exchangeRate` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -512,7 +493,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:319](https://github.com/AAS > **withdrawCollateral**(`to`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:355](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L355) +Defined in: [operator/src/PaymasterOperatorClient.ts:349](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L349) #### Parameters @@ -520,7 +501,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:355](https://github.com/AAS | ------ | ------ | | `to` | `` `0x${string}` `` | | `amount` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -532,14 +513,14 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:355](https://github.com/AAS > **withdrawStake**(`to`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/PaymasterOperatorClient.ts:399](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L399) +Defined in: [operator/src/PaymasterOperatorClient.ts:393](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L393) #### Parameters | Parameter | Type | | ------ | ------ | | `to` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns diff --git a/api/@aastar/operator/classes/ProtocolClient.md b/api/@aastar/operator/classes/ProtocolClient.md index d1ed7e5ab..95072dc8b 100644 --- a/api/@aastar/operator/classes/ProtocolClient.md +++ b/api/@aastar/operator/classes/ProtocolClient.md @@ -1,10 +1,10 @@ -Defined in: [operator/src/ProtocolClient.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L25) +Defined in: [operator/src/ProtocolClient.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L25) Client for Protocol Governors and Validators (Infrastructure) ## Extends -- [`BaseClient`](../../core/classes/BaseClient.md) +- [`BaseClient`](../../sdk/classes/BaseClient.md) ## Constructors @@ -12,7 +12,7 @@ Client for Protocol Governors and Validators (Infrastructure) > **new ProtocolClient**(`config`): `ProtocolClient` -Defined in: [operator/src/ProtocolClient.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L30) +Defined in: [operator/src/ProtocolClient.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L30) #### Parameters @@ -26,7 +26,7 @@ Defined in: [operator/src/ProtocolClient.ts:30](https://github.com/AAStarCommuni #### Overrides -[`BaseClient`](../../core/classes/BaseClient.md).[`constructor`](../../core/classes/BaseClient.md#constructor) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`constructor`](../../sdk/classes/BaseClient.md#constructor) ## Properties @@ -34,19 +34,19 @@ Defined in: [operator/src/ProtocolClient.ts:30](https://github.com/AAStarCommuni > `optional` **blsAggregatorAddress**: `` `0x${string}` `` -Defined in: [operator/src/ProtocolClient.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L27) +Defined in: [operator/src/ProtocolClient.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L27) *** ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/BaseClient.d.ts:5 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`client`](../../core/classes/BaseClient.md#client) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`client`](../../sdk/classes/BaseClient.md#client) *** @@ -54,7 +54,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:5 > **dvtValidatorAddress**: `` `0x${string}` `` -Defined in: [operator/src/ProtocolClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L26) +Defined in: [operator/src/ProtocolClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L26) *** @@ -66,7 +66,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:11 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`entryPointAddress`](../../core/classes/BaseClient.md#entrypointaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`entryPointAddress`](../../sdk/classes/BaseClient.md#entrypointaddress) *** @@ -78,7 +78,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:8 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenAddress`](../../core/classes/BaseClient.md#gtokenaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenAddress`](../../sdk/classes/BaseClient.md#gtokenaddress) *** @@ -90,7 +90,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:9 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`gTokenStakingAddress`](../../core/classes/BaseClient.md#gtokenstakingaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`gTokenStakingAddress`](../../sdk/classes/BaseClient.md#gtokenstakingaddress) *** @@ -102,19 +102,19 @@ Defined in: core/dist/clients/BaseClient.d.ts:10 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`paymasterFactoryAddress`](../../core/classes/BaseClient.md#paymasterfactoryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`paymasterFactoryAddress`](../../sdk/classes/BaseClient.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/BaseClient.d.ts:6 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`publicClient`](../../core/classes/BaseClient.md#publicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`publicClient`](../../sdk/classes/BaseClient.md#publicclient) *** @@ -126,7 +126,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`registryAddress`](../../core/classes/BaseClient.md#registryaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`registryAddress`](../../sdk/classes/BaseClient.md#registryaddress) *** @@ -134,7 +134,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:7 > `optional` **superPaymasterAddress**: `` `0x${string}` `` -Defined in: [operator/src/ProtocolClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L28) +Defined in: [operator/src/ProtocolClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L28) ## Methods @@ -142,7 +142,7 @@ Defined in: [operator/src/ProtocolClient.ts:28](https://github.com/AAStarCommuni > **createProposal**(`target`, `calldata`, `description`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/ProtocolClient.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L44) +Defined in: [operator/src/ProtocolClient.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L44) Create a new proposal @@ -153,7 +153,7 @@ Create a new proposal | `target` | `` `0x${string}` `` | | `calldata` | `` `0x${string}` `` | | `description` | `string` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -165,7 +165,7 @@ Create a new proposal > **executeWithProof**(`proposalId`, `signatures`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/ProtocolClient.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L78) +Defined in: [operator/src/ProtocolClient.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L78) Execute a proposal with collected signatures @@ -175,7 +175,7 @@ Execute a proposal with collected signatures | ------ | ------ | | `proposalId` | `bigint` | | `signatures` | `` `0x${string}` ``[] | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -197,13 +197,13 @@ Get the account address of the connected wallet #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getAddress`](../../core/classes/BaseClient.md#getaddress) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getAddress`](../../sdk/classes/BaseClient.md#getaddress) *** ### getStartPublicClient() -> **getStartPublicClient**(): [`PublicClient`](../../core/interfaces/PublicClient.md) \| [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> +> **getStartPublicClient**(): [`PublicClient`](../../sdk/interfaces/PublicClient.md) \| [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> Defined in: core/dist/clients/BaseClient.d.ts:20 @@ -211,11 +211,11 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor #### Returns -[`PublicClient`](../../core/interfaces/PublicClient.md) \| [`WalletClient`](../../core/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> +[`PublicClient`](../../sdk/interfaces/PublicClient.md) \| [`WalletClient`](../../sdk/interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`getStartPublicClient`](../../core/classes/BaseClient.md#getstartpublicclient) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`getStartPublicClient`](../../sdk/classes/BaseClient.md#getstartpublicclient) *** @@ -223,14 +223,14 @@ Helper to ensure public client exists or fallback to wallet client (if it suppor > **registerBLSKey**(`publicKey`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/ProtocolClient.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L101) +Defined in: [operator/src/ProtocolClient.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L101) #### Parameters | Parameter | Type | | ------ | ------ | | `publicKey` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -250,7 +250,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:25 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireEntryPoint`](../../core/classes/BaseClient.md#requireentrypoint) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireEntryPoint`](../../sdk/classes/BaseClient.md#requireentrypoint) *** @@ -266,7 +266,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:22 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGToken`](../../core/classes/BaseClient.md#requiregtoken) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGToken`](../../sdk/classes/BaseClient.md#requiregtoken) *** @@ -282,7 +282,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:23 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireGTokenStaking`](../../core/classes/BaseClient.md#requiregtokenstaking) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireGTokenStaking`](../../sdk/classes/BaseClient.md#requiregtokenstaking) *** @@ -298,7 +298,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:24 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requirePaymasterFactory`](../../core/classes/BaseClient.md#requirepaymasterfactory) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requirePaymasterFactory`](../../sdk/classes/BaseClient.md#requirepaymasterfactory) *** @@ -314,7 +314,7 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 #### Inherited from -[`BaseClient`](../../core/classes/BaseClient.md).[`requireRegistry`](../../core/classes/BaseClient.md#requireregistry) +[`BaseClient`](../../sdk/classes/BaseClient.md).[`requireRegistry`](../../sdk/classes/BaseClient.md#requireregistry) *** @@ -322,14 +322,14 @@ Defined in: core/dist/clients/BaseClient.d.ts:21 > **setProtocolFee**(`bps`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/ProtocolClient.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L123) +Defined in: [operator/src/ProtocolClient.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L123) #### Parameters | Parameter | Type | | ------ | ------ | | `bps` | `bigint` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -341,14 +341,14 @@ Defined in: [operator/src/ProtocolClient.ts:123](https://github.com/AAStarCommun > **setTreasury**(`treasury`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/ProtocolClient.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L139) +Defined in: [operator/src/ProtocolClient.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L139) #### Parameters | Parameter | Type | | ------ | ------ | | `treasury` | `` `0x${string}` `` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | #### Returns @@ -360,7 +360,7 @@ Defined in: [operator/src/ProtocolClient.ts:139](https://github.com/AAStarCommun > **signProposal**(`proposalId`, `signature`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [operator/src/ProtocolClient.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L62) +Defined in: [operator/src/ProtocolClient.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L62) #### Parameters @@ -368,7 +368,7 @@ Defined in: [operator/src/ProtocolClient.ts:62](https://github.com/AAStarCommuni | ------ | ------ | ------ | | `proposalId` | `bigint` | `undefined` | | `signature` | `` `0x${string}` `` | `'0x'` | -| `options?` | [`TransactionOptions`](../../core/interfaces/TransactionOptions.md) | `undefined` | +| `options?` | [`TransactionOptions`](../../sdk/interfaces/TransactionOptions.md) | `undefined` | #### Returns diff --git a/api/@aastar/operator/enumerations/ProposalState.md b/api/@aastar/operator/enumerations/ProposalState.md index 7d3524f77..ff4eafe98 100644 --- a/api/@aastar/operator/enumerations/ProposalState.md +++ b/api/@aastar/operator/enumerations/ProposalState.md @@ -1,4 +1,4 @@ -Defined in: [operator/src/ProtocolClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L11) +Defined in: [operator/src/ProtocolClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L11) ## Enumeration Members @@ -6,7 +6,7 @@ Defined in: [operator/src/ProtocolClient.ts:11](https://github.com/AAStarCommuni > **Active**: `1` -Defined in: [operator/src/ProtocolClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L13) +Defined in: [operator/src/ProtocolClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L13) *** @@ -14,7 +14,7 @@ Defined in: [operator/src/ProtocolClient.ts:13](https://github.com/AAStarCommuni > **Canceled**: `2` -Defined in: [operator/src/ProtocolClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L14) +Defined in: [operator/src/ProtocolClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L14) *** @@ -22,7 +22,7 @@ Defined in: [operator/src/ProtocolClient.ts:14](https://github.com/AAStarCommuni > **Defeated**: `3` -Defined in: [operator/src/ProtocolClient.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L15) +Defined in: [operator/src/ProtocolClient.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L15) *** @@ -30,7 +30,7 @@ Defined in: [operator/src/ProtocolClient.ts:15](https://github.com/AAStarCommuni > **Executed**: `7` -Defined in: [operator/src/ProtocolClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L19) +Defined in: [operator/src/ProtocolClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L19) *** @@ -38,7 +38,7 @@ Defined in: [operator/src/ProtocolClient.ts:19](https://github.com/AAStarCommuni > **Expired**: `6` -Defined in: [operator/src/ProtocolClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L18) +Defined in: [operator/src/ProtocolClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L18) *** @@ -46,7 +46,7 @@ Defined in: [operator/src/ProtocolClient.ts:18](https://github.com/AAStarCommuni > **Pending**: `0` -Defined in: [operator/src/ProtocolClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L12) +Defined in: [operator/src/ProtocolClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L12) *** @@ -54,7 +54,7 @@ Defined in: [operator/src/ProtocolClient.ts:12](https://github.com/AAStarCommuni > **Queued**: `5` -Defined in: [operator/src/ProtocolClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L17) +Defined in: [operator/src/ProtocolClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L17) *** @@ -62,4 +62,4 @@ Defined in: [operator/src/ProtocolClient.ts:17](https://github.com/AAStarCommuni > **Succeeded**: `4` -Defined in: [operator/src/ProtocolClient.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L16) +Defined in: [operator/src/ProtocolClient.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L16) diff --git a/api/@aastar/operator/interfaces/OperatorClientConfig.md b/api/@aastar/operator/interfaces/OperatorClientConfig.md index 9205561be..6ca09f668 100644 --- a/api/@aastar/operator/interfaces/OperatorClientConfig.md +++ b/api/@aastar/operator/interfaces/OperatorClientConfig.md @@ -1,16 +1,16 @@ -Defined in: [operator/src/PaymasterOperatorClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L5) +Defined in: [operator/src/PaymasterOperatorClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L5) Base configuration for all L2 Business Clients ## Extends -- [`ClientConfig`](../../core/interfaces/ClientConfig.md) +- [`ClientConfig`](../../sdk/interfaces/ClientConfig.md) ## Properties ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/types.d.ts:11 @@ -19,7 +19,7 @@ Must have an account attached. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`client`](../../core/interfaces/ClientConfig.md#client) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`client`](../../sdk/interfaces/ClientConfig.md#client) *** @@ -31,7 +31,7 @@ Defined in: core/dist/clients/types.d.ts:41 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`entryPointAddress`](../../core/interfaces/ClientConfig.md#entrypointaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`entryPointAddress`](../../sdk/interfaces/ClientConfig.md#entrypointaddress) *** @@ -43,7 +43,7 @@ Defined in: core/dist/clients/types.d.ts:40 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../core/interfaces/ClientConfig.md#ethusdpricefeedaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../sdk/interfaces/ClientConfig.md#ethusdpricefeedaddress) *** @@ -58,7 +58,7 @@ Required for operations involving token approvals and transfers. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenAddress`](../../core/interfaces/ClientConfig.md#gtokenaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenAddress`](../../sdk/interfaces/ClientConfig.md#gtokenaddress) *** @@ -73,7 +73,7 @@ Required for role registration that involves staking. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../core/interfaces/ClientConfig.md#gtokenstakingaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../sdk/interfaces/ClientConfig.md#gtokenstakingaddress) *** @@ -88,13 +88,13 @@ Required for deploying new PaymasterV4 instances. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../core/interfaces/ClientConfig.md#paymasterfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../sdk/interfaces/ClientConfig.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/types.d.ts:18 @@ -105,7 +105,7 @@ However, explicitly accepting PublicClient encourages separation. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`publicClient`](../../core/interfaces/ClientConfig.md#publicclient) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`publicClient`](../../sdk/interfaces/ClientConfig.md#publicclient) *** @@ -120,7 +120,7 @@ Essential for looking up other contracts if not provided explicitly. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`registryAddress`](../../core/interfaces/ClientConfig.md#registryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`registryAddress`](../../sdk/interfaces/ClientConfig.md#registryaddress) *** @@ -128,7 +128,7 @@ Essential for looking up other contracts if not provided explicitly. > **superPaymasterAddress**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L6) +Defined in: [operator/src/PaymasterOperatorClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L6) *** @@ -136,7 +136,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:6](https://github.com/AASta > `optional` **tokenAddress**: `` `0x${string}` `` -Defined in: [operator/src/PaymasterOperatorClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L7) +Defined in: [operator/src/PaymasterOperatorClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L7) *** @@ -148,4 +148,4 @@ Defined in: core/dist/clients/types.d.ts:39 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../core/interfaces/ClientConfig.md#xpntsfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../sdk/interfaces/ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/operator/interfaces/OperatorStatus.md b/api/@aastar/operator/interfaces/OperatorStatus.md index 52dbd1ee7..a90c8d666 100644 --- a/api/@aastar/operator/interfaces/OperatorStatus.md +++ b/api/@aastar/operator/interfaces/OperatorStatus.md @@ -1,4 +1,4 @@ -Defined in: [operator/src/OperatorLifecycle.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L6) +Defined in: [operator/src/OperatorLifecycle.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L6) ## Properties @@ -6,7 +6,7 @@ Defined in: [operator/src/OperatorLifecycle.ts:6](https://github.com/AAStarCommu > **balance**: `bigint` -Defined in: [operator/src/OperatorLifecycle.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L9) +Defined in: [operator/src/OperatorLifecycle.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L9) *** @@ -14,7 +14,7 @@ Defined in: [operator/src/OperatorLifecycle.ts:9](https://github.com/AAStarCommu > **isActive**: `boolean` -Defined in: [operator/src/OperatorLifecycle.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L8) +Defined in: [operator/src/OperatorLifecycle.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L8) *** @@ -22,4 +22,4 @@ Defined in: [operator/src/OperatorLifecycle.ts:8](https://github.com/AAStarCommu > **isConfigured**: `boolean` -Defined in: [operator/src/OperatorLifecycle.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/OperatorLifecycle.ts#L7) +Defined in: [operator/src/OperatorLifecycle.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L7) diff --git a/api/@aastar/operator/interfaces/ProtocolClientConfig.md b/api/@aastar/operator/interfaces/ProtocolClientConfig.md index c025cc6f2..65b7d967a 100644 --- a/api/@aastar/operator/interfaces/ProtocolClientConfig.md +++ b/api/@aastar/operator/interfaces/ProtocolClientConfig.md @@ -1,10 +1,10 @@ -Defined in: [operator/src/ProtocolClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L5) +Defined in: [operator/src/ProtocolClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L5) Base configuration for all L2 Business Clients ## Extends -- [`ClientConfig`](../../core/interfaces/ClientConfig.md) +- [`ClientConfig`](../../sdk/interfaces/ClientConfig.md) ## Properties @@ -12,13 +12,13 @@ Base configuration for all L2 Business Clients > `optional` **blsAggregatorAddress**: `` `0x${string}` `` -Defined in: [operator/src/ProtocolClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L7) +Defined in: [operator/src/ProtocolClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L7) *** ### client -> **client**: [`WalletClient`](../../core/interfaces/WalletClient.md) +> **client**: [`WalletClient`](../../sdk/interfaces/WalletClient.md) Defined in: core/dist/clients/types.d.ts:11 @@ -27,7 +27,7 @@ Must have an account attached. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`client`](../../core/interfaces/ClientConfig.md#client) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`client`](../../sdk/interfaces/ClientConfig.md#client) *** @@ -35,7 +35,7 @@ Must have an account attached. > **dvtValidatorAddress**: `` `0x${string}` `` -Defined in: [operator/src/ProtocolClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L6) +Defined in: [operator/src/ProtocolClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L6) *** @@ -47,7 +47,7 @@ Defined in: core/dist/clients/types.d.ts:41 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`entryPointAddress`](../../core/interfaces/ClientConfig.md#entrypointaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`entryPointAddress`](../../sdk/interfaces/ClientConfig.md#entrypointaddress) *** @@ -59,7 +59,7 @@ Defined in: core/dist/clients/types.d.ts:40 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../core/interfaces/ClientConfig.md#ethusdpricefeedaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`ethUsdPriceFeedAddress`](../../sdk/interfaces/ClientConfig.md#ethusdpricefeedaddress) *** @@ -74,7 +74,7 @@ Required for operations involving token approvals and transfers. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenAddress`](../../core/interfaces/ClientConfig.md#gtokenaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenAddress`](../../sdk/interfaces/ClientConfig.md#gtokenaddress) *** @@ -89,7 +89,7 @@ Required for role registration that involves staking. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../core/interfaces/ClientConfig.md#gtokenstakingaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`gTokenStakingAddress`](../../sdk/interfaces/ClientConfig.md#gtokenstakingaddress) *** @@ -104,13 +104,13 @@ Required for deploying new PaymasterV4 instances. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../core/interfaces/ClientConfig.md#paymasterfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`paymasterFactoryAddress`](../../sdk/interfaces/ClientConfig.md#paymasterfactoryaddress) *** ### publicClient? -> `optional` **publicClient**: [`PublicClient`](../../core/interfaces/PublicClient.md) +> `optional` **publicClient**: [`PublicClient`](../../sdk/interfaces/PublicClient.md) Defined in: core/dist/clients/types.d.ts:18 @@ -121,7 +121,7 @@ However, explicitly accepting PublicClient encourages separation. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`publicClient`](../../core/interfaces/ClientConfig.md#publicclient) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`publicClient`](../../sdk/interfaces/ClientConfig.md#publicclient) *** @@ -136,7 +136,7 @@ Essential for looking up other contracts if not provided explicitly. #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`registryAddress`](../../core/interfaces/ClientConfig.md#registryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`registryAddress`](../../sdk/interfaces/ClientConfig.md#registryaddress) *** @@ -144,7 +144,7 @@ Essential for looking up other contracts if not provided explicitly. > `optional` **superPaymasterAddress**: `` `0x${string}` `` -Defined in: [operator/src/ProtocolClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/ProtocolClient.ts#L8) +Defined in: [operator/src/ProtocolClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L8) *** @@ -156,4 +156,4 @@ Defined in: core/dist/clients/types.d.ts:39 #### Inherited from -[`ClientConfig`](../../core/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../core/interfaces/ClientConfig.md#xpntsfactoryaddress) +[`ClientConfig`](../../sdk/interfaces/ClientConfig.md).[`xpntsFactoryAddress`](../../sdk/interfaces/ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/operator/interfaces/SponsorshipPolicy.md b/api/@aastar/operator/interfaces/SponsorshipPolicy.md index e0abcf35e..46da6d597 100644 --- a/api/@aastar/operator/interfaces/SponsorshipPolicy.md +++ b/api/@aastar/operator/interfaces/SponsorshipPolicy.md @@ -1,4 +1,4 @@ -Defined in: [operator/src/PaymasterOperatorClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L10) +Defined in: [operator/src/PaymasterOperatorClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L10) ## Properties @@ -6,7 +6,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:10](https://github.com/AASt > **globalLimit**: `bigint` -Defined in: [operator/src/PaymasterOperatorClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L11) +Defined in: [operator/src/PaymasterOperatorClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L11) *** @@ -14,7 +14,7 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:11](https://github.com/AASt > **itemPrice**: `bigint` -Defined in: [operator/src/PaymasterOperatorClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L13) +Defined in: [operator/src/PaymasterOperatorClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L13) *** @@ -22,4 +22,4 @@ Defined in: [operator/src/PaymasterOperatorClient.ts:13](https://github.com/AASt > **userLimit**: `bigint` -Defined in: [operator/src/PaymasterOperatorClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/operator/src/PaymasterOperatorClient.ts#L12) +Defined in: [operator/src/PaymasterOperatorClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L12) diff --git a/api/@aastar/paymaster/classes/PaymasterClient.md b/api/@aastar/paymaster/classes/PaymasterClient.md index 81db95aab..adc3768bb 100644 --- a/api/@aastar/paymaster/classes/PaymasterClient.md +++ b/api/@aastar/paymaster/classes/PaymasterClient.md @@ -1,4 +1,4 @@ -Defined in: [V4/PaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L10) +Defined in: [V4/PaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L10) PaymasterClient Focus: Integration, Funding, Interaction. @@ -9,7 +9,7 @@ Focus: Integration, Funding, Interaction. > `static` **approveGasToken**(`wallet`, `token`, `spender`, `amount`): `Promise`\<`any`\> -Defined in: [V4/PaymasterClient.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L54) +Defined in: [V4/PaymasterClient.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L94) Approve the Paymaster (or any spender) to spend gas tokens. @@ -32,7 +32,7 @@ Approve the Paymaster (or any spender) to spend gas tokens. > `static` **depositFor**(`wallet`, `address`, `user`, `token`, `amount`): `Promise`\<`any`\> -Defined in: [V4/PaymasterClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L41) +Defined in: [V4/PaymasterClient.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L81) Deposit tokens to Paymaster for a user (enables gasless transactions). @@ -56,7 +56,7 @@ Deposit tokens to Paymaster for a user (enables gasless transactions). > `static` **encodeExecution**(`target`, `value`, `data`): `` `0x${string}` `` -Defined in: [V4/PaymasterClient.ts:488](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L488) +Defined in: [V4/PaymasterClient.ts:693](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L693) Helper: Encode a SimpleAccount execution. Wraps the inner call into: `execute(target, value, data)` @@ -80,7 +80,7 @@ This is the payload signed by the user. > `static` **encodeTokenTransfer**(`recipient`, `amount`): `` `0x${string}` `` -Defined in: [V4/PaymasterClient.ts:475](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L475) +Defined in: [V4/PaymasterClient.ts:680](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L680) Helper: Encode a standardized ERC-20 Transfer. Returns the raw function data: `transfer(to, amount)` @@ -100,9 +100,9 @@ Returns the raw function data: `transfer(to, amount)` ### estimateUserOperationGas() -> `static` **estimateUserOperationGas**(`client`, `wallet`, `aaAddress`, `entryPoint`, `paymasterAddress`, `token`, `bundlerUrl`, `callData`, `options?`): `Promise`\<\{ `callGasLimit`: `bigint`; `paymasterPostOpGasLimit`: `bigint`; `paymasterVerificationGasLimit`: `bigint` \| `undefined`; `preVerificationGas`: `bigint`; `verificationGasLimit`: `bigint`; \}\> +> `static` **estimateUserOperationGas**(`client`, `wallet`, `aaAddress`, `entryPoint`, `paymasterAddress`, `token`, `bundlerUrl`, `callData`, `options?`): `Promise`\<\{ `callGasLimit`: `bigint`; `paymasterPostOpGasLimit`: `bigint`; `paymasterVerificationGasLimit`: `bigint`; `preVerificationGas`: `bigint`; `verificationGasLimit`: `bigint`; \}\> -Defined in: [V4/PaymasterClient.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L67) +Defined in: [V4/PaymasterClient.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L107) Estimate Gas for a UserOperation. @@ -126,7 +126,7 @@ Estimate Gas for a UserOperation. #### Returns -`Promise`\<\{ `callGasLimit`: `bigint`; `paymasterPostOpGasLimit`: `bigint`; `paymasterVerificationGasLimit`: `bigint` \| `undefined`; `preVerificationGas`: `bigint`; `verificationGasLimit`: `bigint`; \}\> +`Promise`\<\{ `callGasLimit`: `bigint`; `paymasterPostOpGasLimit`: `bigint`; `paymasterVerificationGasLimit`: `bigint`; `preVerificationGas`: `bigint`; `verificationGasLimit`: `bigint`; \}\> *** @@ -134,7 +134,7 @@ Estimate Gas for a UserOperation. > `static` **getDepositedBalance**(`publicClient`, `address`, `user`, `token`): `Promise`\<`bigint`\> -Defined in: [V4/PaymasterClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L20) +Defined in: [V4/PaymasterClient.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L60) Get user's deposited balance on the Paymaster. @@ -157,7 +157,7 @@ Get user's deposited balance on the Paymaster. > `static` **getFeeFromReceipt**(`receipt`, `paymasterAddress`): \{ `actualGasCostWei`: `bigint`; `tokenCost`: `bigint`; \} \| `null` -Defined in: [V4/PaymasterClient.ts:435](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L435) +Defined in: [V4/PaymasterClient.ts:640](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L640) Helper to extract the actual Gas Token fee from a UserOperation receipt. Looks for the 'PostOpProcessed' event emitted by the Paymaster. @@ -179,7 +179,7 @@ Looks for the 'PostOpProcessed' event emitted by the Paymaster. > `static` **getTransactionFee**(`publicClient`, `txHash`, `paymasterAddress`): `Promise`\<\{ `actualGasCostWei`: `bigint`; `tokenCost`: `bigint`; \} \| `null`\> -Defined in: [V4/PaymasterClient.ts:462](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L462) +Defined in: [V4/PaymasterClient.ts:667](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L667) Get the fee for a specific transaction hash. Fetches the receipt (no scanning required) and decodes the log. @@ -202,7 +202,7 @@ Fetches the receipt (no scanning required) and decodes the log. > `static` **submitGaslessUserOperation**(`client`, `wallet`, `aaAddress`, `entryPoint`, `paymasterAddress`, `token`, `bundlerUrl`, `callData`, `options?`): `Promise`\<`` `0x${string}` ``\> -Defined in: [V4/PaymasterClient.ts:249](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L249) +Defined in: [V4/PaymasterClient.ts:309](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L309) High-level API to submit a gasless UserOperation. Automatically handles nonce fetching, gas estimation (if not provided), signing, and submission. @@ -243,7 +243,7 @@ Automatically handles nonce fetching, gas estimation (if not provided), signing, > `static` **waitForUserOperation**(`bundlerClient`, `hash`, `timeout`): `Promise`\<`any`\> -Defined in: [V4/PaymasterClient.ts:500](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterClient.ts#L500) +Defined in: [V4/PaymasterClient.ts:705](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L705) More robust version of waitForUserOperationReceipt. Catches timeouts and returns a cleaner result. @@ -254,7 +254,7 @@ Catches timeouts and returns a cleaner result. | ------ | ------ | ------ | | `bundlerClient` | `any` | `undefined` | | `hash` | `` `0x${string}` `` | `undefined` | -| `timeout` | `number` | `60000` | +| `timeout` | `number` | `180000` | #### Returns diff --git a/api/@aastar/paymaster/classes/PaymasterManager.md b/api/@aastar/paymaster/classes/PaymasterManager.md new file mode 100644 index 000000000..ee899ec35 --- /dev/null +++ b/api/@aastar/paymaster/classes/PaymasterManager.md @@ -0,0 +1,118 @@ +Defined in: [PaymasterManager.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L62) + +PaymasterManager — unifies the per-type `paymasterAndData` packers behind a +single `buildPaymasterData` entry point that AUTO-SELECTS the correct byte +format by paymaster type. + +Type resolution order: + 1. Explicit `params.type` (preferred — no guessing). + 2. Address-based lookup against the registered known-paymaster map. + +The underlying packers (`buildPaymasterData` / `buildSuperPaymasterData` in +PaymasterUtils) remain exported and are reused verbatim here — this class +does NOT reimplement byte-packing. + +## Constructors + +### Constructor + +> **new PaymasterManager**(`opts?`): `PaymasterManager` + +Defined in: [PaymasterManager.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `opts?` | \{ `knownPaymasters?`: `Record`\<`string`, [`PaymasterType`](../type-aliases/PaymasterType.md)\>; \} | +| `opts.knownPaymasters?` | `Record`\<`string`, [`PaymasterType`](../type-aliases/PaymasterType.md)\> | + +#### Returns + +`PaymasterManager` + +## Methods + +### buildPaymasterData() + +> **buildPaymasterData**(`params`): `` `0x${string}` `` + +Defined in: [PaymasterManager.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L113) + +Build `paymasterAndData`, auto-selecting the correct byte layout for the +paymaster type. Dispatches to the existing per-type packers. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`BuildPaymasterDataParams`](../interfaces/BuildPaymasterDataParams.md) | + +#### Returns + +`` `0x${string}` `` + +*** + +### registerPaymaster() + +> **registerPaymaster**(`address`, `type`): `void` + +Defined in: [PaymasterManager.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L78) + +Register a known paymaster address → type mapping so that callers can +omit the explicit `type` and have it resolved from the address. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | +| `type` | [`PaymasterType`](../type-aliases/PaymasterType.md) | + +#### Returns + +`void` + +*** + +### resolveType() + +> **resolveType**(`address`): [`PaymasterType`](../type-aliases/PaymasterType.md) \| `undefined` + +Defined in: [PaymasterManager.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L105) + +Resolve a paymaster's type from a registered address. Returns undefined +if the address is not registered. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +#### Returns + +[`PaymasterType`](../type-aliases/PaymasterType.md) \| `undefined` + +*** + +### buildPaymasterData() + +> `static` **buildPaymasterData**(`type`, `params`): `` `0x${string}` `` + +Defined in: [PaymasterManager.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L128) + +Static helper: build `paymasterAndData` for an explicit type without an +instance. Useful when the caller already knows the type. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `type` | [`PaymasterType`](../type-aliases/PaymasterType.md) | +| `params` | `Omit`\<[`BuildPaymasterDataParams`](../interfaces/BuildPaymasterDataParams.md), `"type"`\> | + +#### Returns + +`` `0x${string}` `` diff --git a/api/@aastar/paymaster/classes/PaymasterOperator.md b/api/@aastar/paymaster/classes/PaymasterOperator.md index b24337ed8..3806eb911 100644 --- a/api/@aastar/paymaster/classes/PaymasterOperator.md +++ b/api/@aastar/paymaster/classes/PaymasterOperator.md @@ -1,4 +1,4 @@ -Defined in: [V4/PaymasterOperator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L8) +Defined in: [V4/PaymasterOperator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L8) PaymasterOperator Focus: Deployment, Configuration, Maintenance, Keeper Bots. @@ -19,7 +19,7 @@ Focus: Deployment, Configuration, Maintenance, Keeper Bots. > `static` **addDeposit**(`wallet`, `address`, `amount`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L107) +Defined in: [V4/PaymasterOperator.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L107) #### Parameters @@ -39,7 +39,7 @@ Defined in: [V4/PaymasterOperator.ts:107](https://github.com/AAStarCommunity/aas > `static` **addGasToken**(`wallet`, `address`, `token`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L117) +Defined in: [V4/PaymasterOperator.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L117) #### Parameters @@ -59,7 +59,7 @@ Defined in: [V4/PaymasterOperator.ts:117](https://github.com/AAStarCommunity/aas > `static` **addStake**(`wallet`, `address`, `amount`, `unstakeDelaySec`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L96) +Defined in: [V4/PaymasterOperator.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L96) #### Parameters @@ -80,7 +80,7 @@ Defined in: [V4/PaymasterOperator.ts:96](https://github.com/AAStarCommunity/aast > `static` **checkGaslessReadiness**(`publicClient`, `entryPoint`, `paymasterAddress`, `user`, `token`): `Promise`\<[`GaslessReadinessReport`](../type-aliases/GaslessReadinessReport.md)\> -Defined in: [V4/PaymasterOperator.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L169) +Defined in: [V4/PaymasterOperator.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L169) #### Parameters @@ -102,7 +102,7 @@ Defined in: [V4/PaymasterOperator.ts:169](https://github.com/AAStarCommunity/aas > `static` **ensurePriceInitialized**(`wallet`, `publicClient`, `address`): `Promise`\<`boolean`\> -Defined in: [V4/PaymasterOperator.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L87) +Defined in: [V4/PaymasterOperator.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L87) #### Parameters @@ -122,7 +122,7 @@ Defined in: [V4/PaymasterOperator.ts:87](https://github.com/AAStarCommunity/aast > `static` **getCachedPrice**(`publicClient`, `address`): `Promise`\<\{ `price`: `bigint`; `updatedAt`: `bigint`; \}\> -Defined in: [V4/PaymasterOperator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L36) +Defined in: [V4/PaymasterOperator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L36) #### Parameters @@ -141,7 +141,7 @@ Defined in: [V4/PaymasterOperator.ts:36](https://github.com/AAStarCommunity/aast > `static` **getDepositedBalance**(`publicClient`, `address`, `user`, `token`): `Promise`\<`bigint`\> -Defined in: [V4/PaymasterOperator.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L69) +Defined in: [V4/PaymasterOperator.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L69) #### Parameters @@ -162,7 +162,7 @@ Defined in: [V4/PaymasterOperator.ts:69](https://github.com/AAStarCommunity/aast > `static` **getTokenPrice**(`publicClient`, `address`, `token`): `Promise`\<`bigint`\> -Defined in: [V4/PaymasterOperator.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L54) +Defined in: [V4/PaymasterOperator.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L54) #### Parameters @@ -182,7 +182,7 @@ Defined in: [V4/PaymasterOperator.ts:54](https://github.com/AAStarCommunity/aast > `static` **prepareGaslessEnvironment**(`operatorWallet`, `publicClient`, `entryPoint`, `paymasterAddress`, `token`, `options`): `Promise`\<`object`[]\> -Defined in: [V4/PaymasterOperator.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L229) +Defined in: [V4/PaymasterOperator.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L229) #### Parameters @@ -208,7 +208,7 @@ Defined in: [V4/PaymasterOperator.ts:229](https://github.com/AAStarCommunity/aas > `static` **removeGasToken**(`wallet`, `address`, `token`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L127) +Defined in: [V4/PaymasterOperator.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L127) #### Parameters @@ -228,7 +228,7 @@ Defined in: [V4/PaymasterOperator.ts:127](https://github.com/AAStarCommunity/aas > `static` **setMaxGasCostCap**(`wallet`, `address`, `cap`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L147) +Defined in: [V4/PaymasterOperator.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L147) #### Parameters @@ -248,7 +248,7 @@ Defined in: [V4/PaymasterOperator.ts:147](https://github.com/AAStarCommunity/aas > `static` **setServiceFeeRate**(`wallet`, `address`, `rate`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L137) +Defined in: [V4/PaymasterOperator.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L137) #### Parameters @@ -268,7 +268,7 @@ Defined in: [V4/PaymasterOperator.ts:137](https://github.com/AAStarCommunity/aas > `static` **setTokenPrice**(`wallet`, `address`, `token`, `priceUSD`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L26) +Defined in: [V4/PaymasterOperator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L26) Set the token price (in 8 decimals, e.g., 1e8 = $1 USD). @@ -291,7 +291,7 @@ Set the token price (in 8 decimals, e.g., 1e8 = $1 USD). > `static` **updatePrice**(`wallet`, `address`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L14) +Defined in: [V4/PaymasterOperator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L14) Update the cached ETH/USD price from Chainlink Oracle. Must be called if cachedPrice is 0 (uninitialized). @@ -313,7 +313,7 @@ Must be called if cachedPrice is 0 (uninitialized). > `static` **withdrawPNT**(`wallet`, `address`, `to`, `token`, `amount`): `Promise`\<`any`\> -Defined in: [V4/PaymasterOperator.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterOperator.ts#L157) +Defined in: [V4/PaymasterOperator.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L157) #### Parameters diff --git a/api/@aastar/paymaster/classes/SuperPaymasterAdminClient.md b/api/@aastar/paymaster/classes/SuperPaymasterAdminClient.md index 0e098e5f1..aca8e65c0 100644 --- a/api/@aastar/paymaster/classes/SuperPaymasterAdminClient.md +++ b/api/@aastar/paymaster/classes/SuperPaymasterAdminClient.md @@ -1,4 +1,4 @@ -Defined in: [SuperPaymaster/index.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L95) +Defined in: [SuperPaymaster/index.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L95) Admin Client for SuperPaymaster V3 @@ -8,7 +8,7 @@ Admin Client for SuperPaymaster V3 > **new SuperPaymasterAdminClient**(`client`, `paymasterAddress`): `SuperPaymasterAdminClient` -Defined in: [SuperPaymaster/index.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L99) +Defined in: [SuperPaymaster/index.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L99) #### Parameters @@ -27,7 +27,7 @@ Defined in: [SuperPaymaster/index.ts:99](https://github.com/AAStarCommunity/aast > **getOperator**(`operator`): `Promise`\<`any`\> -Defined in: [SuperPaymaster/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L104) +Defined in: [SuperPaymaster/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L104) #### Parameters @@ -43,9 +43,9 @@ Defined in: [SuperPaymaster/index.ts:104](https://github.com/AAStarCommunity/aas ### configureOperator() -> `static` **configureOperator**(`wallet`, `paymaster`, `token`, `treasury`, `exchangeRate`): `Promise`\<`any`\> +> `static` **configureOperator**(`wallet`, `paymaster`, `token`, `treasury`): `Promise`\<`any`\> -Defined in: [SuperPaymaster/index.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L113) +Defined in: [SuperPaymaster/index.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L113) #### Parameters @@ -55,7 +55,6 @@ Defined in: [SuperPaymaster/index.ts:113](https://github.com/AAStarCommunity/aas | `paymaster` | `` `0x${string}` `` | | `token` | `` `0x${string}` `` | | `treasury` | `` `0x${string}` `` | -| `exchangeRate` | `bigint` | #### Returns @@ -67,7 +66,7 @@ Defined in: [SuperPaymaster/index.ts:113](https://github.com/AAStarCommunity/aas > `static` **setAPNTsToken**(`wallet`, `paymaster`, `token`): `Promise`\<`any`\> -Defined in: [SuperPaymaster/index.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L149) +Defined in: [SuperPaymaster/index.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L148) #### Parameters @@ -87,7 +86,7 @@ Defined in: [SuperPaymaster/index.ts:149](https://github.com/AAStarCommunity/aas > `static` **setOperatorPaused**(`wallet`, `paymaster`, `operator`, `paused`): `Promise`\<`any`\> -Defined in: [SuperPaymaster/index.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L129) +Defined in: [SuperPaymaster/index.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L128) #### Parameters @@ -108,7 +107,7 @@ Defined in: [SuperPaymaster/index.ts:129](https://github.com/AAStarCommunity/aas > `static` **setXPNTsFactory**(`wallet`, `paymaster`, `factory`): `Promise`\<`any`\> -Defined in: [SuperPaymaster/index.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L159) +Defined in: [SuperPaymaster/index.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L158) #### Parameters @@ -128,7 +127,7 @@ Defined in: [SuperPaymaster/index.ts:159](https://github.com/AAStarCommunity/aas > `static` **updateReputation**(`wallet`, `paymaster`, `operator`, `score`): `Promise`\<`any`\> -Defined in: [SuperPaymaster/index.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L139) +Defined in: [SuperPaymaster/index.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L138) #### Parameters diff --git a/api/@aastar/paymaster/classes/SuperPaymasterClient.md b/api/@aastar/paymaster/classes/SuperPaymasterClient.md index 63883e37c..4dc2bb8ea 100644 --- a/api/@aastar/paymaster/classes/SuperPaymasterClient.md +++ b/api/@aastar/paymaster/classes/SuperPaymasterClient.md @@ -1,4 +1,4 @@ -Defined in: [V4/SuperPaymasterClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L20) +Defined in: [V4/SuperPaymasterClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L20) SuperPaymasterClient High-level API for SuperPaymaster operations, including dynamic gas estimation. @@ -9,7 +9,7 @@ High-level API for SuperPaymaster operations, including dynamic gas estimation. > `static` **submitGaslessTransaction**(`client`, `wallet`, `aaAddress`, `entryPoint`, `bundlerUrl`, `config`): `Promise`\<`` `0x${string}` ``\> -Defined in: [V4/SuperPaymasterClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L32) +Defined in: [V4/SuperPaymasterClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L32) Submit a gasless transaction using SuperPaymaster. Automatically handles gas estimation with a smart efficiency buffer. diff --git a/api/@aastar/paymaster/functions/buildPaymasterData.md b/api/@aastar/paymaster/functions/buildPaymasterData.md index 5cc9ad35b..b33c1dcfe 100644 --- a/api/@aastar/paymaster/functions/buildPaymasterData.md +++ b/api/@aastar/paymaster/functions/buildPaymasterData.md @@ -1,6 +1,6 @@ > **buildPaymasterData**(`paymasterAddress`, `token`, `options?`): `` `0x${string}` `` -Defined in: [V4/PaymasterUtils.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L58) +Defined in: [V4/PaymasterUtils.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L58) Build paymasterAndData for gasless UserOperation. Layout: [Paymaster(20)] [VerificationGasLimit(16)] [PostOpGasLimit(16)] [Token(20)] [ValidUntil(6)] [ValidAfter(6)] diff --git a/api/@aastar/paymaster/functions/buildSuperPaymasterData.md b/api/@aastar/paymaster/functions/buildSuperPaymasterData.md index 88aeebaa6..ca52f0ff5 100644 --- a/api/@aastar/paymaster/functions/buildSuperPaymasterData.md +++ b/api/@aastar/paymaster/functions/buildSuperPaymasterData.md @@ -1,6 +1,6 @@ > **buildSuperPaymasterData**(`paymasterAddress`, `operator`, `options?`): `` `0x${string}` `` -Defined in: [V4/PaymasterUtils.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L94) +Defined in: [V4/PaymasterUtils.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L94) Build paymasterAndData for SuperPaymaster V3. Layout: [Paymaster(20)] [verGas(16)] [postGas(16)] [operator(20)] [maxRate(32)] diff --git a/api/@aastar/paymaster/functions/checkEligibility.md b/api/@aastar/paymaster/functions/checkEligibility.md index a298e266b..ad7979490 100644 --- a/api/@aastar/paymaster/functions/checkEligibility.md +++ b/api/@aastar/paymaster/functions/checkEligibility.md @@ -1,6 +1,6 @@ > **checkEligibility**(`client`, `paymaster`, `user`, `operator`): `Promise`\<\{ `credit?`: `bigint`; `eligible`: `boolean`; `token?`: `` `0x${string}` ``; \}\> -Defined in: [SuperPaymaster/index.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L49) +Defined in: [SuperPaymaster/index.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L49) Enhanced eligibility check for SuperPaymaster V3. Validates that user has sufficient credit with the given operator. diff --git a/api/@aastar/paymaster/functions/formatUserOpV07.md b/api/@aastar/paymaster/functions/formatUserOpV07.md index 9172cd0fd..f683eae35 100644 --- a/api/@aastar/paymaster/functions/formatUserOpV07.md +++ b/api/@aastar/paymaster/functions/formatUserOpV07.md @@ -1,6 +1,6 @@ > **formatUserOpV07**(`userOp`): `any` -Defined in: [V4/PaymasterUtils.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L119) +Defined in: [V4/PaymasterUtils.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L119) Helper to format UserOp for Alchemy/Standard Bundlers (v0.7 Decomposed) diff --git a/api/@aastar/paymaster/functions/getPaymasterV4Middleware.md b/api/@aastar/paymaster/functions/getPaymasterV4Middleware.md index edf4476aa..a64eb2a62 100644 --- a/api/@aastar/paymaster/functions/getPaymasterV4Middleware.md +++ b/api/@aastar/paymaster/functions/getPaymasterV4Middleware.md @@ -1,6 +1,6 @@ > **getPaymasterV4Middleware**(`config`): `object` -Defined in: [V4/PaymasterUtils.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L31) +Defined in: [V4/PaymasterUtils.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L31) Constructs the middleware for Paymaster V4. Returns the `paymasterAndData` hex string. diff --git a/api/@aastar/paymaster/functions/getSuperPaymasterMiddleware.md b/api/@aastar/paymaster/functions/getSuperPaymasterMiddleware.md index 403e344a6..13eaf9035 100644 --- a/api/@aastar/paymaster/functions/getSuperPaymasterMiddleware.md +++ b/api/@aastar/paymaster/functions/getSuperPaymasterMiddleware.md @@ -1,6 +1,6 @@ > **getSuperPaymasterMiddleware**(`config`): `object` -Defined in: [SuperPaymaster/index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L19) +Defined in: [SuperPaymaster/index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L19) Constructs the middleware for SuperPaymaster. Returns the `paymasterAndData` hex string. diff --git a/api/@aastar/paymaster/functions/getUserOpHashV07.md b/api/@aastar/paymaster/functions/getUserOpHashV07.md index d41f99fae..0c43b6e87 100644 --- a/api/@aastar/paymaster/functions/getUserOpHashV07.md +++ b/api/@aastar/paymaster/functions/getUserOpHashV07.md @@ -1,6 +1,6 @@ > **getUserOpHashV07**(`userOp`, `entryPoint`, `chainId`): `` `0x${string}` `` -Defined in: [V4/PaymasterUtils.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L169) +Defined in: [V4/PaymasterUtils.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L169) ## Parameters diff --git a/api/@aastar/paymaster/functions/tuneGasLimit.md b/api/@aastar/paymaster/functions/tuneGasLimit.md index a3b1be8d7..cd23ab6b8 100644 --- a/api/@aastar/paymaster/functions/tuneGasLimit.md +++ b/api/@aastar/paymaster/functions/tuneGasLimit.md @@ -1,6 +1,6 @@ > **tuneGasLimit**(`estimate`, `nominalActual`, `targetEfficiency`): `bigint` -Defined in: [V4/PaymasterUtils.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L193) +Defined in: [V4/PaymasterUtils.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L193) Tune gas limit using a dynamic nominal ceiling to satisfy Bundler efficiency (0.4) Target: Actual / Limit >= targetEfficiency diff --git a/api/@aastar/paymaster/index.md b/api/@aastar/paymaster/index.md index 49d8d8ff7..9da6cd24f 100644 --- a/api/@aastar/paymaster/index.md +++ b/api/@aastar/paymaster/index.md @@ -1,15 +1,21 @@ ## Classes - [PaymasterClient](classes/PaymasterClient.md) +- [PaymasterManager](classes/PaymasterManager.md) - [PaymasterOperator](classes/PaymasterOperator.md) - [SuperPaymasterAdminClient](classes/SuperPaymasterAdminClient.md) - [SuperPaymasterClient](classes/SuperPaymasterClient.md) +## Interfaces + +- [BuildPaymasterDataParams](interfaces/BuildPaymasterDataParams.md) + ## Type Aliases - [GaslessReadinessReport](type-aliases/GaslessReadinessReport.md) - [GaslessTransactionConfig](type-aliases/GaslessTransactionConfig.md) - [PaymasterConfig](type-aliases/PaymasterConfig.md) +- [PaymasterType](type-aliases/PaymasterType.md) - [PaymasterV4MiddlewareConfig](type-aliases/PaymasterV4MiddlewareConfig.md) ## Functions diff --git a/api/@aastar/paymaster/interfaces/BuildPaymasterDataParams.md b/api/@aastar/paymaster/interfaces/BuildPaymasterDataParams.md new file mode 100644 index 000000000..176b39816 --- /dev/null +++ b/api/@aastar/paymaster/interfaces/BuildPaymasterDataParams.md @@ -0,0 +1,90 @@ +Defined in: [PaymasterManager.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L22) + +Unified parameters for building `paymasterAndData`. + +The byte layout differs by paymaster type; this shape carries the union of +both packers' inputs. `buildPaymasterData` validates that the fields required +for the resolved type are present, and dispatches to the correct existing +packer. Callers no longer need to know which format a given paymaster uses. + +## Properties + +### maxRate? + +> `optional` **maxRate**: `bigint` + +Defined in: [PaymasterManager.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L46) + +Optional max rate commitment (rug-pull protection). 'super' only. + +*** + +### operator? + +> `optional` **operator**: `` `0x${string}` `` + +Defined in: [PaymasterManager.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L44) + +Operator address. Required for type 'super'. + +*** + +### paymasterAddress + +> **paymasterAddress**: `` `0x${string}` `` + +Defined in: [PaymasterManager.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L30) + +Paymaster contract address (first 20 bytes of the layout). + +*** + +### postOpGasLimit? + +> `optional` **postOpGasLimit**: `bigint` + +Defined in: [PaymasterManager.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L34) + +Paymaster postOp gas limit (16-byte field, both layouts). + +*** + +### token? + +> `optional` **token**: `` `0x${string}` `` + +Defined in: [PaymasterManager.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L38) + +Gas token address. Required for type 'v4'. + +*** + +### type? + +> `optional` **type**: [`PaymasterType`](../type-aliases/PaymasterType.md) + +Defined in: [PaymasterManager.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L28) + +Explicit paymaster type. Preferred over address-based heuristics. +If omitted, the type is resolved from `paymasterAddress` against the +manager's registered known-paymaster map (throws if unresolved). + +*** + +### validityWindow? + +> `optional` **validityWindow**: `number` + +Defined in: [PaymasterManager.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L40) + +Validity window in seconds (used to compute validUntil/validAfter). 'v4' only. + +*** + +### verificationGasLimit? + +> `optional` **verificationGasLimit**: `bigint` + +Defined in: [PaymasterManager.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L32) + +Paymaster verification gas limit (16-byte field, both layouts). diff --git a/api/@aastar/paymaster/type-aliases/GaslessReadinessReport.md b/api/@aastar/paymaster/type-aliases/GaslessReadinessReport.md index aaa07c3f1..e4022177b 100644 --- a/api/@aastar/paymaster/type-aliases/GaslessReadinessReport.md +++ b/api/@aastar/paymaster/type-aliases/GaslessReadinessReport.md @@ -1,6 +1,6 @@ > **GaslessReadinessReport** = `object` -Defined in: [V4/PaymasterUtils.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L10) +Defined in: [V4/PaymasterUtils.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L10) ## Properties @@ -8,7 +8,7 @@ Defined in: [V4/PaymasterUtils.ts:10](https://github.com/AAStarCommunity/aastar- > **details**: `object` -Defined in: [V4/PaymasterUtils.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L13) +Defined in: [V4/PaymasterUtils.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L13) #### ethUsdPrice @@ -44,7 +44,7 @@ Defined in: [V4/PaymasterUtils.ts:13](https://github.com/AAStarCommunity/aastar- > **isReady**: `boolean` -Defined in: [V4/PaymasterUtils.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L11) +Defined in: [V4/PaymasterUtils.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L11) *** @@ -52,4 +52,4 @@ Defined in: [V4/PaymasterUtils.ts:11](https://github.com/AAStarCommunity/aastar- > **issues**: `string`[] -Defined in: [V4/PaymasterUtils.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L12) +Defined in: [V4/PaymasterUtils.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L12) diff --git a/api/@aastar/paymaster/type-aliases/GaslessTransactionConfig.md b/api/@aastar/paymaster/type-aliases/GaslessTransactionConfig.md index 7592b1723..c9b163737 100644 --- a/api/@aastar/paymaster/type-aliases/GaslessTransactionConfig.md +++ b/api/@aastar/paymaster/type-aliases/GaslessTransactionConfig.md @@ -1,6 +1,6 @@ > **GaslessTransactionConfig** = `object` -Defined in: [V4/SuperPaymasterClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L6) +Defined in: [V4/SuperPaymasterClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L6) ## Properties @@ -8,7 +8,7 @@ Defined in: [V4/SuperPaymasterClient.ts:6](https://github.com/AAStarCommunity/aa > **amount**: `bigint` -Defined in: [V4/SuperPaymasterClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L9) +Defined in: [V4/SuperPaymasterClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L9) *** @@ -16,7 +16,7 @@ Defined in: [V4/SuperPaymasterClient.ts:9](https://github.com/AAStarCommunity/aa > `optional` **factory**: `Address` -Defined in: [V4/SuperPaymasterClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L12) +Defined in: [V4/SuperPaymasterClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L12) *** @@ -24,7 +24,7 @@ Defined in: [V4/SuperPaymasterClient.ts:12](https://github.com/AAStarCommunity/a > `optional` **factoryData**: [`Hex`](https://viem.sh/docs/index.html) -Defined in: [V4/SuperPaymasterClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L13) +Defined in: [V4/SuperPaymasterClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L13) *** @@ -32,7 +32,7 @@ Defined in: [V4/SuperPaymasterClient.ts:13](https://github.com/AAStarCommunity/a > **operator**: `Address` -Defined in: [V4/SuperPaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L10) +Defined in: [V4/SuperPaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L10) *** @@ -40,7 +40,7 @@ Defined in: [V4/SuperPaymasterClient.ts:10](https://github.com/AAStarCommunity/a > **paymasterAddress**: `Address` -Defined in: [V4/SuperPaymasterClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L11) +Defined in: [V4/SuperPaymasterClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L11) *** @@ -48,7 +48,7 @@ Defined in: [V4/SuperPaymasterClient.ts:11](https://github.com/AAStarCommunity/a > **recipient**: `Address` -Defined in: [V4/SuperPaymasterClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L8) +Defined in: [V4/SuperPaymasterClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L8) *** @@ -56,4 +56,4 @@ Defined in: [V4/SuperPaymasterClient.ts:8](https://github.com/AAStarCommunity/aa > **token**: `Address` -Defined in: [V4/SuperPaymasterClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/SuperPaymasterClient.ts#L7) +Defined in: [V4/SuperPaymasterClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L7) diff --git a/api/@aastar/paymaster/type-aliases/PaymasterConfig.md b/api/@aastar/paymaster/type-aliases/PaymasterConfig.md index 79602ac51..520791f61 100644 --- a/api/@aastar/paymaster/type-aliases/PaymasterConfig.md +++ b/api/@aastar/paymaster/type-aliases/PaymasterConfig.md @@ -1,6 +1,6 @@ > **PaymasterConfig** = `object` -Defined in: [SuperPaymaster/index.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L4) +Defined in: [SuperPaymaster/index.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L4) ## Properties @@ -8,7 +8,7 @@ Defined in: [SuperPaymaster/index.ts:4](https://github.com/AAStarCommunity/aasta > `optional` **maxRate**: `bigint` -Defined in: [SuperPaymaster/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L7) +Defined in: [SuperPaymaster/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L7) *** @@ -16,7 +16,7 @@ Defined in: [SuperPaymaster/index.ts:7](https://github.com/AAStarCommunity/aasta > **operator**: `Address` -Defined in: [SuperPaymaster/index.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L6) +Defined in: [SuperPaymaster/index.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L6) *** @@ -24,7 +24,7 @@ Defined in: [SuperPaymaster/index.ts:6](https://github.com/AAStarCommunity/aasta > **paymasterAddress**: `Address` -Defined in: [SuperPaymaster/index.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L5) +Defined in: [SuperPaymaster/index.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L5) *** @@ -32,7 +32,7 @@ Defined in: [SuperPaymaster/index.ts:5](https://github.com/AAStarCommunity/aasta > `optional` **postOpGasLimit**: `bigint` -Defined in: [SuperPaymaster/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L9) +Defined in: [SuperPaymaster/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L9) *** @@ -40,4 +40,4 @@ Defined in: [SuperPaymaster/index.ts:9](https://github.com/AAStarCommunity/aasta > `optional` **verificationGasLimit**: `bigint` -Defined in: [SuperPaymaster/index.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/SuperPaymaster/index.ts#L8) +Defined in: [SuperPaymaster/index.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L8) diff --git a/api/@aastar/paymaster/type-aliases/PaymasterType.md b/api/@aastar/paymaster/type-aliases/PaymasterType.md new file mode 100644 index 000000000..566aeba4a --- /dev/null +++ b/api/@aastar/paymaster/type-aliases/PaymasterType.md @@ -0,0 +1,7 @@ +> **PaymasterType** = `"v4"` \| `"super"` + +Defined in: [PaymasterManager.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L12) + +Supported paymaster types. +- 'v4' → PaymasterV4 layout (84 bytes): [paymaster(20)][verGas(16)][postGas(16)][token(20)][validUntil(6)][validAfter(6)] +- 'super' → SuperPaymaster layout (104 bytes): [paymaster(20)][verGas(16)][postGas(16)][operator(20)][maxRate(32)] diff --git a/api/@aastar/paymaster/type-aliases/PaymasterV4MiddlewareConfig.md b/api/@aastar/paymaster/type-aliases/PaymasterV4MiddlewareConfig.md index 3e5c06540..01565240f 100644 --- a/api/@aastar/paymaster/type-aliases/PaymasterV4MiddlewareConfig.md +++ b/api/@aastar/paymaster/type-aliases/PaymasterV4MiddlewareConfig.md @@ -1,6 +1,6 @@ > **PaymasterV4MiddlewareConfig** = `object` -Defined in: [V4/PaymasterUtils.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L3) +Defined in: [V4/PaymasterUtils.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L3) ## Properties @@ -8,7 +8,7 @@ Defined in: [V4/PaymasterUtils.ts:3](https://github.com/AAStarCommunity/aastar-s > **gasToken**: `Address` -Defined in: [V4/PaymasterUtils.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L5) +Defined in: [V4/PaymasterUtils.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L5) *** @@ -16,7 +16,7 @@ Defined in: [V4/PaymasterUtils.ts:5](https://github.com/AAStarCommunity/aastar-s > **paymasterAddress**: `Address` -Defined in: [V4/PaymasterUtils.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L4) +Defined in: [V4/PaymasterUtils.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L4) *** @@ -24,7 +24,7 @@ Defined in: [V4/PaymasterUtils.ts:4](https://github.com/AAStarCommunity/aastar-s > `optional` **postOpGasLimit**: `bigint` -Defined in: [V4/PaymasterUtils.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L7) +Defined in: [V4/PaymasterUtils.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L7) *** @@ -32,4 +32,4 @@ Defined in: [V4/PaymasterUtils.ts:7](https://github.com/AAStarCommunity/aastar-s > `optional` **verificationGasLimit**: `bigint` -Defined in: [V4/PaymasterUtils.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/paymaster/src/V4/PaymasterUtils.ts#L6) +Defined in: [V4/PaymasterUtils.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L6) diff --git a/api/@aastar/sdk.md b/api/@aastar/sdk.md index 4a8c6f575..da483e5e2 100644 --- a/api/@aastar/sdk.md +++ b/api/@aastar/sdk.md @@ -4,7 +4,7 @@ The ultimate TypeScript SDK for the AAstar Protocol - a decentralized, community AAstar 协议的终极 TypeScript SDK —— 构建去中心化、社区驱动的账户抽象生态系统。 [![npm version](https://img.shields.io/npm/v/@aastar/sdk.svg)](https://www.npmjs.com/package/@aastar/sdk) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) --- @@ -14,18 +14,36 @@ AAstar SDK provides a complete suite of tools to interact with the AAstar Protoc AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采用了 **"先检查,后执行"** 的设计理念,帮助开发者构建低错误率、健壮的去中心化应用。 -### Core Modules | 核心模块 - -- **[`@aastar/community`](https://docs.aastar.io/api/@aastar/community)**: Launch & manage DAOs. (启动和管理 DAO) -- **[`@aastar/operator`](https://docs.aastar.io/api/@aastar/operator)**: Run Paymasters & earn rewards. (运行 Paymaster 并赚取收益) -- **[`@aastar/enduser`](https://docs.aastar.io/api/@aastar/enduser)**: Join communities & enjoy gasless txs. (加入社区并享受免 Gas 交易) -- **[`@aastar/analytics`](https://docs.aastar.io/api/@aastar/analytics)**: Monitor ecosystem data. (监控生态系统数据) -- **[`@aastar/tokens`](https://docs.aastar.io/api/@aastar/tokens)**: GToken & XPNTs finance tools. (GToken 和 XPNTs 金融工具) -- **[`@aastar/identity`](https://docs.aastar.io/api/@aastar/identity)**: Reputation & SBT management. (声誉和 SBT 管理) -- **[`@aastar/account`](https://docs.aastar.io/api/@aastar/account)**: Smart Account (ERC-4337) utilities. (智能账户工具) -- **[`@aastar/core`](https://docs.aastar.io/api/@aastar/core)**: Shared logic, Roles, and configuration. (共享逻辑、角色和配置) -- **[`@aastar/paymaster`](https://docs.aastar.io/api/@aastar/paymaster)**: Low-level Paymaster interactions. (低层级 Paymaster 交互) -- **[`@aastar/dapp`](https://docs.aastar.io/api/@aastar/dapp)**: Pre-built UI components and React hooks. (预建 UI 组件和 React hooks) +> **📦 Single-package since v0.20.x | 自 v0.20.x 起单包发布** +> Everything ships in ONE package — `@aastar/sdk` — with **subpath exports** that preserve the +> original module structure. The legacy split packages (`@aastar/core`, `@aastar/account`, +> `@aastar/paymaster`, `@aastar/identity`, `@aastar/tokens`, `@aastar/dapp`, `@aastar/x402`, +> `@aastar/channel`, `@aastar/enduser`, `@aastar/operator`, `@aastar/admin`, `@aastar/airaccount`) +> are **deprecated on npm** and now live as subpaths of `@aastar/sdk`. +> 所有能力合并到 **一个包** `@aastar/sdk`,通过 **子路径导出** 保留原有模块结构;上述老的分包已在 npm 上标记弃用。 + +### Modules (now subpaths) | 模块(现为子路径) + +| Import | Functionality (功能) | +|---|---| +| `@aastar/sdk` | Umbrella: re-exports everything + role-based client factories (总入口 + 角色客户端) | +| `@aastar/sdk/core` | Shared logic, Roles, ABIs, **per-chain addresses** (共享逻辑、角色、ABI、多链地址) | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities (智能账户工具) | +| `@aastar/sdk/paymaster` | SuperPaymaster middleware, gas sponsorship (代付中间件) | +| `@aastar/sdk/identity` | Reputation, SBT, credit limits (声誉、SBT、信用额度) | +| `@aastar/sdk/tokens` | GToken & xPNTs finance tools (代币金融工具) | +| `@aastar/sdk/dapp` | React components & hooks — **requires `react` peer dep** (React 组件与 hooks) | +| `@aastar/sdk/x402` | x402 settlement (x402 结算) | +| `@aastar/sdk/channel` | Micro-payment channels (微支付通道) | +| `@aastar/sdk/enduser` · `/operator` · `/admin` | Role lifecycle workflows (角色生命周期) | +| `@aastar/sdk/kms` | KMS WebAuthn passkeys, BLS aggregate signatures, tiered ERC-4337 accounts (Passkey + BLS + 分层签名) | + +> 🔄 The `@aastar/sdk/airaccount` subpath is **deprecated** — it still works as an alias of `@aastar/sdk/kms` for one release. Please migrate to `@aastar/sdk/kms`. +> `@aastar/sdk/airaccount` 子路径已**废弃**,作为 `@aastar/sdk/kms` 的别名再保留一个版本,请尽快迁移到 `@aastar/sdk/kms`。 + +> ⚠️ **`react` / `react-dom` are optional peer deps.** They're only needed for the `@aastar/sdk/dapp` +> subpath. The root `import '@aastar/sdk'` and all non-UI subpaths work in Node/server with no React. +> React 是可选 peer 依赖,仅 `@aastar/sdk/dapp` 需要;root 及其它子路径在 Node/服务端无需 React。 --- @@ -35,10 +53,72 @@ AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采 pnpm add @aastar/sdk viem # or npm install @aastar/sdk viem + +# Only if you use the React UI subpath (@aastar/sdk/dapp): +pnpm add react react-dom +``` + +> You only need `@aastar/sdk` + `viem` — all transitive deps install automatically. KMS / WebAuthn / BLS features are bundled in — no separate install. Import them from `@aastar/sdk/kms`. +> 只需安装 `@aastar/sdk` + `viem`,其余依赖自动带入。KMS / WebAuthn / BLS 能力已内置,无需单独安装,从 `@aastar/sdk/kms` 导入即可。 + +### Importing | 导入方式 + +```typescript +// Everything from the root barrel (no React pulled in): +import { createEndUserClient, createOperatorClient, CANONICAL_ADDRESSES } from '@aastar/sdk'; + +// …or cherry-pick from a subpath to keep bundles lean: +import { registryActions } from '@aastar/sdk/core'; +import { KmsManager, P256PasskeySigner } from '@aastar/sdk/kms'; +import { useGasless } from '@aastar/sdk/dapp'; // requires react ``` --- +## 🌐 Multi-chain | 多链配置 + +**Switching chains is seamless — just pass a viem `chain`.** Contract addresses are auto-resolved +from `chain.id`, so you never hardcode addresses or memorize chainIds. Use the exact chain objects +from `viem/chains`. +切链是无感的——**只需传入一个 viem `chain`**,合约地址会根据 `chain.id` 自动解析,无需手写地址、无需记 chainId。直接用 `viem/chains` 里的链对象即可。 + +| Network | viem chain | chainId | Status | +|---|---|---|---| +| Optimism (mainnet) | `optimism` | `10` | ✅ deployed | +| Sepolia (testnet) | `sepolia` | `11155111` | ✅ deployed (primary test target) | +| OP Sepolia (testnet) | `optimismSepolia` | `11155420` | ✅ deployed | +| Ethereum mainnet | `mainnet` | `1` | ⏳ not yet deployed | + +```typescript +import { createEndUserClient } from '@aastar/sdk'; +import { sepolia, optimism } from 'viem/chains'; +import { http } from 'viem'; + +// Sepolia testnet — addresses auto-resolved from sepolia.id +const test = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), +}); + +// Optimism mainnet — same code, just swap chain + transport +const prod = createEndUserClient({ + chain: optimism, + transport: http('https://mainnet.optimism.io'), +}); +``` + +- **Unsupported chain?** If you pass a chain that has no deployment yet (e.g. `mainnet`) and no + explicit `addresses`, the factory throws a clear error naming the supported chains — no silent + misconfiguration. +- **Custom / private deployment?** Override per-call with `addresses: { ... }` (or `CANONICAL_ADDRESSES[chainId]` + to start from a known set); the explicit value always wins over auto-resolution. +- 未部署的链(如 `mainnet`)且未显式传 `addresses` 时,工厂会抛出列明受支持链的清晰报错;自定义部署可通过 `addresses` 覆盖,显式值优先。 + +Helpers for RPC URLs and explorer links live in `@aastar/sdk` too: +`getNetwork(name)`, `getRpcUrl(name)`, `getChainId(name)`, `getTxUrl(name, hash)`, `getAddressUrl(name, addr)`. + +--- + ## 📚 Documentation | 文档导航 - **Docs Home**: https://docs.aastar.io/ @@ -57,17 +137,26 @@ npm install @aastar/sdk viem ### 1. Initialize Client | 初始化客户端 ```typescript -import { createPublicClient, createWalletClient, http } from 'viem'; +import { http } from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; import { sepolia } from 'viem/chains'; -import { CommunityClient, OperatorClient } from '@aastar/sdk'; +import { createEndUserClient, createOperatorClient } from '@aastar/sdk'; + +const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`); -// 1. Setup VIEM clients -const publicClient = createPublicClient({ chain: sepolia, transport: http() }); -const walletClient = createWalletClient({ chain: sepolia, transport: http() }); +// Role-based clients compose viem action factories under the hood. +// Addresses auto-resolve from chain.id — no `addresses` needed for supported chains. +const enduser = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); -// 2. Initialize AAstar Clients -const communityClient = new CommunityClient(publicClient, walletClient); -const operatorClient = new OperatorClient(publicClient, walletClient); +const operator = createOperatorClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); ``` ### 2. "Pre-check" Pattern | "预检查" 模式 @@ -143,16 +232,20 @@ AAstar SDK is built on top of **viem**, ensuring lightweight and type-safe inter AAstar SDK 基于 **viem** 构建,确保轻量级和类型安全的交互。它将复杂的合约逻辑抽象为直观的业务原语。 -| Package | Functionality (功能) | +All capabilities are bundled into `@aastar/sdk`; the table below maps each former package to its subpath. +所有能力已打包进 `@aastar/sdk`,下表对应每个旧分包现在的子路径。 + +| Subpath | Functionality (功能) | |---------|---------------------| -| `@aastar/core` | Shared logic, Roles, RequirementChecker | -| `@aastar/community` | DAO Registry, XPNTs issuance | -| `@aastar/operator` | Paymaster ops, Staking management | -| `@aastar/enduser` | User onboarding, SBT minting | -| `@aastar/tokens` | Finance, Tokenomics, Approval flows | -| `@aastar/identity` | Reputation, Credit limits, ZK Proofs | -| `@aastar/paymaster` | EntryPoint & Paymaster low-level API | -| `@aastar/dapp` | React Components & Integration Hooks | +| `@aastar/sdk/core` | Shared logic, Roles, RequirementChecker, per-chain addresses | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities | +| `@aastar/sdk/operator` | Paymaster ops, Staking management | +| `@aastar/sdk/enduser` | User onboarding, SBT minting | +| `@aastar/sdk/tokens` | Finance, Tokenomics, Approval flows | +| `@aastar/sdk/identity` | Reputation, Credit limits, ZK Proofs | +| `@aastar/sdk/paymaster` | EntryPoint & Paymaster low-level API | +| `@aastar/sdk/dapp` | React Components & Integration Hooks (needs `react`) | +| `@aastar/sdk/kms` | KMS WebAuthn, BLS Signatures, ERC-4337 Tiered Accounts (`/airaccount` = deprecated alias) | --- @@ -184,6 +277,6 @@ We welcome contributions! Please see our Contributing Guide for details. --- -

+<p align="center"> Built with ❤️ by the AAstar Community -

+</p> diff --git a/api/@aastar/sdk/classes/BLSSigner.md b/api/@aastar/sdk/classes/BLSSigner.md new file mode 100644 index 000000000..5ff9c60e3 --- /dev/null +++ b/api/@aastar/sdk/classes/BLSSigner.md @@ -0,0 +1,129 @@ +Defined in: [packages/core/src/crypto/blsSigner.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L9) + +BLS Signer for Registry reputation updates and DVT operations + +Uses BLS12-381 curve for signature aggregation + +## Constructors + +### Constructor + +> **new BLSSigner**(`privateKeyHex`): `BLSSigner` + +Defined in: [packages/core/src/crypto/blsSigner.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `privateKeyHex` | `` `0x${string}` `` | + +#### Returns + +`BLSSigner` + +## Methods + +### getPublicKey() + +> **getPublicKey**(): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/blsSigner.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L31) + +Get BLS public key + +#### Returns + +`` `0x${string}` `` + +Public key as hex string + +*** + +### sign() + +> **sign**(`message`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/blsSigner.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L21) + +Sign a message with BLS private key + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `message` | `` `0x${string}` `` | Message hash to sign | + +#### Returns + +`` `0x${string}` `` + +BLS signature as hex string + +*** + +### aggregatePublicKeys() + +> `static` **aggregatePublicKeys**(`pubKeys`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/blsSigner.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L52) + +Aggregate multiple BLS public keys + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pubKeys` | `` `0x${string}` ``[] | Array of BLS public keys | + +#### Returns + +`` `0x${string}` `` + +Aggregated public key (uncompressed G1 - 96 bytes for EVM) + +*** + +### aggregateSignatures() + +> `static` **aggregateSignatures**(`signatures`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/blsSigner.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L41) + +Aggregate multiple BLS signatures + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `signatures` | `` `0x${string}` ``[] | Array of BLS signatures | + +#### Returns + +`` `0x${string}` `` + +Aggregated signature + +*** + +### verify() + +> `static` **verify**(`message`, `signature`, `publicKey`): `boolean` + +Defined in: [packages/core/src/crypto/blsSigner.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L65) + +Verify a BLS signature + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `message` | `` `0x${string}` `` | Message hash | +| `signature` | `` `0x${string}` `` | BLS signature | +| `publicKey` | `` `0x${string}` `` | BLS public key | + +#### Returns + +`boolean` + +True if signature is valid diff --git a/api/@aastar/sdk/classes/BaseClient.md b/api/@aastar/sdk/classes/BaseClient.md new file mode 100644 index 000000000..210e24626 --- /dev/null +++ b/api/@aastar/sdk/classes/BaseClient.md @@ -0,0 +1,178 @@ +Defined in: [packages/core/src/clients/BaseClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L5) + +## Extended by + +- [`UserClient`](UserClient.md) +- [`CommunityClient`](CommunityClient.md) +- [`UserLifecycle`](UserLifecycle.md) +- [`PaymasterOperatorClient`](PaymasterOperatorClient.md) +- [`ProtocolClient`](ProtocolClient.md) +- [`ProtocolGovernance`](ProtocolGovernance.md) +- [`CommunityClient`](../../enduser/classes/CommunityClient.md) +- [`UserClient`](../../enduser/classes/UserClient.md) +- [`UserLifecycle`](../../enduser/classes/UserLifecycle.md) +- [`PaymasterOperatorClient`](../../operator/classes/PaymasterOperatorClient.md) +- [`ProtocolClient`](../../operator/classes/ProtocolClient.md) +- [`ProtocolGovernance`](../../admin/classes/ProtocolGovernance.md) + +## Constructors + +### Constructor + +> **new BaseClient**(`config`): `BaseClient` + +Defined in: [packages/core/src/clients/BaseClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ClientConfig`](../interfaces/ClientConfig.md) | + +#### Returns + +`BaseClient` + +## Properties + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +*** + +### entryPointAddress? + +> `protected` `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L12) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +*** + +### registryAddress? + +> `protected` `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L8) + +## Methods + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/classes/BundlerClient.md b/api/@aastar/sdk/classes/BundlerClient.md new file mode 100644 index 000000000..33c07d8ff --- /dev/null +++ b/api/@aastar/sdk/classes/BundlerClient.md @@ -0,0 +1,119 @@ +Defined in: [packages/core/src/clients/BundlerClient.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L31) + +BundlerClient +Low-level JSON-RPC client for ERC-4337 Bundlers. + +## Constructors + +### Constructor + +> **new BundlerClient**(`url`, `entryPoint`): `BundlerClient` + +Defined in: [packages/core/src/clients/BundlerClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `url` | `string` | +| `entryPoint` | `` `0x${string}` `` | + +#### Returns + +`BundlerClient` + +## Properties + +### entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L34) + +*** + +### url + +> `readonly` **url**: `string` + +Defined in: [packages/core/src/clients/BundlerClient.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L33) + +## Methods + +### estimateUserOperationGas() + +> **estimateUserOperationGas**(`userOp`): `Promise`\<`any`\> + +Defined in: [packages/core/src/clients/BundlerClient.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L115) + +eth_estimateUserOperationGas + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `Partial`\<[`UserOperationV07`](../interfaces/UserOperationV07.md)\> | + +#### Returns + +`Promise`\<`any`\> + +*** + +### getUserOperationByHash() + +> **getUserOperationByHash**(`hash`): `Promise`\<`any`\> + +Defined in: [packages/core/src/clients/BundlerClient.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L129) + +eth_getUserOperationByHash + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `hash` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### getUserOperationReceipt() + +> **getUserOperationReceipt**(`hash`): `Promise`\<`any`\> + +Defined in: [packages/core/src/clients/BundlerClient.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L122) + +eth_getUserOperationReceipt (v0.7 support prep) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `hash` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### sendUserOperation() + +> **sendUserOperation**(`userOp`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/core/src/clients/BundlerClient.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L108) + +eth_sendUserOperation + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | [`UserOperationV07`](../interfaces/UserOperationV07.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/ChannelClient.md b/api/@aastar/sdk/classes/ChannelClient.md new file mode 100644 index 000000000..8a543108e --- /dev/null +++ b/api/@aastar/sdk/classes/ChannelClient.md @@ -0,0 +1,189 @@ +Defined in: [packages/channel/src/ChannelClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L13) + +## Constructors + +### Constructor + +> **new ChannelClient**(`config`): `ChannelClient` + +Defined in: [packages/channel/src/ChannelClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ChannelClientConfig`](../type-aliases/ChannelClientConfig.md) | + +#### Returns + +`ChannelClient` + +## Methods + +### closeChannel() + +> **closeChannel**(`voucher`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L59) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `voucher` | [`SignedVoucher`](../type-aliases/SignedVoucher.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getChannelState() + +> **getChannelState**(`channelId`): `Promise`\<[`ChannelState`](../type-aliases/ChannelState.md)\> + +Defined in: [packages/channel/src/ChannelClient.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L90) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<[`ChannelState`](../type-aliases/ChannelState.md)\> + +*** + +### getCloseTimeout() + +> **getCloseTimeout**(): `Promise`\<`bigint`\> + +Defined in: [packages/channel/src/ChannelClient.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L94) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getVersion() + +> **getVersion**(): `Promise`\<`string`\> + +Defined in: [packages/channel/src/ChannelClient.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L98) + +#### Returns + +`Promise`\<`string`\> + +*** + +### openChannel() + +> **openChannel**(`channelConfig`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L28) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelConfig` | [`ChannelConfig`](../type-aliases/ChannelConfig.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### requestClose() + +> **requestClose**(`channelId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### settleChannel() + +> **settleChannel**(`voucher`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L50) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `voucher` | [`SignedVoucher`](../type-aliases/SignedVoucher.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### signVoucherOffline() + +> **signVoucherOffline**(`channelId`, `cumulativeAmount`): `Promise`\<[`SignedVoucher`](../type-aliases/SignedVoucher.md)\> + +Defined in: [packages/channel/src/ChannelClient.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L39) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | +| `cumulativeAmount` | `bigint` | + +#### Returns + +`Promise`\<[`SignedVoucher`](../type-aliases/SignedVoucher.md)\> + +*** + +### topUpChannel() + +> **topUpChannel**(`channelId`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### withdraw() + +> **withdraw**(`channelId`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/ChannelClient.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L83) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `channelId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/CommunityClient.md b/api/@aastar/sdk/classes/CommunityClient.md new file mode 100644 index 000000000..92c096a78 --- /dev/null +++ b/api/@aastar/sdk/classes/CommunityClient.md @@ -0,0 +1,445 @@ +Defined in: [packages/enduser/src/CommunityClient.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L27) + +Client for Community Managers (`ROLE_COMMUNITY`) + +## Extends + +- [`BaseClient`](BaseClient.md) + +## Constructors + +### Constructor + +> **new CommunityClient**(`config`): `CommunityClient` + +Defined in: [packages/enduser/src/CommunityClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`CommunityClientConfig`](../interfaces/CommunityClientConfig.md) | + +#### Returns + +`CommunityClient` + +#### Overrides + +[`BaseClient`](BaseClient.md).[`constructor`](BaseClient.md#constructor) + +## Properties + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`client`](BaseClient.md#client) + +*** + +### entryPointAddress? + +> `protected` `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L12) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`entryPointAddress`](BaseClient.md#entrypointaddress) + +*** + +### factoryAddress? + +> `optional` **factoryAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L29) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenAddress`](BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenStakingAddress`](BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`paymasterFactoryAddress`](BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`publicClient`](BaseClient.md#publicclient) + +*** + +### registryAddress? + +> `protected` `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L8) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`registryAddress`](BaseClient.md#registryaddress) + +*** + +### reputationAddress? + +> `optional` **reputationAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L30) + +*** + +### sbtAddress? + +> `optional` **sbtAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L28) + +## Methods + +### airdropSBT() + +> **airdropSBT**(`users`, `roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/CommunityClient.ts:309](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L309) + +Airdrop SBTs to users to make them members + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `users` | `` `0x${string}` ``[] | +| `roleId` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### createCommunityToken() + +> **createCommunityToken**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/CommunityClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L50) + +Create a new Community Token (xPNTs) and register it. +Note: In the current architecture, creating a community often involves: +1. Registering the ROLE_COMMUNITY on Registry (if not exists) -> usually manual or self-register +2. Deploying a Token (xPNTs) via Factory +3. Linking the Token to the Community in Registry + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`CreateCommunityParams`](../interfaces/CreateCommunityParams.md) | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getAddress`](BaseClient.md#getaddress) + +*** + +### getCommunityInfo() + +> **getCommunityInfo**(`communityAddress?`): `Promise`\<\{ `description`: `string`; `ensName`: `string`; `logoURI`: `string`; `name`: `string`; `stakeAmount`: `bigint`; `website`: `string`; \}\> + +Defined in: [packages/enduser/src/CommunityClient.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L76) + +Get Community Details (Decodes Role Metadata) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `communityAddress?` | `` `0x${string}` `` | The address of the community manager (defaults to self) | + +#### Returns + +`Promise`\<\{ `description`: `string`; `ensName`: `string`; `logoURI`: `string`; `name`: `string`; `stakeAmount`: `bigint`; `website`: `string`; \}\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getStartPublicClient`](BaseClient.md#getstartpublicclient) + +*** + +### registerAsCommunity() + +> **registerAsCommunity**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/CommunityClient.ts:166](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L166) + +Register self as a Community Manager. +This method handles all necessary steps: +1. Checks and approves GToken to GTokenStaking +2. Encodes CommunityRoleData with provided parameters +3. Calls registerRoleSelf on Registry + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `description?`: `string`; `ensName?`: `string`; `logoURI?`: `string`; `name`: `string`; `stakeAmount?`: `bigint`; `website?`: `string`; \} | Community registration parameters | +| `params.description?` | `string` | - | +| `params.ensName?` | `string` | - | +| `params.logoURI?` | `string` | - | +| `params.name?` | `string` | - | +| `params.stakeAmount?` | `bigint` | - | +| `params.website?` | `string` | - | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | Transaction options | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +Transaction hash + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireEntryPoint`](BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGToken`](BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGTokenStaking`](BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requirePaymasterFactory`](BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireRegistry`](BaseClient.md#requireregistry) + +*** + +### revokeMembership() + +> **revokeMembership**(`userAddr`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/CommunityClient.ts:360](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L360) + +Revoke membership (Burn SBT) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userAddr` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setReputationRule() + +> **setReputationRule**(`ruleId`, `ruleConfig`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/CommunityClient.ts:336](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L336) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ruleId` | `bigint` | +| `ruleConfig` | `any` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setupCommunity() + +> **setupCommunity**(`params`, `options?`): `Promise`\<\{ `hashes`: `` `0x${string}` ``[]; `tokenAddress`: `` `0x${string}` ``; \}\> + +Defined in: [packages/enduser/src/CommunityClient.ts:234](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L234) + +One-click Setup: Register Community + Deploy Token +Orchestrates the complete community initialization flow. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `description?`: `string`; `logoURI?`: `string`; `name`: `string`; `stakeAmount?`: `bigint`; `tokenName`: `string`; `tokenSymbol`: `string`; `website?`: `string`; \} | +| `params.description?` | `string` | +| `params.logoURI?` | `string` | +| `params.name?` | `string` | +| `params.stakeAmount?` | `bigint` | +| `params.tokenName?` | `string` | +| `params.tokenSymbol?` | `string` | +| `params.website?` | `string` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<\{ `hashes`: `` `0x${string}` ``[]; `tokenAddress`: `` `0x${string}` ``; \}\> + +*** + +### transferCommunityTokenOwnership() + +> **transferCommunityTokenOwnership**(`tokenAddress`, `newOwner`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/CommunityClient.ts:377](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L377) + +Transfer ownership of the Community Token + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenAddress` | `` `0x${string}` `` | +| `newOwner` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/ContractConfigManager.md b/api/@aastar/sdk/classes/ContractConfigManager.md new file mode 100644 index 000000000..47670e33a --- /dev/null +++ b/api/@aastar/sdk/classes/ContractConfigManager.md @@ -0,0 +1,25 @@ +Defined in: [packages/core/src/config/ContractConfigManager.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L14) + +## Constructors + +### Constructor + +> **new ContractConfigManager**(): `ContractConfigManager` + +#### Returns + +`ContractConfigManager` + +## Methods + +### getConfig() + +> `static` **getConfig**(): [`SuperPaymasterConfig`](../interfaces/SuperPaymasterConfig.md) + +Defined in: [packages/core/src/config/ContractConfigManager.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L18) + +Get validated core configuration + +#### Returns + +[`SuperPaymasterConfig`](../interfaces/SuperPaymasterConfig.md) diff --git a/api/@aastar/sdk/classes/ExperimentClient.md b/api/@aastar/sdk/classes/ExperimentClient.md new file mode 100644 index 000000000..73b3aeef3 --- /dev/null +++ b/api/@aastar/sdk/classes/ExperimentClient.md @@ -0,0 +1,81 @@ +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L19) + +ExperimentClient: Business-layer tool for measuring and recording execution metrics + +## Constructors + +### Constructor + +> **new ExperimentClient**(`scenarioId`, `group`): `ExperimentClient` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L24) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `scenarioId` | `string` | +| `group` | `"EOA"` \| `"AA"` \| `"SuperPaymaster"` | + +#### Returns + +`ExperimentClient` + +## Methods + +### getRecords() + +> **getRecords**(): [`ExperimentRecord`](../interfaces/ExperimentRecord.md)[] + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L77) + +#### Returns + +[`ExperimentRecord`](../interfaces/ExperimentRecord.md)[] + +*** + +### measureTx() + +> **measureTx**(`taskName`, `txPromise`, `publicClient`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L57) + +Measure an async task (transaction) automatically + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `taskName` | `string` | +| `txPromise` | `Promise`\<`` `0x${string}` ``\> | +| `publicClient` | `any` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### recordTx() + +> **recordTx**(`txHash`, `receipt`, `status`, `meta?`): [`ExperimentRecord`](../interfaces/ExperimentRecord.md) + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L32) + +Record a transaction result + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `txHash` | `` `0x${string}` `` | +| `receipt` | \{ `effectiveGasPrice`: `any`; `gasUsed`: `any`; \} | +| `receipt.effectiveGasPrice` | `any` | +| `receipt.gasUsed` | `any` | +| `status?` | `"Success"` \| `"Failed"` | +| `meta?` | `any` | + +#### Returns + +[`ExperimentRecord`](../interfaces/ExperimentRecord.md) diff --git a/api/@aastar/sdk/classes/FacilitatorClient.md b/api/@aastar/sdk/classes/FacilitatorClient.md new file mode 100644 index 000000000..71de4ed09 --- /dev/null +++ b/api/@aastar/sdk/classes/FacilitatorClient.md @@ -0,0 +1,80 @@ +Defined in: [packages/x402/src/facilitator.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L16) + +HTTP Facilitator Client — standard x402 v2 facilitator API. +Compatible with Coinbase hosted facilitator and self-hosted instances. + +Ref: coinbase/x402 HTTPFacilitatorClient pattern + +## Constructors + +### Constructor + +> **new FacilitatorClient**(`config`): `FacilitatorClient` + +Defined in: [packages/x402/src/facilitator.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L20) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`FacilitatorConfig`](../type-aliases/FacilitatorConfig.md) | + +#### Returns + +`FacilitatorClient` + +## Methods + +### settle() + +> **settle**(`paymentPayload`, `paymentRequirements`): `Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +Defined in: [packages/x402/src/facilitator.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L57) + +POST /settle — execute on-chain settlement (~2s on Base). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymentPayload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | +| `paymentRequirements` | [`PaymentRequirements`](../type-aliases/PaymentRequirements.md) | + +#### Returns + +`Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +*** + +### supported() + +> **supported**(): `Promise`\<[`FacilitatorSupported`](../type-aliases/FacilitatorSupported.md)\> + +Defined in: [packages/x402/src/facilitator.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L79) + +GET /supported — query facilitator capabilities. + +#### Returns + +`Promise`\<[`FacilitatorSupported`](../type-aliases/FacilitatorSupported.md)\> + +*** + +### verify() + +> **verify**(`paymentPayload`, `paymentRequirements`): `Promise`\<[`VerifyResponse`](../type-aliases/VerifyResponse.md)\> + +Defined in: [packages/x402/src/facilitator.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L35) + +POST /verify — validate payment signature off-chain (~100ms). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymentPayload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | +| `paymentRequirements` | [`PaymentRequirements`](../type-aliases/PaymentRequirements.md) | + +#### Returns + +`Promise`\<[`VerifyResponse`](../type-aliases/VerifyResponse.md)\> diff --git a/api/@aastar/sdk/classes/FinanceClient.md b/api/@aastar/sdk/classes/FinanceClient.md new file mode 100644 index 000000000..a0d065113 --- /dev/null +++ b/api/@aastar/sdk/classes/FinanceClient.md @@ -0,0 +1,307 @@ +Defined in: [packages/tokens/src/index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L16) + +## Constructors + +### Constructor + +> **new FinanceClient**(`publicClient`, `walletClient`): `FinanceClient` + +Defined in: [packages/tokens/src/index.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L22) + +Initialize FinanceClient + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `publicClient` | [`PublicClient`](../interfaces/PublicClient.md) | The public client for queries | +| `walletClient` | [`WalletClient`](../interfaces/WalletClient.md) | The wallet client for transactions | + +#### Returns + +`FinanceClient` + +## Methods + +### approveAndStake() + +> **approveAndStake**(`amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L159) + +One-step stake: Approve (if needed) + Stake + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `amount` | `bigint` | Amount of GToken to stake | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +Transaction hash of the stake action + +*** + +### getAPNTsBalance() + +> **getAPNTsBalance**(`address`): `Promise`\<`bigint`\> + +Defined in: [packages/tokens/src/index.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L143) + +Get aPNTs balance + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getCirculatingSupply() + +> **getCirculatingSupply**(): `Promise`\<\{ `circulating`: `bigint`; `locked`: `bigint`; `total`: `bigint`; \}\> + +Defined in: [packages/tokens/src/index.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L197) + +Get circulating supply (total - locked) + +#### Returns + +`Promise`\<\{ `circulating`: `bigint`; `locked`: `bigint`; `total`: `bigint`; \}\> + +*** + +### getGTokenBalance() + +> **getGTokenBalance**(`address`): `Promise`\<`bigint`\> + +Defined in: [packages/tokens/src/index.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L130) + +Get GToken balance + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getTokenomicsOverview() + +> **getTokenomicsOverview**(): `Promise`\<\{ `circulatingSupply`: `bigint`; `stakingRatio`: `number`; `totalBurned`: `bigint`; `totalStaked`: `bigint`; `totalSupply`: `bigint`; \}\> + +Defined in: [packages/tokens/src/index.ts:224](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L224) + +Get comprehensive tokenomics data + +#### Returns + +`Promise`\<\{ `circulatingSupply`: `bigint`; `stakingRatio`: `number`; `totalBurned`: `bigint`; `totalStaked`: `bigint`; `totalSupply`: `bigint`; \}\> + +*** + +### ~~depositToEntryPoint()~~ + +> `static` **depositToEntryPoint**(`wallet`, `entryPoint`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L82) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `entryPoint` | `` `0x${string}` `` | +| `paymaster` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~depositToPaymaster()~~ + +> `static` **depositToPaymaster**(`wallet`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `paymaster` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~depositViaTransferAndCall()~~ + +> `static` **depositViaTransferAndCall**(`wallet`, `token`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L41) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `token` | `` `0x${string}` `` | +| `paymaster` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~getEntryPointBalance()~~ + +> `static` **getEntryPointBalance**(`client`, `entryPoint`, `account`): `Promise`\<`bigint`\> + +Defined in: [packages/tokens/src/index.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L94) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `entryPoint` | `` `0x${string}` `` | +| `account` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~operatorDeposit()~~ + +> `static` **operatorDeposit**(`wallet`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L104) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `paymaster` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~operatorNotifyDeposit()~~ + +> `static` **operatorNotifyDeposit**(`wallet`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L115) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `paymaster` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~stakeGToken()~~ + +> `static` **stakeGToken**(`wallet`, `stakingAddr`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L60) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `stakingAddr` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead + +*** + +### ~~withdrawProtocolRevenue()~~ + +> `static` **withdrawProtocolRevenue**(`wallet`, `paymaster`, `to`, `amount`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/tokens/src/index.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L71) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | [`WalletClient`](../interfaces/WalletClient.md) | +| `paymaster` | `` `0x${string}` `` | +| `to` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Deprecated + +Use instance methods instead diff --git a/api/@aastar/sdk/classes/FundingManager.md b/api/@aastar/sdk/classes/FundingManager.md new file mode 100644 index 000000000..4bbd97267 --- /dev/null +++ b/api/@aastar/sdk/classes/FundingManager.md @@ -0,0 +1,172 @@ +Defined in: [packages/sdk/src/utils/funding.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L65) + +资金管理器 +提供 ETH 和 ERC20 Token 的充值、验证等工具函数 + +## Constructors + +### Constructor + +> **new FundingManager**(): `FundingManager` + +#### Returns + +`FundingManager` + +## Methods + +### batchFundETH() + +> `static` **batchFundETH**(`params`, `targets`): `Promise`\<[`FundingResult`](../interfaces/FundingResult.md)[]\> + +Defined in: [packages/sdk/src/utils/funding.ts:236](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L236) + +批量充值 ETH + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | `Omit`\<[`FundingParams`](../interfaces/FundingParams.md), `"targetAddress"`\> | 基础参数 | +| `targets` | `object`[] | 目标地址和金额数组 | + +#### Returns + +`Promise`\<[`FundingResult`](../interfaces/FundingResult.md)[]\> + +充值结果数组 + +*** + +### batchFundToken() + +> `static` **batchFundToken**(`params`, `tokenAddress`, `targets`): `Promise`\<[`FundingResult`](../interfaces/FundingResult.md)[]\> + +Defined in: [packages/sdk/src/utils/funding.ts:261](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L261) + +批量充值 Token + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | `Omit`\<[`FundingParams`](../interfaces/FundingParams.md), `"targetAddress"`\> | 基础参数 | +| `tokenAddress` | `` `0x${string}` `` | Token 合约地址 | +| `targets` | `object`[] | 目标地址和金额数组 | + +#### Returns + +`Promise`\<[`FundingResult`](../interfaces/FundingResult.md)[]\> + +充值结果数组 + +*** + +### ensureFunding() + +> `static` **ensureFunding**(`params`): `Promise`\<[`FundingResult`](../interfaces/FundingResult.md)[]\> + +Defined in: [packages/sdk/src/utils/funding.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L184) + +智能充值:检查余额,不足时自动充值 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | [`EnsureFundingParams`](../interfaces/EnsureFundingParams.md) | 充值参数 | + +#### Returns + +`Promise`\<[`FundingResult`](../interfaces/FundingResult.md)[]\> + +充值结果数组 + +*** + +### fundWithETH() + +> `static` **fundWithETH**(`params`): `Promise`\<[`FundingResult`](../interfaces/FundingResult.md)\> + +Defined in: [packages/sdk/src/utils/funding.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L96) + +充值 ETH 到目标地址 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | [`FundETHParams`](../interfaces/FundETHParams.md) | 充值参数 | + +#### Returns + +`Promise`\<[`FundingResult`](../interfaces/FundingResult.md)\> + +充值结果 + +*** + +### fundWithToken() + +> `static` **fundWithToken**(`params`): `Promise`\<[`FundingResult`](../interfaces/FundingResult.md)\> + +Defined in: [packages/sdk/src/utils/funding.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L126) + +充值 ERC20 Token 到目标地址 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | [`FundTokenParams`](../interfaces/FundTokenParams.md) | 充值参数 | + +#### Returns + +`Promise`\<[`FundingResult`](../interfaces/FundingResult.md)\> + +充值结果 + +*** + +### getETHBalance() + +> `static` **getETHBalance**(`params`): `Promise`\<`bigint`\> + +Defined in: [packages/sdk/src/utils/funding.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L158) + +检查 ETH 余额 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | [`FundingParams`](../interfaces/FundingParams.md) | 基础参数 | + +#### Returns + +`Promise`\<`bigint`\> + +ETH 余额(wei) + +*** + +### getTokenBalance() + +> `static` **getTokenBalance**(`params`, `tokenAddress`): `Promise`\<`bigint`\> + +Defined in: [packages/sdk/src/utils/funding.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L169) + +检查 ERC20 Token 余额 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | [`FundingParams`](../interfaces/FundingParams.md) | 基础参数 | +| `tokenAddress` | `` `0x${string}` `` | Token 合约地址 | + +#### Returns + +`Promise`\<`bigint`\> + +Token 余额 diff --git a/api/@aastar/sdk/classes/KeyManager.md b/api/@aastar/sdk/classes/KeyManager.md new file mode 100644 index 000000000..5cdcf424b --- /dev/null +++ b/api/@aastar/sdk/classes/KeyManager.md @@ -0,0 +1,182 @@ +Defined in: [packages/sdk/src/utils/keys.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L19) + +密钥管理器 +提供密钥生成、存储、加载等工具函数 + +## Constructors + +### Constructor + +> **new KeyManager**(): `KeyManager` + +#### Returns + +`KeyManager` + +## Methods + +### generateKeyPair() + +> `static` **generateKeyPair**(`name`): [`KeyPair`](../interfaces/KeyPair.md) + +Defined in: [packages/sdk/src/utils/keys.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L24) + +生成单个密钥对 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `name` | `string` | 密钥名称(如 'Jason', 'Anni') | + +#### Returns + +[`KeyPair`](../interfaces/KeyPair.md) + +*** + +### generateKeyPairs() + +> `static` **generateKeyPairs**(`names`): [`KeyPair`](../interfaces/KeyPair.md)[] + +Defined in: [packages/sdk/src/utils/keys.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L38) + +批量生成密钥对 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `names` | `string`[] | 密钥名称数组 | + +#### Returns + +[`KeyPair`](../interfaces/KeyPair.md)[] + +*** + +### generateMultiple() + +> `static` **generateMultiple**(`count`, `prefix`): [`KeyPair`](../interfaces/KeyPair.md)[] + +Defined in: [packages/sdk/src/utils/keys.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L47) + +生成指定数量的密钥对(自动命名为 Operator_1, Operator_2, ...) + +#### Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `count` | `number` | `undefined` | 数量 | +| `prefix` | `string` | `'Operator'` | 名称前缀(默认 'Operator') | + +#### Returns + +[`KeyPair`](../interfaces/KeyPair.md)[] + +*** + +### loadFromEnvFile() + +> `static` **loadFromEnvFile**(`filePath`): [`KeyPair`](../interfaces/KeyPair.md)[] + +Defined in: [packages/sdk/src/utils/keys.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L76) + +从 .env 文件加载密钥 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `filePath` | `string` | 文件路径(绝对路径) | + +#### Returns + +[`KeyPair`](../interfaces/KeyPair.md)[] + +密钥对数组 + +*** + +### loadFromJsonFile() + +> `static` **loadFromJsonFile**(`filePath`): [`KeyPair`](../interfaces/KeyPair.md)[] + +Defined in: [packages/sdk/src/utils/keys.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L126) + +从 JSON 文件加载密钥 + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `filePath` | `string` | 文件路径(绝对路径) | + +#### Returns + +[`KeyPair`](../interfaces/KeyPair.md)[] + +*** + +### printKeys() + +> `static` **printKeys**(`keys`, `showPrivateKey`): `void` + +Defined in: [packages/sdk/src/utils/keys.ts:145](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L145) + +打印密钥信息(隐藏私钥) + +#### Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `keys` | [`KeyPair`](../interfaces/KeyPair.md)[] | `undefined` | 密钥对数组 | +| `showPrivateKey` | `boolean` | `false` | - | + +#### Returns + +`void` + +*** + +### saveToEnvFile() + +> `static` **saveToEnvFile**(`filePath`, `keys`, `overwrite`): `void` + +Defined in: [packages/sdk/src/utils/keys.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L58) + +保存密钥到 .env 文件 + +#### Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `filePath` | `string` | `undefined` | 文件路径(绝对路径) | +| `keys` | [`KeyPair`](../interfaces/KeyPair.md)[] | `undefined` | 密钥对数组 | +| `overwrite` | `boolean` | `false` | 是否覆盖已存在的文件(默认 false) | + +#### Returns + +`void` + +*** + +### saveToJsonFile() + +> `static` **saveToJsonFile**(`filePath`, `keys`, `overwrite`): `void` + +Defined in: [packages/sdk/src/utils/keys.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L104) + +保存密钥到 JSON 文件(包含地址信息) + +#### Parameters + +| Parameter | Type | Default value | Description | +| ------ | ------ | ------ | ------ | +| `filePath` | `string` | `undefined` | 文件路径(绝对路径) | +| `keys` | [`KeyPair`](../interfaces/KeyPair.md)[] | `undefined` | 密钥对数组 | +| `overwrite` | `boolean` | `false` | 是否覆盖已存在的文件(默认 false) | + +#### Returns + +`void` diff --git a/api/@aastar/sdk/classes/OperatorLifecycle.md b/api/@aastar/sdk/classes/OperatorLifecycle.md new file mode 100644 index 000000000..866633250 --- /dev/null +++ b/api/@aastar/sdk/classes/OperatorLifecycle.md @@ -0,0 +1,666 @@ +Defined in: [packages/operator/src/OperatorLifecycle.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L19) + +OperatorLifecycle - L3 Pattern + +Responsibilities: +1. Managing the complete lifecycle of a Paymaster Operator +2. Unifying setup (onboard), operation (config), and exit (withdraw) + +## Extends + +- [`PaymasterOperatorClient`](PaymasterOperatorClient.md) + +## Constructors + +### Constructor + +> **new OperatorLifecycle**(`config`): `OperatorLifecycle` + +Defined in: [packages/operator/src/OperatorLifecycle.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`OperatorClientConfig`](../interfaces/OperatorClientConfig.md) | + +#### Returns + +`OperatorLifecycle` + +#### Overrides + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`constructor`](PaymasterOperatorClient.md#constructor) + +## Properties + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`client`](PaymasterOperatorClient.md#client) + +*** + +### entryPointAddress? + +> `protected` `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L12) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`entryPointAddress`](PaymasterOperatorClient.md#entrypointaddress) + +*** + +### ethUsdPriceFeed + +> **ethUsdPriceFeed**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L23) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`ethUsdPriceFeed`](PaymasterOperatorClient.md#ethusdpricefeed) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`gTokenAddress`](PaymasterOperatorClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`gTokenStakingAddress`](PaymasterOperatorClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`paymasterFactoryAddress`](PaymasterOperatorClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`publicClient`](PaymasterOperatorClient.md#publicclient) + +*** + +### registryAddress? + +> `protected` `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L8) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`registryAddress`](PaymasterOperatorClient.md#registryaddress) + +*** + +### superPaymasterAddress + +> **superPaymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L21) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`superPaymasterAddress`](PaymasterOperatorClient.md#superpaymasteraddress) + +*** + +### tokenAddress? + +> `optional` **tokenAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L22) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`tokenAddress`](PaymasterOperatorClient.md#tokenaddress) + +*** + +### xpntsFactory + +> **xpntsFactory**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L24) + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`xpntsFactory`](PaymasterOperatorClient.md#xpntsfactory) + +## Methods + +### addGasToken() + +> **addGasToken**(`token`, `price`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:409](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L409) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `token` | `` `0x${string}` `` | +| `price` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`addGasToken`](PaymasterOperatorClient.md#addgastoken) + +*** + +### checkReadiness() + +> **checkReadiness**(): `Promise`\<[`OperatorStatus`](../interfaces/OperatorStatus.md)\> + +Defined in: [packages/operator/src/OperatorLifecycle.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L33) + +Check if the account is ready to become an operator +(e.g., has GToken, has ROLE_COMMUNITY, etc.) + +#### Returns + +`Promise`\<[`OperatorStatus`](../interfaces/OperatorStatus.md)\> + +*** + +### configureOperator() + +> **configureOperator**(`xPNTsToken?`, `treasury?`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:324](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L324) + +Configure operator parameters (Token, Treasury). +Exchange rate is now read live from xPNTsToken.exchangeRate() at runtime. +If parameters are undefined, existing values are preserved. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `xPNTsToken?` | `` `0x${string}` `` | +| `treasury?` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`configureOperator`](PaymasterOperatorClient.md#configureoperator) + +*** + +### deployAndRegisterPaymasterV4() + +> **deployAndRegisterPaymasterV4**(`params?`, `options?`): `Promise`\<\{ `deployHash`: `` `0x${string}` ``; `paymasterAddress`: `` `0x${string}` ``; `registerHash`: `` `0x${string}` ``; \}\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L142) + +Deploy a new Paymaster V4 and Register as AOA Operator (one-stop API). +This method handles: +1. Checks prerequisites (ROLE_COMMUNITY) +2. Predicts new Paymaster address +3. Deploys Paymaster V4 via Factory +4. Registers ROLE_PAYMASTER_AOA with staking + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params?` | \{ `priceFeed?`: `` `0x${string}` ``; `salt?`: `bigint`; `stakeAmount?`: `bigint`; `version?`: `string`; \} | Deployment parameters | +| `params.priceFeed?` | `` `0x${string}` `` | - | +| `params.salt?` | `bigint` | - | +| `params.stakeAmount?` | `bigint` | - | +| `params.version?` | `string` | - | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | Transaction options | + +#### Returns + +`Promise`\<\{ `deployHash`: `` `0x${string}` ``; `paymasterAddress`: `` `0x${string}` ``; `registerHash`: `` `0x${string}` ``; \}\> + +Object containing new paymaster address and transaction hashes + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`deployAndRegisterPaymasterV4`](PaymasterOperatorClient.md#deployandregisterpaymasterv4) + +*** + +### depositCollateral() + +> **depositCollateral**(`amount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L283) + +Deposit collateral (aPNTs/GToken) to SuperPaymaster. +This is a helper method used by registerAsSuperPaymasterOperator. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `amount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`depositCollateral`](PaymasterOperatorClient.md#depositcollateral) + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`getAddress`](PaymasterOperatorClient.md#getaddress) + +*** + +### getOperatorDetails() + +> **getOperatorDetails**(`operator?`): `Promise`\<`any`\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:372](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L372) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `operator?` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`getOperatorDetails`](PaymasterOperatorClient.md#getoperatordetails) + +*** + +### getOperatorStats() + +> **getOperatorStats**(): `Promise`\<`any`\> + +Defined in: [packages/operator/src/OperatorLifecycle.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L93) + +#### Returns + +`Promise`\<`any`\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`getStartPublicClient`](PaymasterOperatorClient.md#getstartpublicclient) + +*** + +### getTokenPrice() + +> **getTokenPrice**(`token`): `Promise`\<`bigint`\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:422](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L422) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`getTokenPrice`](PaymasterOperatorClient.md#gettokenprice) + +*** + +### initiateExit() + +> **initiateExit**(`options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/OperatorLifecycle.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L104) + +Start the exit process: Unstake from Registry/SuperPaymaster and Unlock funds + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Overrides + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`initiateExit`](PaymasterOperatorClient.md#initiateexit) + +*** + +### isOperator() + +> **isOperator**(`operator`): `Promise`\<`boolean`\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:362](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L362) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `operator` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`isOperator`](PaymasterOperatorClient.md#isoperator) + +*** + +### registerAsSuperPaymasterOperator() + +> **registerAsSuperPaymasterOperator**(`params?`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L50) + +Register as SuperPaymaster Operator (one-stop API). +This method handles all necessary steps: +1. Checks prerequisites (must have ROLE_COMMUNITY) +2. Checks and approves GToken to GTokenStaking +3. Registers ROLE_PAYMASTER_SUPER +4. Optionally deposits collateral to SuperPaymaster + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params?` | \{ `depositAmount?`: `bigint`; `stakeAmount?`: `bigint`; \} | Registration parameters | +| `params.depositAmount?` | `bigint` | - | +| `params.stakeAmount?` | `bigint` | - | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | Transaction options | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +Transaction hash of role registration + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`registerAsSuperPaymasterOperator`](PaymasterOperatorClient.md#registerassuperpaymasteroperator) + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`requireEntryPoint`](PaymasterOperatorClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`requireGToken`](PaymasterOperatorClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`requireGTokenStaking`](PaymasterOperatorClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`requirePaymasterFactory`](PaymasterOperatorClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`requireRegistry`](PaymasterOperatorClient.md#requireregistry) + +*** + +### setupNode() + +> **setupNode**(`params`, `options?`): `Promise`\<`` `0x${string}` ``[]\> + +Defined in: [packages/operator/src/OperatorLifecycle.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L50) + +One-click Setup: Register + Deposit + Deploy Node +Wraps existing registerAsSuperPaymasterOperator or deployAndRegisterPaymasterV4 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `depositAmount?`: `bigint`; `stakeAmount?`: `bigint`; `type`: `"V4"` \| `"SUPER"`; \} | +| `params.depositAmount?` | `bigint` | +| `params.stakeAmount?` | `bigint` | +| `params.type?` | `"V4"` \| `"SUPER"` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``[]\> + +*** + +### setupPaymasterDeposit() + +> **setupPaymasterDeposit**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:431](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L431) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `amount`: `bigint`; `paymaster`: `` `0x${string}` ``; `token`: `` `0x${string}` ``; `user`: `` `0x${string}` ``; \} | +| `params.amount` | `bigint` | +| `params.paymaster?` | `` `0x${string}` `` | +| `params.token?` | `` `0x${string}` `` | +| `params.user?` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`setupPaymasterDeposit`](PaymasterOperatorClient.md#setuppaymasterdeposit) + +*** + +### withdrawAllFunds() + +> **withdrawAllFunds**(`to?`, `options?`): `Promise`\<`` `0x${string}` ``[]\> + +Defined in: [packages/operator/src/OperatorLifecycle.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L112) + +Finalize exit: Withdraw all funds (Collateral + Rewards) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `to?` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``[]\> + +*** + +### withdrawCollateral() + +> **withdrawCollateral**(`to`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:349](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L349) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `to` | `` `0x${string}` `` | +| `amount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`withdrawCollateral`](PaymasterOperatorClient.md#withdrawcollateral) + +*** + +### withdrawStake() + +> **withdrawStake**(`to`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:393](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L393) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `to` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +#### Inherited from + +[`PaymasterOperatorClient`](PaymasterOperatorClient.md).[`withdrawStake`](PaymasterOperatorClient.md#withdrawstake) diff --git a/api/@aastar/sdk/classes/PaymasterClient.md b/api/@aastar/sdk/classes/PaymasterClient.md new file mode 100644 index 000000000..6dccd0a4d --- /dev/null +++ b/api/@aastar/sdk/classes/PaymasterClient.md @@ -0,0 +1,261 @@ +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L10) + +PaymasterClient +Focus: Integration, Funding, Interaction. + +## Methods + +### approveGasToken() + +> `static` **approveGasToken**(`wallet`, `token`, `spender`, `amount`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L94) + +Approve the Paymaster (or any spender) to spend gas tokens. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `token` | `` `0x${string}` `` | +| `spender` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### depositFor() + +> `static` **depositFor**(`wallet`, `address`, `user`, `token`, `amount`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L81) + +Deposit tokens to Paymaster for a user (enables gasless transactions). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### encodeExecution() + +> `static` **encodeExecution**(`target`, `value`, `data`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:693](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L693) + +Helper: Encode a SimpleAccount execution. +Wraps the inner call into: `execute(target, value, data)` +This is the payload signed by the user. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `target` | `` `0x${string}` `` | +| `value` | `bigint` | +| `data` | `` `0x${string}` `` | + +#### Returns + +`` `0x${string}` `` + +*** + +### encodeTokenTransfer() + +> `static` **encodeTokenTransfer**(`recipient`, `amount`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:680](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L680) + +Helper: Encode a standardized ERC-20 Transfer. +Returns the raw function data: `transfer(to, amount)` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `recipient` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +*** + +### estimateUserOperationGas() + +> `static` **estimateUserOperationGas**(`client`, `wallet`, `aaAddress`, `entryPoint`, `paymasterAddress`, `token`, `bundlerUrl`, `callData`, `options?`): `Promise`\<\{ `callGasLimit`: `bigint`; `paymasterPostOpGasLimit`: `bigint`; `paymasterVerificationGasLimit`: `bigint`; `preVerificationGas`: `bigint`; `verificationGasLimit`: `bigint`; \}\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L107) + +Estimate Gas for a UserOperation. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `wallet` | `any` | +| `aaAddress` | `` `0x${string}` `` | +| `entryPoint` | `` `0x${string}` `` | +| `paymasterAddress` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `bundlerUrl` | `string` | +| `callData` | `` `0x${string}` `` | +| `options?` | \{ `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `operator?`: `` `0x${string}` ``; `validityWindow?`: `number`; \} | +| `options.factory?` | `` `0x${string}` `` | +| `options.factoryData?` | `` `0x${string}` `` | +| `options.operator?` | `` `0x${string}` `` | +| `options.validityWindow?` | `number` | + +#### Returns + +`Promise`\<\{ `callGasLimit`: `bigint`; `paymasterPostOpGasLimit`: `bigint`; `paymasterVerificationGasLimit`: `bigint`; `preVerificationGas`: `bigint`; `verificationGasLimit`: `bigint`; \}\> + +*** + +### getDepositedBalance() + +> `static` **getDepositedBalance**(`publicClient`, `address`, `user`, `token`): `Promise`\<`bigint`\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L60) + +Get user's deposited balance on the Paymaster. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicClient` | `any` | +| `address` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getFeeFromReceipt() + +> `static` **getFeeFromReceipt**(`receipt`, `paymasterAddress`): \{ `actualGasCostWei`: `bigint`; `tokenCost`: `bigint`; \} \| `null` + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:640](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L640) + +Helper to extract the actual Gas Token fee from a UserOperation receipt. +Looks for the 'PostOpProcessed' event emitted by the Paymaster. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `receipt` | `any` | +| `paymasterAddress` | `` `0x${string}` `` | + +#### Returns + +\{ `actualGasCostWei`: `bigint`; `tokenCost`: `bigint`; \} \| `null` + +*** + +### getTransactionFee() + +> `static` **getTransactionFee**(`publicClient`, `txHash`, `paymasterAddress`): `Promise`\<\{ `actualGasCostWei`: `bigint`; `tokenCost`: `bigint`; \} \| `null`\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:667](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L667) + +Get the fee for a specific transaction hash. +Fetches the receipt (no scanning required) and decodes the log. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicClient` | `any` | +| `txHash` | `` `0x${string}` `` | +| `paymasterAddress` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<\{ `actualGasCostWei`: `bigint`; `tokenCost`: `bigint`; \} \| `null`\> + +*** + +### submitGaslessUserOperation() + +> `static` **submitGaslessUserOperation**(`client`, `wallet`, `aaAddress`, `entryPoint`, `paymasterAddress`, `token`, `bundlerUrl`, `callData`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:309](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L309) + +High-level API to submit a gasless UserOperation. +Automatically handles nonce fetching, gas estimation (if not provided), signing, and submission. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `wallet` | `any` | +| `aaAddress` | `` `0x${string}` `` | +| `entryPoint` | `` `0x${string}` `` | +| `paymasterAddress` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `bundlerUrl` | `string` | +| `callData` | `` `0x${string}` `` | +| `options?` | \{ `autoEstimate?`: `boolean`; `callGasLimit?`: `bigint`; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `operator?`: `` `0x${string}` ``; `paymasterPostOpGasLimit?`: `bigint`; `paymasterVerificationGasLimit?`: `bigint`; `preVerificationGas?`: `bigint`; `validityWindow?`: `number`; `verificationGasLimit?`: `bigint`; \} | +| `options.autoEstimate?` | `boolean` | +| `options.callGasLimit?` | `bigint` | +| `options.factory?` | `` `0x${string}` `` | +| `options.factoryData?` | `` `0x${string}` `` | +| `options.maxFeePerGas?` | `bigint` | +| `options.maxPriorityFeePerGas?` | `bigint` | +| `options.operator?` | `` `0x${string}` `` | +| `options.paymasterPostOpGasLimit?` | `bigint` | +| `options.paymasterVerificationGasLimit?` | `bigint` | +| `options.preVerificationGas?` | `bigint` | +| `options.validityWindow?` | `number` | +| `options.verificationGasLimit?` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### waitForUserOperation() + +> `static` **waitForUserOperation**(`bundlerClient`, `hash`, `timeout`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterClient.ts:705](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterClient.ts#L705) + +More robust version of waitForUserOperationReceipt. +Catches timeouts and returns a cleaner result. + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `bundlerClient` | `any` | `undefined` | +| `hash` | `` `0x${string}` `` | `undefined` | +| `timeout` | `number` | `180000` | + +#### Returns + +`Promise`\<`any`\> diff --git a/api/@aastar/sdk/classes/PaymasterManager.md b/api/@aastar/sdk/classes/PaymasterManager.md new file mode 100644 index 000000000..6cd21c744 --- /dev/null +++ b/api/@aastar/sdk/classes/PaymasterManager.md @@ -0,0 +1,118 @@ +Defined in: [packages/paymaster/src/PaymasterManager.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L62) + +PaymasterManager — unifies the per-type `paymasterAndData` packers behind a +single `buildPaymasterData` entry point that AUTO-SELECTS the correct byte +format by paymaster type. + +Type resolution order: + 1. Explicit `params.type` (preferred — no guessing). + 2. Address-based lookup against the registered known-paymaster map. + +The underlying packers (`buildPaymasterData` / `buildSuperPaymasterData` in +PaymasterUtils) remain exported and are reused verbatim here — this class +does NOT reimplement byte-packing. + +## Constructors + +### Constructor + +> **new PaymasterManager**(`opts?`): `PaymasterManager` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `opts?` | \{ `knownPaymasters?`: `Record`\<`string`, [`PaymasterType`](../type-aliases/PaymasterType.md)\>; \} | +| `opts.knownPaymasters?` | `Record`\<`string`, [`PaymasterType`](../type-aliases/PaymasterType.md)\> | + +#### Returns + +`PaymasterManager` + +## Methods + +### buildPaymasterData() + +> **buildPaymasterData**(`params`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L113) + +Build `paymasterAndData`, auto-selecting the correct byte layout for the +paymaster type. Dispatches to the existing per-type packers. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`BuildPaymasterDataParams`](../interfaces/BuildPaymasterDataParams.md) | + +#### Returns + +`` `0x${string}` `` + +*** + +### registerPaymaster() + +> **registerPaymaster**(`address`, `type`): `void` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L78) + +Register a known paymaster address → type mapping so that callers can +omit the explicit `type` and have it resolved from the address. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | +| `type` | [`PaymasterType`](../type-aliases/PaymasterType.md) | + +#### Returns + +`void` + +*** + +### resolveType() + +> **resolveType**(`address`): [`PaymasterType`](../type-aliases/PaymasterType.md) \| `undefined` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L105) + +Resolve a paymaster's type from a registered address. Returns undefined +if the address is not registered. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +#### Returns + +[`PaymasterType`](../type-aliases/PaymasterType.md) \| `undefined` + +*** + +### buildPaymasterData() + +> `static` **buildPaymasterData**(`type`, `params`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L128) + +Static helper: build `paymasterAndData` for an explicit type without an +instance. Useful when the caller already knows the type. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `type` | [`PaymasterType`](../type-aliases/PaymasterType.md) | +| `params` | `Omit`\<[`BuildPaymasterDataParams`](../interfaces/BuildPaymasterDataParams.md), `"type"`\> | + +#### Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/classes/PaymasterOperator.md b/api/@aastar/sdk/classes/PaymasterOperator.md new file mode 100644 index 000000000..65f5cc06e --- /dev/null +++ b/api/@aastar/sdk/classes/PaymasterOperator.md @@ -0,0 +1,330 @@ +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L8) + +PaymasterOperator +Focus: Deployment, Configuration, Maintenance, Keeper Bots. + +## Constructors + +### Constructor + +> **new PaymasterOperator**(): `PaymasterOperator` + +#### Returns + +`PaymasterOperator` + +## Methods + +### addDeposit() + +> `static` **addDeposit**(`wallet`, `address`, `amount`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L107) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### addGasToken() + +> `static` **addGasToken**(`wallet`, `address`, `token`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L117) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### addStake() + +> `static` **addStake**(`wallet`, `address`, `amount`, `unstakeDelaySec`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L96) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `amount` | `bigint` | +| `unstakeDelaySec` | `number` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### checkGaslessReadiness() + +> `static` **checkGaslessReadiness**(`publicClient`, `entryPoint`, `paymasterAddress`, `user`, `token`): `Promise`\<[`GaslessReadinessReport`](../type-aliases/GaslessReadinessReport.md)\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L169) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicClient` | `any` | +| `entryPoint` | `` `0x${string}` `` | +| `paymasterAddress` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<[`GaslessReadinessReport`](../type-aliases/GaslessReadinessReport.md)\> + +*** + +### ensurePriceInitialized() + +> `static` **ensurePriceInitialized**(`wallet`, `publicClient`, `address`): `Promise`\<`boolean`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L87) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `publicClient` | `any` | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### getCachedPrice() + +> `static` **getCachedPrice**(`publicClient`, `address`): `Promise`\<\{ `price`: `bigint`; `updatedAt`: `bigint`; \}\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L36) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicClient` | `any` | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<\{ `price`: `bigint`; `updatedAt`: `bigint`; \}\> + +*** + +### getDepositedBalance() + +> `static` **getDepositedBalance**(`publicClient`, `address`, `user`, `token`): `Promise`\<`bigint`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L69) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicClient` | `any` | +| `address` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getTokenPrice() + +> `static` **getTokenPrice**(`publicClient`, `address`, `token`): `Promise`\<`bigint`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicClient` | `any` | +| `address` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### prepareGaslessEnvironment() + +> `static` **prepareGaslessEnvironment**(`operatorWallet`, `publicClient`, `entryPoint`, `paymasterAddress`, `token`, `options`): `Promise`\<`object`[]\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L229) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `operatorWallet` | `any` | +| `publicClient` | `any` | +| `entryPoint` | `` `0x${string}` `` | +| `paymasterAddress` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `options` | \{ `minDeposit?`: `bigint`; `minStake?`: `bigint`; `tokenPriceUSD?`: `bigint`; \} | +| `options.minDeposit?` | `bigint` | +| `options.minStake?` | `bigint` | +| `options.tokenPriceUSD?` | `bigint` | + +#### Returns + +`Promise`\<`object`[]\> + +*** + +### removeGasToken() + +> `static` **removeGasToken**(`wallet`, `address`, `token`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L127) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### setMaxGasCostCap() + +> `static` **setMaxGasCostCap**(`wallet`, `address`, `cap`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L147) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `cap` | `bigint` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### setServiceFeeRate() + +> `static` **setServiceFeeRate**(`wallet`, `address`, `rate`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L137) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `rate` | `bigint` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### setTokenPrice() + +> `static` **setTokenPrice**(`wallet`, `address`, `token`, `priceUSD`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L26) + +Set the token price (in 8 decimals, e.g., 1e8 = $1 USD). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `priceUSD` | `bigint` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### updatePrice() + +> `static` **updatePrice**(`wallet`, `address`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L14) + +Update the cached ETH/USD price from Chainlink Oracle. +Must be called if cachedPrice is 0 (uninitialized). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### withdrawPNT() + +> `static` **withdrawPNT**(`wallet`, `address`, `to`, `token`, `amount`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/V4/PaymasterOperator.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterOperator.ts#L157) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `address` | `` `0x${string}` `` | +| `to` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `amount` | `bigint` | + +#### Returns + +`Promise`\<`any`\> diff --git a/api/@aastar/sdk/classes/PaymasterOperatorClient.md b/api/@aastar/sdk/classes/PaymasterOperatorClient.md new file mode 100644 index 000000000..27c7f7e7a --- /dev/null +++ b/api/@aastar/sdk/classes/PaymasterOperatorClient.md @@ -0,0 +1,527 @@ +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L20) + +Client for Paymaster Operators (ROLE_PAYMASTER_SUPER) + +## Extends + +- [`BaseClient`](BaseClient.md) + +## Extended by + +- [`OperatorLifecycle`](OperatorLifecycle.md) + +## Constructors + +### Constructor + +> **new PaymasterOperatorClient**(`config`): `PaymasterOperatorClient` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`OperatorClientConfig`](../interfaces/OperatorClientConfig.md) | + +#### Returns + +`PaymasterOperatorClient` + +#### Overrides + +[`BaseClient`](BaseClient.md).[`constructor`](BaseClient.md#constructor) + +## Properties + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`client`](BaseClient.md#client) + +*** + +### entryPointAddress? + +> `protected` `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L12) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`entryPointAddress`](BaseClient.md#entrypointaddress) + +*** + +### ethUsdPriceFeed + +> **ethUsdPriceFeed**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L23) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenAddress`](BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenStakingAddress`](BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`paymasterFactoryAddress`](BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`publicClient`](BaseClient.md#publicclient) + +*** + +### registryAddress? + +> `protected` `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L8) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`registryAddress`](BaseClient.md#registryaddress) + +*** + +### superPaymasterAddress + +> **superPaymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L21) + +*** + +### tokenAddress? + +> `optional` **tokenAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L22) + +*** + +### xpntsFactory + +> **xpntsFactory**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L24) + +## Methods + +### addGasToken() + +> **addGasToken**(`token`, `price`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:409](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L409) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `token` | `` `0x${string}` `` | +| `price` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### configureOperator() + +> **configureOperator**(`xPNTsToken?`, `treasury?`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:324](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L324) + +Configure operator parameters (Token, Treasury). +Exchange rate is now read live from xPNTsToken.exchangeRate() at runtime. +If parameters are undefined, existing values are preserved. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `xPNTsToken?` | `` `0x${string}` `` | +| `treasury?` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### deployAndRegisterPaymasterV4() + +> **deployAndRegisterPaymasterV4**(`params?`, `options?`): `Promise`\<\{ `deployHash`: `` `0x${string}` ``; `paymasterAddress`: `` `0x${string}` ``; `registerHash`: `` `0x${string}` ``; \}\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L142) + +Deploy a new Paymaster V4 and Register as AOA Operator (one-stop API). +This method handles: +1. Checks prerequisites (ROLE_COMMUNITY) +2. Predicts new Paymaster address +3. Deploys Paymaster V4 via Factory +4. Registers ROLE_PAYMASTER_AOA with staking + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params?` | \{ `priceFeed?`: `` `0x${string}` ``; `salt?`: `bigint`; `stakeAmount?`: `bigint`; `version?`: `string`; \} | Deployment parameters | +| `params.priceFeed?` | `` `0x${string}` `` | - | +| `params.salt?` | `bigint` | - | +| `params.stakeAmount?` | `bigint` | - | +| `params.version?` | `string` | - | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | Transaction options | + +#### Returns + +`Promise`\<\{ `deployHash`: `` `0x${string}` ``; `paymasterAddress`: `` `0x${string}` ``; `registerHash`: `` `0x${string}` ``; \}\> + +Object containing new paymaster address and transaction hashes + +*** + +### depositCollateral() + +> **depositCollateral**(`amount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:283](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L283) + +Deposit collateral (aPNTs/GToken) to SuperPaymaster. +This is a helper method used by registerAsSuperPaymasterOperator. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `amount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getAddress`](BaseClient.md#getaddress) + +*** + +### getOperatorDetails() + +> **getOperatorDetails**(`operator?`): `Promise`\<`any`\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:372](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L372) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `operator?` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getStartPublicClient`](BaseClient.md#getstartpublicclient) + +*** + +### getTokenPrice() + +> **getTokenPrice**(`token`): `Promise`\<`bigint`\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:422](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L422) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### initiateExit() + +> **initiateExit**(`options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:382](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L382) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### isOperator() + +> **isOperator**(`operator`): `Promise`\<`boolean`\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:362](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L362) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `operator` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### registerAsSuperPaymasterOperator() + +> **registerAsSuperPaymasterOperator**(`params?`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L50) + +Register as SuperPaymaster Operator (one-stop API). +This method handles all necessary steps: +1. Checks prerequisites (must have ROLE_COMMUNITY) +2. Checks and approves GToken to GTokenStaking +3. Registers ROLE_PAYMASTER_SUPER +4. Optionally deposits collateral to SuperPaymaster + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params?` | \{ `depositAmount?`: `bigint`; `stakeAmount?`: `bigint`; \} | Registration parameters | +| `params.depositAmount?` | `bigint` | - | +| `params.stakeAmount?` | `bigint` | - | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | Transaction options | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +Transaction hash of role registration + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireEntryPoint`](BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGToken`](BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGTokenStaking`](BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requirePaymasterFactory`](BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireRegistry`](BaseClient.md#requireregistry) + +*** + +### setupPaymasterDeposit() + +> **setupPaymasterDeposit**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:431](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L431) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `amount`: `bigint`; `paymaster`: `` `0x${string}` ``; `token`: `` `0x${string}` ``; `user`: `` `0x${string}` ``; \} | +| `params.amount` | `bigint` | +| `params.paymaster?` | `` `0x${string}` `` | +| `params.token?` | `` `0x${string}` `` | +| `params.user?` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### withdrawCollateral() + +> **withdrawCollateral**(`to`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:349](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L349) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `to` | `` `0x${string}` `` | +| `amount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### withdrawStake() + +> **withdrawStake**(`to`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:393](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L393) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `to` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/ProtocolClient.md b/api/@aastar/sdk/classes/ProtocolClient.md new file mode 100644 index 000000000..5b8d48747 --- /dev/null +++ b/api/@aastar/sdk/classes/ProtocolClient.md @@ -0,0 +1,375 @@ +Defined in: [packages/operator/src/ProtocolClient.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L25) + +Client for Protocol Governors and Validators (Infrastructure) + +## Extends + +- [`BaseClient`](BaseClient.md) + +## Constructors + +### Constructor + +> **new ProtocolClient**(`config`): `ProtocolClient` + +Defined in: [packages/operator/src/ProtocolClient.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ProtocolClientConfig`](../interfaces/ProtocolClientConfig.md) | + +#### Returns + +`ProtocolClient` + +#### Overrides + +[`BaseClient`](BaseClient.md).[`constructor`](BaseClient.md#constructor) + +## Properties + +### blsAggregatorAddress? + +> `optional` **blsAggregatorAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/ProtocolClient.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L27) + +*** + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`client`](BaseClient.md#client) + +*** + +### dvtValidatorAddress + +> **dvtValidatorAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/ProtocolClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L26) + +*** + +### entryPointAddress? + +> `protected` `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L12) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`entryPointAddress`](BaseClient.md#entrypointaddress) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenAddress`](BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenStakingAddress`](BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`paymasterFactoryAddress`](BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`publicClient`](BaseClient.md#publicclient) + +*** + +### registryAddress? + +> `protected` `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L8) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`registryAddress`](BaseClient.md#registryaddress) + +*** + +### superPaymasterAddress? + +> `optional` **superPaymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/ProtocolClient.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L28) + +## Methods + +### createProposal() + +> **createProposal**(`target`, `calldata`, `description`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/ProtocolClient.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L44) + +Create a new proposal + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `target` | `` `0x${string}` `` | +| `calldata` | `` `0x${string}` `` | +| `description` | `string` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### executeWithProof() + +> **executeWithProof**(`proposalId`, `signatures`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/ProtocolClient.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L78) + +Execute a proposal with collected signatures + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `proposalId` | `bigint` | +| `signatures` | `` `0x${string}` ``[] | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getAddress`](BaseClient.md#getaddress) + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getStartPublicClient`](BaseClient.md#getstartpublicclient) + +*** + +### registerBLSKey() + +> **registerBLSKey**(`publicKey`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/ProtocolClient.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L101) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `publicKey` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireEntryPoint`](BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGToken`](BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGTokenStaking`](BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requirePaymasterFactory`](BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireRegistry`](BaseClient.md#requireregistry) + +*** + +### setProtocolFee() + +> **setProtocolFee**(`bps`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/ProtocolClient.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L123) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `bps` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setTreasury() + +> **setTreasury**(`treasury`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/ProtocolClient.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L139) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `treasury` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### signProposal() + +> **signProposal**(`proposalId`, `signature`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/operator/src/ProtocolClient.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L62) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `proposalId` | `bigint` | `undefined` | +| `signature` | `` `0x${string}` `` | `'0x'` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | `undefined` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/ProtocolGovernance.md b/api/@aastar/sdk/classes/ProtocolGovernance.md new file mode 100644 index 000000000..1aeb7b4ee --- /dev/null +++ b/api/@aastar/sdk/classes/ProtocolGovernance.md @@ -0,0 +1,380 @@ +Defined in: [packages/admin/src/ProtocolGovernance.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L20) + +ProtocolGovernance - L3 Pattern + +Responsibilities: +1. Global Protocol Parameter Management (Registry, EntryPoint) +2. High-level Governance Operations (DAO Transfer, Upgrades) +3. SuperPaymaster & Module Approval + +## Extends + +- [`BaseClient`](BaseClient.md) + +## Constructors + +### Constructor + +> **new ProtocolGovernance**(`config`): `ProtocolGovernance` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L24) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`ClientConfig`](../interfaces/ClientConfig.md) & `object` | + +#### Returns + +`ProtocolGovernance` + +#### Overrides + +[`BaseClient`](BaseClient.md).[`constructor`](BaseClient.md#constructor) + +## Properties + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`client`](BaseClient.md#client) + +*** + +### entryPointAddress + +> **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L22) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`entryPointAddress`](BaseClient.md#entrypointaddress) + +*** + +### gTokenAddress? + +> `protected` `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L9) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenAddress`](BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `protected` `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L10) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`gTokenStakingAddress`](BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`paymasterFactoryAddress`](BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`publicClient`](BaseClient.md#publicclient) + +*** + +### registryAddress + +> **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L21) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`registryAddress`](BaseClient.md#registryaddress) + +## Methods + +### configureRole() + +> **configureRole**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L95) + +Configure a Role's parameters (Admin only). +Reads the current on-chain config first, then merges the provided overrides +and writes back the full struct via configureRole. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `exitFeePercent?`: `bigint`; `minExitFee?`: `bigint`; `minStake?`: `bigint`; `roleId`: `` `0x${string}` ``; `ticketPrice?`: `bigint`; \} | +| `params.exitFeePercent?` | `bigint` | +| `params.minExitFee?` | `bigint` | +| `params.minStake?` | `bigint` | +| `params.roleId?` | `` `0x${string}` `` | +| `params.ticketPrice?` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getAddress`](BaseClient.md#getaddress) + +*** + +### getProtocolParams() + +> **getProtocolParams**(): `Promise`\<[`ProtocolParams`](../interfaces/ProtocolParams.md)\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L137) + +#### Returns + +`Promise`\<[`ProtocolParams`](../interfaces/ProtocolParams.md)\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getStartPublicClient`](BaseClient.md#getstartpublicclient) + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireEntryPoint`](BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGToken`](BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGTokenStaking`](BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requirePaymasterFactory`](BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireRegistry`](BaseClient.md#requireregistry) + +*** + +### setStaking() + +> **setStaking**(`staking`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L82) + +Set the Staking contract address + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `staking` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setSuperPaymaster() + +> **setSuperPaymaster**(`paymaster`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L71) + +Approve a new SuperPaymaster contract address + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymaster` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### setTreasury() + +> **setTreasury**(`treasury`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L40) + +Update the Global Treasury Address where protocol fees are collected + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `treasury` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### transferToDAO() + +> **transferToDAO**(`daoAddress`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L125) + +Transfer Protocol Ownership to a DAO (Multisig/Timelock) +This is the final step of "Protocol Admin" lifecycle. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `daoAddress` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### updateEntryPoint() + +> **updateEntryPoint**(`entryPoint`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/admin/src/ProtocolGovernance.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L57) + +Update the supported EntryPoint address + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `entryPoint` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/ReputationClient.md b/api/@aastar/sdk/classes/ReputationClient.md new file mode 100644 index 000000000..a01a58f3f --- /dev/null +++ b/api/@aastar/sdk/classes/ReputationClient.md @@ -0,0 +1,137 @@ +Defined in: [packages/identity/src/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L7) + +## Constructors + +### Constructor + +> **new ReputationClient**(`client`, `reputationAddress`, `walletClient?`): `ReputationClient` + +Defined in: [packages/identity/src/index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L17) + +Initialize ReputationClient + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `client` | [`PublicClient`](../interfaces/PublicClient.md) | The public client for queries | +| `reputationAddress` | `` `0x${string}` `` | The address of the reputation system contract | +| `walletClient?` | [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> | Optional wallet client for write operations | + +#### Returns + +`ReputationClient` + +## Methods + +### computeScore() + +> **computeScore**(`user`, `communities`, `ruleIds`, `activities`): `Promise`\<`bigint`\> + +Defined in: [packages/identity/src/index.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L28) + +Compute reputation score for a user + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `user` | `` `0x${string}` `` | +| `communities` | `` `0x${string}` ``[] | +| `ruleIds` | `` `0x${string}` ``[][] | +| `activities` | `bigint`[][] | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getCreditLimit() + +> **getCreditLimit**(`user`): `Promise`\<`bigint`\> + +Defined in: [packages/identity/src/index.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L58) + +Get credit limit based on reputation + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `user` | `` `0x${string}` `` | User address | + +#### Returns + +`Promise`\<`bigint`\> + +Credit limit in wei (Mock logic closely tied to Reputation) + +*** + +### getGlobalReputation() + +> **getGlobalReputation**(`user`): `Promise`\<`number`\> + +Defined in: [packages/identity/src/index.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L42) + +Get global reputation score for a user + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `user` | `` `0x${string}` `` | User address | + +#### Returns + +`Promise`\<`number`\> + +Reputation score + +*** + +### getReputationBreakdown() + +> **getReputationBreakdown**(`user`): `Promise`\<\{ `activityBonus`: `number`; `baseScore`: `number`; `penaltyDeduction`: `number`; `stakingBonus`: `number`; `total`: `number`; \}\> + +Defined in: [packages/identity/src/index.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L77) + +Get reputation score breakdown + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `user` | `` `0x${string}` `` | User address | + +#### Returns + +`Promise`\<\{ `activityBonus`: `number`; `baseScore`: `number`; `penaltyDeduction`: `number`; `stakingBonus`: `number`; `total`: `number`; \}\> + +Detailed reputation breakdown (Mock implementation awaiting contract V4) + +*** + +### submitReputationProof() + +> **submitReputationProof**(`params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/identity/src/index.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/index.ts#L101) + +Submit reputation proof (off-chain data to on-chain) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `proofData`: `string`; `proofType`: `"github"` \| `"twitter"` \| `"on-chain-activity"`; `signature`: `` `0x${string}` ``; \} | Proof parameters | +| `params.proofData` | `string` | - | +| `params.proofType` | `"github"` \| `"twitter"` \| `"on-chain-activity"` | - | +| `params.signature` | `` `0x${string}` `` | - | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +Transaction hash diff --git a/api/@aastar/sdk/classes/RequirementChecker.md b/api/@aastar/sdk/classes/RequirementChecker.md new file mode 100644 index 000000000..34a60f6da --- /dev/null +++ b/api/@aastar/sdk/classes/RequirementChecker.md @@ -0,0 +1,211 @@ +Defined in: [packages/core/src/requirementChecker.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L99) + +Requirement Checker Utility + +## Description + +Centralized validation for all role requirements + +## Example + +```typescript +const checker = new RequirementChecker(publicClient); + +// Check community launch requirements +const result = await checker.checkRequirements({ + address: userAddress, + roleId: ROLE_COMMUNITY, + requiredGToken: parseEther("33"), + requireSBT: false +}); + +if (!result.hasEnoughGToken) { + console.error(result.missingRequirements.join('\n')); +} +``` + +## Constructors + +### Constructor + +> **new RequirementChecker**(`publicClient`, `addresses?`): `RequirementChecker` + +Defined in: [packages/core/src/requirementChecker.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L100) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `publicClient` | [`PublicClient`](../interfaces/PublicClient.md) | **`Internal`** | +| `addresses?` | \{ `apnts?`: `` `0x${string}` ``; `gtoken?`: `` `0x${string}` ``; `mysbt?`: `` `0x${string}` ``; `registry?`: `` `0x${string}` ``; \} | **`Internal`** | +| `addresses.apnts?` | `` `0x${string}` `` | - | +| `addresses.gtoken?` | `` `0x${string}` `` | - | +| `addresses.mysbt?` | `` `0x${string}` `` | - | +| `addresses.registry?` | `` `0x${string}` `` | - | + +#### Returns + +`RequirementChecker` + +## Methods + +### checkAPNTsBalance() + +> **checkAPNTsBalance**(`address`, `required`): `Promise`\<\{ `balance`: `bigint`; `hasEnough`: `boolean`; \}\> + +Defined in: [packages/core/src/requirementChecker.ts:239](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L239) + +Check aPNTs balance only (shortcut) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | +| `required` | `bigint` | + +#### Returns + +`Promise`\<\{ `balance`: `bigint`; `hasEnough`: `boolean`; \}\> + +*** + +### checkGTokenBalance() + +> **checkGTokenBalance**(`address`, `required`): `Promise`\<\{ `balance`: `bigint`; `hasEnough`: `boolean`; \}\> + +Defined in: [packages/core/src/requirementChecker.ts:218](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L218) + +Check GToken balance only (shortcut) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | +| `required` | `bigint` | + +#### Returns + +`Promise`\<\{ `balance`: `bigint`; `hasEnough`: `boolean`; \}\> + +*** + +### checkHasRole() + +> **checkHasRole**(`roleId`, `address`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/requirementChecker.ts:275](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L275) + +Check if user has specific role (shortcut) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### checkHasSBT() + +> **checkHasSBT**(`address`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/requirementChecker.ts:260](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L260) + +Check if user has MySBT (shortcut) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### checkRequirements() + +> **checkRequirements**(`params`): `Promise`\<[`RoleRequirement`](../interfaces/RoleRequirement.md)\> + +Defined in: [packages/core/src/requirementChecker.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L118) + +Check all requirements for a user + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `address`: `` `0x${string}` ``; `requiredAPNTs?`: `bigint`; `requiredGToken?`: `bigint`; `requireSBT?`: `boolean`; `roleId?`: `` `0x${string}` ``; \} | Check parameters | +| `params.address` | `` `0x${string}` `` | - | +| `params.requiredAPNTs?` | `bigint` | - | +| `params.requiredGToken?` | `bigint` | - | +| `params.requireSBT?` | `boolean` | - | +| `params.roleId?` | `` `0x${string}` `` | - | + +#### Returns + +`Promise`\<[`RoleRequirement`](../interfaces/RoleRequirement.md)\> + +Detailed requirement status + +*** + +### checkResources() + +> **checkResources**(`wallet`, `mode`, `options`): `Promise`\<[`ResourceReport`](../interfaces/ResourceReport.md)\> + +Defined in: [packages/core/src/requirementChecker.ts:321](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L321) + +Aggregated readiness query for an operator onboarding mode. + +Composes the existing `check*` shortcuts into a single structured report, +so consumers (e.g. YAA) no longer need to wire each balance/role/SBT read +by hand. Each unmet requirement produces an actionable `issue` string. + +- `AOA` — independent paymaster operator: checks `ROLE_PAYMASTER_AOA` + role stake. +- `AOA+` — shared SuperPaymaster operator: checks `ROLE_PAYMASTER_SUPER` + role stake + SBT. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `wallet` | `` `0x${string}` `` | Operator address to evaluate. | +| `mode` | [`OperatorMode`](../type-aliases/OperatorMode.md) | Onboarding mode (`'AOA'` | `'AOA+'`). | +| `options` | [`CheckResourcesOptions`](../interfaces/CheckResourcesOptions.md) | Optional threshold overrides. | + +#### Returns + +`Promise`\<[`ResourceReport`](../interfaces/ResourceReport.md)\> + +A [ResourceReport](../interfaces/ResourceReport.md); `ready` is true iff `issues` is empty. + +*** + +### checkRoleStake() + +> **checkRoleStake**(`roleId`, `address`, `required`): `Promise`\<\{ `hasEnough`: `boolean`; `staked`: `bigint`; \}\> + +Defined in: [packages/core/src/requirementChecker.ts:288](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L288) + +Check a user's on-chain role stake (`getRoleStake(roleId, operator)`) (shortcut). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `address` | `` `0x${string}` `` | +| `required` | `bigint` | + +#### Returns + +`Promise`\<\{ `hasEnough`: `boolean`; `staked`: `bigint`; \}\> diff --git a/api/@aastar/sdk/classes/SepoliaFaucetAPI.md b/api/@aastar/sdk/classes/SepoliaFaucetAPI.md new file mode 100644 index 000000000..1b5b224ee --- /dev/null +++ b/api/@aastar/sdk/classes/SepoliaFaucetAPI.md @@ -0,0 +1,710 @@ +Defined in: [packages/core/src/actions/faucet.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L36) + +SepoliaFaucetAPI provides orchestration for setting up test accounts on Sepolia/Anvil. + +## Constructors + +### Constructor + +> **new SepoliaFaucetAPI**(): `SepoliaFaucetAPI` + +#### Returns + +`SepoliaFaucetAPI` + +## Methods + +### adminDepositForUser() + +> `static` **adminDepositForUser**(`adminWallet`, `publicClient`, `paymasterAddr`, `target`, `tokenAddr`, `amount`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/faucet.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L229) + +Admin mints tokens to self, approves Paymaster, and deposits FOR user. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `adminWallet.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `adminWallet.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `adminWallet.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `adminWallet.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `adminWallet.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `adminWallet.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `adminWallet.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `adminWallet.key` | `string` | A key for the client. | +| `adminWallet.name` | `string` | A name for the client. | +| `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `adminWallet.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `adminWallet.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `adminWallet.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `adminWallet.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `adminWallet.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `adminWallet.type` | `string` | The type of client. | +| `adminWallet.uid` | `string` | A unique ID for the client. | +| `adminWallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient.account` | `undefined` | The Account of the Client. | +| `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `publicClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `publicClient.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `publicClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `publicClient.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `publicClient.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `publicClient.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `publicClient.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `publicClient.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `publicClient.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `publicClient.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `publicClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `publicClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `publicClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `publicClient.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `publicClient.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `publicClient.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `publicClient.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `publicClient.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `publicClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `publicClient.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `publicClient.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `publicClient.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `publicClient.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `publicClient.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `publicClient.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `publicClient.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `publicClient.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `publicClient.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `publicClient.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `publicClient.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `publicClient.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `publicClient.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `publicClient.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `publicClient.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `publicClient.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.key` | `string` | A key for the client. | +| `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `publicClient.name` | `string` | A name for the client. | +| `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `publicClient.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `publicClient.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `publicClient.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `publicClient.type` | `string` | The type of client. | +| `publicClient.uid` | `string` | A unique ID for the client. | +| `publicClient.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `publicClient.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `publicClient.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `publicClient.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `publicClient.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `publicClient.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `publicClient.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `publicClient.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `paymasterAddr` | `` `0x${string}` `` | - | +| `target` | `` `0x${string}` `` | - | +| `tokenAddr` | `` `0x${string}` `` | - | +| `amount` | `bigint` | - | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### fundETH() + +> `static` **fundETH**(`adminWallet`, `publicClient`, `target`, `amount`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/faucet.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L99) + +Funds the target with ETH if balance is below threshold. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `adminWallet.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `adminWallet.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `adminWallet.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `adminWallet.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `adminWallet.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `adminWallet.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `adminWallet.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `adminWallet.key` | `string` | A key for the client. | +| `adminWallet.name` | `string` | A name for the client. | +| `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `adminWallet.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `adminWallet.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `adminWallet.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `adminWallet.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `adminWallet.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `adminWallet.type` | `string` | The type of client. | +| `adminWallet.uid` | `string` | A unique ID for the client. | +| `adminWallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient.account` | `undefined` | The Account of the Client. | +| `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `publicClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `publicClient.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `publicClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `publicClient.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `publicClient.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `publicClient.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `publicClient.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `publicClient.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `publicClient.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `publicClient.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `publicClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `publicClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `publicClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `publicClient.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `publicClient.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `publicClient.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `publicClient.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `publicClient.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `publicClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `publicClient.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `publicClient.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `publicClient.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `publicClient.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `publicClient.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `publicClient.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `publicClient.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `publicClient.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `publicClient.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `publicClient.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `publicClient.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `publicClient.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `publicClient.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `publicClient.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `publicClient.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `publicClient.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.key` | `string` | A key for the client. | +| `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `publicClient.name` | `string` | A name for the client. | +| `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `publicClient.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `publicClient.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `publicClient.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `publicClient.type` | `string` | The type of client. | +| `publicClient.uid` | `string` | A unique ID for the client. | +| `publicClient.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `publicClient.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `publicClient.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `publicClient.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `publicClient.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `publicClient.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `publicClient.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `publicClient.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `target` | `` `0x${string}` `` | - | +| `amount` | `bigint` | - | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### mintTestTokens() + +> `static` **mintTestTokens**(`adminWallet`, `publicClient`, `tokenAddr`, `target`, `amount`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/faucet.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L195) + +Mints tokens directly to the target. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `adminWallet.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `adminWallet.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `adminWallet.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `adminWallet.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `adminWallet.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `adminWallet.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `adminWallet.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `adminWallet.key` | `string` | A key for the client. | +| `adminWallet.name` | `string` | A name for the client. | +| `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `adminWallet.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `adminWallet.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `adminWallet.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `adminWallet.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `adminWallet.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `adminWallet.type` | `string` | The type of client. | +| `adminWallet.uid` | `string` | A unique ID for the client. | +| `adminWallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient.account` | `undefined` | The Account of the Client. | +| `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `publicClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `publicClient.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `publicClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `publicClient.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `publicClient.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `publicClient.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `publicClient.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `publicClient.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `publicClient.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `publicClient.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `publicClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `publicClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `publicClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `publicClient.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `publicClient.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `publicClient.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `publicClient.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `publicClient.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `publicClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `publicClient.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `publicClient.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `publicClient.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `publicClient.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `publicClient.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `publicClient.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `publicClient.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `publicClient.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `publicClient.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `publicClient.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `publicClient.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `publicClient.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `publicClient.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `publicClient.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `publicClient.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `publicClient.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.key` | `string` | A key for the client. | +| `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `publicClient.name` | `string` | A name for the client. | +| `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `publicClient.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `publicClient.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `publicClient.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `publicClient.type` | `string` | The type of client. | +| `publicClient.uid` | `string` | A unique ID for the client. | +| `publicClient.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `publicClient.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `publicClient.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `publicClient.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `publicClient.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `publicClient.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `publicClient.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `publicClient.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `tokenAddr` | `` `0x${string}` `` | - | +| `target` | `` `0x${string}` `` | - | +| `amount` | `bigint` | - | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### prepareTestAccount() + +> `static` **prepareTestAccount**(`adminWallet`, `publicClient`, `config`): `Promise`\<[`FaucetPreparationResult`](../type-aliases/FaucetPreparationResult.md)\> + +Defined in: [packages/core/src/actions/faucet.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L45) + +Orchestrates the complete setup for a test account. +1. Funds ETH +2. Registers ENDUSER role +3. Mints GTokens to user +4. Deposits to Paymaster V4 (if address provided) using Admin's tokens + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `adminWallet.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `adminWallet.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `adminWallet.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `adminWallet.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `adminWallet.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `adminWallet.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `adminWallet.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `adminWallet.key` | `string` | A key for the client. | +| `adminWallet.name` | `string` | A name for the client. | +| `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `adminWallet.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `adminWallet.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `adminWallet.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `adminWallet.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `adminWallet.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `adminWallet.type` | `string` | The type of client. | +| `adminWallet.uid` | `string` | A unique ID for the client. | +| `adminWallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient.account` | `undefined` | The Account of the Client. | +| `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `publicClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `publicClient.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `publicClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `publicClient.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `publicClient.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `publicClient.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `publicClient.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `publicClient.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `publicClient.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `publicClient.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `publicClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `publicClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `publicClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `publicClient.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `publicClient.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `publicClient.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `publicClient.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `publicClient.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `publicClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `publicClient.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `publicClient.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `publicClient.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `publicClient.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `publicClient.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `publicClient.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `publicClient.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `publicClient.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `publicClient.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `publicClient.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `publicClient.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `publicClient.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `publicClient.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `publicClient.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `publicClient.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `publicClient.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.key` | `string` | A key for the client. | +| `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `publicClient.name` | `string` | A name for the client. | +| `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `publicClient.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `publicClient.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `publicClient.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `publicClient.type` | `string` | The type of client. | +| `publicClient.uid` | `string` | A unique ID for the client. | +| `publicClient.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `publicClient.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `publicClient.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `publicClient.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `publicClient.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `publicClient.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `publicClient.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `publicClient.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `config` | [`FaucetConfig`](../type-aliases/FaucetConfig.md) | - | + +#### Returns + +`Promise`\<[`FaucetPreparationResult`](../type-aliases/FaucetPreparationResult.md)\> + +*** + +### registerEndUser() + +> `static` **registerEndUser**(`adminWallet`, `publicClient`, `registryAddr`, `target`, `gasToken`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/faucet.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L128) + +Registers the ENDUSER role using Sponsor Mode (Admin pays stake). + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `adminWallet` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `adminWallet.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `adminWallet.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `adminWallet.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `adminWallet.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `adminWallet.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `adminWallet.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `adminWallet.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `adminWallet.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `adminWallet.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `adminWallet.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `adminWallet.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `adminWallet.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `adminWallet.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `adminWallet.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `adminWallet.key` | `string` | A key for the client. | +| `adminWallet.name` | `string` | A name for the client. | +| `adminWallet.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `adminWallet.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `adminWallet.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `adminWallet.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `adminWallet.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `adminWallet.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `adminWallet.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `adminWallet.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `adminWallet.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `adminWallet.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `adminWallet.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `adminWallet.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `adminWallet.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `adminWallet.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `adminWallet.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `adminWallet.type` | `string` | The type of client. | +| `adminWallet.uid` | `string` | A unique ID for the client. | +| `adminWallet.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `adminWallet.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `adminWallet.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `adminWallet.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `publicClient.account` | `undefined` | The Account of the Client. | +| `publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `publicClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `publicClient.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `publicClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `publicClient.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `publicClient.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `publicClient.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `publicClient.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `publicClient.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `publicClient.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `publicClient.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `publicClient.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `publicClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `publicClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `publicClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `publicClient.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `publicClient.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `publicClient.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `publicClient.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `publicClient.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `publicClient.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `publicClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `publicClient.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `publicClient.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `publicClient.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `publicClient.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `publicClient.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `publicClient.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `publicClient.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `publicClient.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `publicClient.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `publicClient.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `publicClient.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `publicClient.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `publicClient.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `publicClient.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `publicClient.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `publicClient.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.key` | `string` | A key for the client. | +| `publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `publicClient.name` | `string` | A name for the client. | +| `publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `publicClient.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `publicClient.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `publicClient.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `publicClient.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `publicClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `publicClient.type` | `string` | The type of client. | +| `publicClient.uid` | `string` | A unique ID for the client. | +| `publicClient.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `publicClient.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `publicClient.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `publicClient.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `publicClient.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `publicClient.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `publicClient.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `publicClient.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `publicClient.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `publicClient.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `registryAddr` | `` `0x${string}` `` | - | +| `target` | `` `0x${string}` `` | - | +| `gasToken` | `` `0x${string}` `` | - | + +#### Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/sdk/classes/StateValidator.md b/api/@aastar/sdk/classes/StateValidator.md new file mode 100644 index 000000000..acd8b1f7d --- /dev/null +++ b/api/@aastar/sdk/classes/StateValidator.md @@ -0,0 +1,117 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L44) + +## Constructors + +### Constructor + +> **new StateValidator**(): `StateValidator` + +#### Returns + +`StateValidator` + +## Methods + +### getAccountBalances() + +> `static` **getAccountBalances**(`params`): `Promise`\<[`AccountBalance`](../interfaces/AccountBalance.md)[]\> + +Defined in: [packages/core/src/actions/StateValidator.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L58) + +Batch fetch balances for multiple accounts + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `addresses`: `` `0x${string}` ``[]; `aPNTsAddress?`: `` `0x${string}` ``; `chain`: [`Chain`](https://viem.sh/docs/index.html); `gTokenAddress?`: `` `0x${string}` ``; `rpcUrl`: `string`; `xPNTsAddress?`: `` `0x${string}` ``; \} | +| `params.addresses` | `` `0x${string}` ``[] | +| `params.aPNTsAddress?` | `` `0x${string}` `` | +| `params.chain` | [`Chain`](https://viem.sh/docs/index.html) | +| `params.gTokenAddress?` | `` `0x${string}` `` | +| `params.rpcUrl` | `string` | +| `params.xPNTsAddress?` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<[`AccountBalance`](../interfaces/AccountBalance.md)[]\> + +*** + +### validateDeployment() + +> `static` **validateDeployment**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +Defined in: [packages/core/src/actions/StateValidator.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L232) + +Deployment Validation + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`DeploymentValidationParams`](../interfaces/DeploymentValidationParams.md) | + +#### Returns + +`Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +*** + +### validateETHBalance() + +> `static` **validateETHBalance**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +Defined in: [packages/core/src/actions/StateValidator.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L153) + +ETH Balance Validation + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`BalanceValidationParams`](../interfaces/BalanceValidationParams.md) | + +#### Returns + +`Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +*** + +### validateRole() + +> `static` **validateRole**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +Defined in: [packages/core/src/actions/StateValidator.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L114) + +Role Validation + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`RoleValidationParams`](../interfaces/RoleValidationParams.md) | + +#### Returns + +`Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +*** + +### validateTokenBalance() + +> `static` **validateTokenBalance**(`params`): `Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> + +Defined in: [packages/core/src/actions/StateValidator.ts:189](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L189) + +Token Balance Validation + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`TokenBalanceValidationParams`](../interfaces/TokenBalanceValidationParams.md) | + +#### Returns + +`Promise`\<[`ValidationResult`](../interfaces/ValidationResult.md)\> diff --git a/api/@aastar/sdk/classes/SuperPaymasterAdminClient.md b/api/@aastar/sdk/classes/SuperPaymasterAdminClient.md new file mode 100644 index 000000000..ace6fd3d3 --- /dev/null +++ b/api/@aastar/sdk/classes/SuperPaymasterAdminClient.md @@ -0,0 +1,143 @@ +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L95) + +Admin Client for SuperPaymaster V3 + +## Constructors + +### Constructor + +> **new SuperPaymasterAdminClient**(`client`, `paymasterAddress`): `SuperPaymasterAdminClient` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L99) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `paymasterAddress` | `` `0x${string}` `` | + +#### Returns + +`SuperPaymasterAdminClient` + +## Methods + +### getOperator() + +> **getOperator**(`operator`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L104) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `operator` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### configureOperator() + +> `static` **configureOperator**(`wallet`, `paymaster`, `token`, `treasury`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L113) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `paymaster` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `treasury` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### setAPNTsToken() + +> `static` **setAPNTsToken**(`wallet`, `paymaster`, `token`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L148) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `paymaster` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### setOperatorPaused() + +> `static` **setOperatorPaused**(`wallet`, `paymaster`, `operator`, `paused`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L128) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `paymaster` | `` `0x${string}` `` | +| `operator` | `` `0x${string}` `` | +| `paused` | `boolean` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### setXPNTsFactory() + +> `static` **setXPNTsFactory**(`wallet`, `paymaster`, `factory`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L158) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `paymaster` | `` `0x${string}` `` | +| `factory` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### updateReputation() + +> `static` **updateReputation**(`wallet`, `paymaster`, `operator`, `score`): `Promise`\<`any`\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L138) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `wallet` | `any` | +| `paymaster` | `` `0x${string}` `` | +| `operator` | `` `0x${string}` `` | +| `score` | `bigint` | + +#### Returns + +`Promise`\<`any`\> diff --git a/api/@aastar/sdk/classes/SuperPaymasterClient.md b/api/@aastar/sdk/classes/SuperPaymasterClient.md new file mode 100644 index 000000000..796a106fd --- /dev/null +++ b/api/@aastar/sdk/classes/SuperPaymasterClient.md @@ -0,0 +1,30 @@ +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L20) + +SuperPaymasterClient +High-level API for SuperPaymaster operations, including dynamic gas estimation. + +## Methods + +### submitGaslessTransaction() + +> `static` **submitGaslessTransaction**(`client`, `wallet`, `aaAddress`, `entryPoint`, `bundlerUrl`, `config`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L32) + +Submit a gasless transaction using SuperPaymaster. +Automatically handles gas estimation with a smart efficiency buffer. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `wallet` | `any` | +| `aaAddress` | `` `0x${string}` `` | +| `entryPoint` | `` `0x${string}` `` | +| `bundlerUrl` | `string` | +| `config` | [`GaslessTransactionConfig`](../type-aliases/GaslessTransactionConfig.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/UserClient.md b/api/@aastar/sdk/classes/UserClient.md new file mode 100644 index 000000000..556aa9a04 --- /dev/null +++ b/api/@aastar/sdk/classes/UserClient.md @@ -0,0 +1,583 @@ +Defined in: [packages/enduser/src/UserClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L17) + +## Extends + +- [`BaseClient`](BaseClient.md) + +## Constructors + +### Constructor + +> **new UserClient**(`config`): `UserClient` + +Defined in: [packages/enduser/src/UserClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`UserClientConfig`](../interfaces/UserClientConfig.md) | + +#### Returns + +`UserClient` + +#### Overrides + +[`BaseClient`](BaseClient.md).[`constructor`](BaseClient.md#constructor) + +## Properties + +### accountAddress + +> **accountAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L18) + +*** + +### bundlerClient? + +> `optional` **bundlerClient**: `any` + +Defined in: [packages/enduser/src/UserClient.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L24) + +*** + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`client`](BaseClient.md#client) + +*** + +### entryPointAddress? + +> `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L20) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`entryPointAddress`](BaseClient.md#entrypointaddress) + +*** + +### gTokenAddress? + +> `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L23) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`gTokenAddress`](BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L21) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`gTokenStakingAddress`](BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`paymasterFactoryAddress`](BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`publicClient`](BaseClient.md#publicclient) + +*** + +### registryAddress? + +> `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L22) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`registryAddress`](BaseClient.md#registryaddress) + +*** + +### sbtAddress? + +> `optional` **sbtAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L19) + +## Methods + +### execute() + +> **execute**(`target`, `value`, `data`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L155) + +Execute a transaction from the AA account + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `target` | `` `0x${string}` `` | +| `value` | `bigint` | +| `data` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### executeBatch() + +> **executeBatch**(`targets`, `values`, `datas`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L174) + +Execute a batch of transactions + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `targets` | `` `0x${string}` ``[] | +| `values` | `bigint`[] | +| `datas` | `` `0x${string}` ``[] | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### executeGasless() + +> **executeGasless**(`params`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:441](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L441) + +Execute a transaction with Gasless Sponsorship + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `data`: `` `0x${string}` ``; `maxRate?`: `bigint`; `operator?`: `` `0x${string}` ``; `paymaster`: `` `0x${string}` ``; `paymasterType`: `"V4"` \| `"Super"`; `target`: `` `0x${string}` ``; `value`: `bigint`; \} | +| `params.data` | `` `0x${string}` `` | +| `params.maxRate?` | `bigint` | +| `params.operator?` | `` `0x${string}` `` | +| `params.paymaster?` | `` `0x${string}` `` | +| `params.paymasterType?` | `"V4"` \| `"Super"` | +| `params.target?` | `` `0x${string}` `` | +| `params.value?` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### exitRole() + +> **exitRole**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:320](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L320) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getAddress`](BaseClient.md#getaddress) + +*** + +### getNonce() + +> **getNonce**(`key`): `Promise`\<`bigint`\> + +Defined in: [packages/enduser/src/UserClient.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L125) + +Get the nonce of the account from EntryPoint (more reliable for 4337) + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `key` | `bigint` | `0n` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getOwner() + +> **getOwner**(): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L143) + +Get the owner of the AA account + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getSBTBalance() + +> **getSBTBalance**(): `Promise`\<`bigint`\> + +Defined in: [packages/enduser/src/UserClient.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L196) + +Get user's SBT balance + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getStakedBalance() + +> **getStakedBalance**(`roleId`): `Promise`\<`bigint`\> + +Defined in: [packages/enduser/src/UserClient.ts:302](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L302) + +Get staked balance for a specific role + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getStartPublicClient`](BaseClient.md#getstartpublicclient) + +*** + +### getTokenBalance() + +> **getTokenBalance**(`token`): `Promise`\<`bigint`\> + +Defined in: [packages/enduser/src/UserClient.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L248) + +Get Token Balance + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `token` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### leaveCommunity() + +> **leaveCommunity**(`community`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:337](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L337) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `community` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### mintSBT() + +> **mintSBT**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:209](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L209) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### registerAsEndUser() + +> **registerAsEndUser**(`communityAddress`, `stakeAmount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:358](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L358) + +Register as EndUser (One-click: Approve + Register) +Handles GToken approval to Staking contract and Role registration. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `communityAddress` | `` `0x${string}` `` | +| `stakeAmount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireEntryPoint`](BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGToken`](BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGTokenStaking`](BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requirePaymasterFactory`](BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireRegistry`](BaseClient.md#requireregistry) + +*** + +### stakeForRole() + +> **stakeForRole**(`roleId`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L265) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `amount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### transferToken() + +> **transferToken**(`token`, `to`, `amount`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:230](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L230) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `token` | `` `0x${string}` `` | +| `to` | `` `0x${string}` `` | +| `amount` | `bigint` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### unstakeFromRole() + +> **unstakeFromRole**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserClient.ts:282](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L282) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### deployAccount() + +> `static` **deployAccount**(`client`, `params`): `Promise`\<\{ `accountAddress`: `` `0x${string}` ``; `hash`: `` `0x${string}` ``; \}\> + +Defined in: [packages/enduser/src/UserClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L45) + +Deploy a new Smart Account (Supports multiple factory types) +Static helper to facilitate onboarding before instantiating the UserClient. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `client` | `any` | WalletClient to sign the deployment transaction | +| `params` | \{ `accountType?`: `string`; `customAbi?`: `any`; `factoryAddress?`: `` `0x${string}` ``; `owner`: `` `0x${string}` ``; `publicClient?`: `any`; `salt?`: `bigint`; \} | Deployment parameters | +| `params.accountType?` | `string` | - | +| `params.customAbi?` | `any` | - | +| `params.factoryAddress?` | `` `0x${string}` `` | - | +| `params.owner` | `` `0x${string}` `` | - | +| `params.publicClient?` | `any` | - | +| `params.salt?` | `bigint` | - | + +#### Returns + +`Promise`\<\{ `accountAddress`: `` `0x${string}` ``; `hash`: `` `0x${string}` ``; \}\> + +Object containing the deployed account address and transaction hash diff --git a/api/@aastar/sdk/classes/UserLifecycle.md b/api/@aastar/sdk/classes/UserLifecycle.md new file mode 100644 index 000000000..b06dfc6dd --- /dev/null +++ b/api/@aastar/sdk/classes/UserLifecycle.md @@ -0,0 +1,451 @@ +Defined in: [packages/enduser/src/UserLifecycle.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L40) + +UserLifecycle - L3 Pattern + +Responsibilities: +1. Managing the complete lifecycle of an End User (Onboard -> Operate -> Exit) +2. Providing a unified interface for Gasless operations +3. Abstracting underlying contract interactions via L2 Actions + +## Extends + +- [`BaseClient`](BaseClient.md) + +## Constructors + +### Constructor + +> **new UserLifecycle**(`config`): `UserLifecycle` + +Defined in: [packages/enduser/src/UserLifecycle.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L51) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`UserLifecycleConfig`](../interfaces/UserLifecycleConfig.md) | + +#### Returns + +`UserLifecycle` + +#### Overrides + +[`BaseClient`](BaseClient.md).[`constructor`](BaseClient.md#constructor) + +## Properties + +### accountAddress + +> **accountAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L41) + +*** + +### client + +> **client**: [`WalletClient`](../interfaces/WalletClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L6) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`client`](BaseClient.md#client) + +*** + +### config + +> **config**: [`UserLifecycleConfig`](../interfaces/UserLifecycleConfig.md) + +Defined in: [packages/enduser/src/UserLifecycle.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L49) + +*** + +### entryPointAddress + +> **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L46) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`entryPointAddress`](BaseClient.md#entrypointaddress) + +*** + +### gaslessConfig? + +> `optional` **gaslessConfig**: [`GaslessConfig`](../interfaces/GaslessConfig.md) + +Defined in: [packages/enduser/src/UserLifecycle.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L47) + +*** + +### gTokenAddress + +> **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L44) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`gTokenAddress`](BaseClient.md#gtokenaddress) + +*** + +### gTokenStakingAddress + +> **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L45) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`gTokenStakingAddress`](BaseClient.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `protected` `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L11) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`paymasterFactoryAddress`](BaseClient.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients/BaseClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L7) + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`publicClient`](BaseClient.md#publicclient) + +*** + +### registryAddress + +> **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L42) + +#### Overrides + +[`BaseClient`](BaseClient.md).[`registryAddress`](BaseClient.md#registryaddress) + +*** + +### sbtAddress + +> **sbtAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L43) + +## Methods + +### checkEligibility() + +> **checkEligibility**(`community`): `Promise`\<`boolean`\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L71) + +Check if user is eligible to join a community + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `community` | `` `0x${string}` `` | Address of the community | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### claimSBT() + +> **claimSBT**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L170) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### enableGasless() + +> **enableGasless**(`config`): `Promise`\<`void`\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L123) + +Enable or update Gasless configuration + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`GaslessConfig`](../interfaces/GaslessConfig.md) | + +#### Returns + +`Promise`\<`void`\> + +*** + +### executeGaslessTx() + +> **executeGaslessTx**(`params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L135) + +Execute a transaction effectively using Gasless configuration if available + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `data`: `` `0x${string}` ``; `operator?`: `` `0x${string}` ``; `target`: `` `0x${string}` ``; `value`: `bigint`; \} | +| `params.data` | `` `0x${string}` `` | +| `params.operator?` | `` `0x${string}` `` | +| `params.target` | `` `0x${string}` `` | +| `params.value` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### exitRole() + +> **exitRole**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L217) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### getAddress() + +> **getAddress**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L34) + +Get the account address of the connected wallet + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getAddress`](BaseClient.md#getaddress) + +*** + +### getCreditLimit() + +> **getCreditLimit**(): `Promise`\<`bigint`\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:199](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L199) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getMyReputation() + +> **getMyReputation**(): `Promise`\<[`ReputationData`](../interfaces/ReputationData.md)\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L183) + +#### Returns + +`Promise`\<[`ReputationData`](../interfaces/ReputationData.md)\> + +*** + +### getStartPublicClient() + +> **getStartPublicClient**(): [`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +Defined in: [packages/core/src/clients/BaseClient.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L41) + +Helper to ensure public client exists or fallback to wallet client (if it supports read) + +#### Returns + +[`PublicClient`](../interfaces/PublicClient.md) \| [`WalletClient`](../interfaces/WalletClient.md)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`getStartPublicClient`](BaseClient.md#getstartpublicclient) + +*** + +### leaveCommunity() + +> **leaveCommunity**(`community`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:208](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L208) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `community` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### onboard() + +> **onboard**(`community`, `stakeAmount`): `Promise`\<[`OnboardResult`](../interfaces/OnboardResult.md)\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L84) + +One-click Onboarding: Approve -> Stake -> Register -> Mint SBT + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `community` | `` `0x${string}` `` | Address of the community to join | +| `stakeAmount` | `bigint` | Amount of GToken to stake (default 0.4 GT) | + +#### Returns + +`Promise`\<[`OnboardResult`](../interfaces/OnboardResult.md)\> + +*** + +### requireEntryPoint() + +> `protected` **requireEntryPoint**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L73) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireEntryPoint`](BaseClient.md#requireentrypoint) + +*** + +### requireGToken() + +> `protected` **requireGToken**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L52) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGToken`](BaseClient.md#requiregtoken) + +*** + +### requireGTokenStaking() + +> `protected` **requireGTokenStaking**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L59) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireGTokenStaking`](BaseClient.md#requiregtokenstaking) + +*** + +### requirePaymasterFactory() + +> `protected` **requirePaymasterFactory**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L66) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requirePaymasterFactory`](BaseClient.md#requirepaymasterfactory) + +*** + +### requireRegistry() + +> `protected` **requireRegistry**(): `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BaseClient.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BaseClient.ts#L45) + +#### Returns + +`` `0x${string}` `` + +#### Inherited from + +[`BaseClient`](BaseClient.md).[`requireRegistry`](BaseClient.md#requireregistry) + +*** + +### unstakeAll() + +> **unstakeAll**(`roleId`, `options?`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/enduser/src/UserLifecycle.ts:226](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L226) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleId` | `` `0x${string}` `` | +| `options?` | [`TransactionOptions`](../interfaces/TransactionOptions.md) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/classes/UserOpClient.md b/api/@aastar/sdk/classes/UserOpClient.md new file mode 100644 index 000000000..48318bf45 --- /dev/null +++ b/api/@aastar/sdk/classes/UserOpClient.md @@ -0,0 +1,72 @@ +Defined in: [packages/account/src/index.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L40) + +UserOperation Client for handling high-level flows + +## Constructors + +### Constructor + +> **new UserOpClient**(): `UserOpClient` + +#### Returns + +`UserOpClient` + +## Methods + +### estimateGas() + +> `static` **estimateGas**(`bundler`, `op`, `entryPoint`): `Promise`\<`any`\> + +Defined in: [packages/account/src/index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L41) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `bundler` | `any` | +| `op` | `any` | +| `entryPoint` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### getReceipt() + +> `static` **getReceipt**(`bundler`, `hash`): `Promise`\<`any`\> + +Defined in: [packages/account/src/index.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `bundler` | `any` | +| `hash` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> + +*** + +### sendUserOp() + +> `static` **sendUserOp**(`bundler`, `op`, `entryPoint`): `Promise`\<`any`\> + +Defined in: [packages/account/src/index.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `bundler` | `any` | +| `op` | `any` | +| `entryPoint` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`any`\> diff --git a/api/@aastar/sdk/classes/UserOpScenarioBuilder.md b/api/@aastar/sdk/classes/UserOpScenarioBuilder.md new file mode 100644 index 000000000..0e5cae1d1 --- /dev/null +++ b/api/@aastar/sdk/classes/UserOpScenarioBuilder.md @@ -0,0 +1,32 @@ +Defined in: [packages/sdk/src/utils/testScenarios.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L30) + +## Constructors + +### Constructor + +> **new UserOpScenarioBuilder**(): `UserOpScenarioBuilder` + +#### Returns + +`UserOpScenarioBuilder` + +## Methods + +### buildTransferScenario() + +> `static` **buildTransferScenario**(`type`, `params`): `Promise`\<\{ `opHash`: `` `0x${string}` ``; `userOp`: `any`; \}\> + +Defined in: [packages/sdk/src/utils/testScenarios.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L34) + +Builds a signed PackedUserOperation for a token transfer based on the specified scenario. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `type` | [`UserOpScenarioType`](../enumerations/UserOpScenarioType.md) | +| `params` | [`ScenarioParams`](../interfaces/ScenarioParams.md) | + +#### Returns + +`Promise`\<\{ `opHash`: `` `0x${string}` ``; `userOp`: `any`; \}\> diff --git a/api/@aastar/sdk/classes/UserOperationBuilder.md b/api/@aastar/sdk/classes/UserOperationBuilder.md new file mode 100644 index 000000000..cccca348e --- /dev/null +++ b/api/@aastar/sdk/classes/UserOperationBuilder.md @@ -0,0 +1,272 @@ +Defined in: [packages/sdk/src/utils/userOp.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L31) + +## Constructors + +### Constructor + +> **new UserOperationBuilder**(): `UserOperationBuilder` + +#### Returns + +`UserOperationBuilder` + +## Methods + +### estimatePreVerificationGasV07() + +> `static` **estimatePreVerificationGasV07**(`userOp`): `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L52) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | \{ `accountGasLimits`: `` `0x${string}` ``; `callData`: `` `0x${string}` ``; `gasFees`: `` `0x${string}` ``; `initCode`: `` `0x${string}` ``; `nonce`: `string` \| `number` \| `bigint`; `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `string` \| `number` \| `bigint`; `sender`: `` `0x${string}` ``; `signature`: `` `0x${string}` ``; \} | +| `userOp.accountGasLimits` | `` `0x${string}` `` | +| `userOp.callData` | `` `0x${string}` `` | +| `userOp.gasFees` | `` `0x${string}` `` | +| `userOp.initCode` | `` `0x${string}` `` | +| `userOp.nonce` | `string` \| `number` \| `bigint` | +| `userOp.paymasterAndData` | `` `0x${string}` `` | +| `userOp.preVerificationGas` | `string` \| `number` \| `bigint` | +| `userOp.sender` | `` `0x${string}` `` | +| `userOp.signature` | `` `0x${string}` `` | + +#### Returns + +`bigint` + +*** + +### getUserOpHash() + +> `static` **getUserOpHash**(`__namedParameters`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/sdk/src/utils/userOp.ts:152](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L152) + +Computes the UserOperation hash for signing. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `__namedParameters` | \{ `chainId`: `number`; `entryPoint`: `` `0x${string}` ``; `publicClient`: \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \}; `userOp`: [`PackedUserOperation`](../interfaces/PackedUserOperation.md); \} | - | +| `__namedParameters.chainId` | `number` | - | +| `__namedParameters.entryPoint` | `` `0x${string}` `` | - | +| `__namedParameters.publicClient` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `__namedParameters.publicClient.account` | `undefined` | The Account of the Client. | +| `__namedParameters.publicClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `__namedParameters.publicClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `__namedParameters.publicClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `__namedParameters.publicClient.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `__namedParameters.publicClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `__namedParameters.publicClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `__namedParameters.publicClient.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `__namedParameters.publicClient.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `__namedParameters.publicClient.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `__namedParameters.publicClient.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `__namedParameters.publicClient.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `__namedParameters.publicClient.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `__namedParameters.publicClient.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `__namedParameters.publicClient.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `__namedParameters.publicClient.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `__namedParameters.publicClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `__namedParameters.publicClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `__namedParameters.publicClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `__namedParameters.publicClient.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `__namedParameters.publicClient.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `__namedParameters.publicClient.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `__namedParameters.publicClient.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `__namedParameters.publicClient.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `__namedParameters.publicClient.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `__namedParameters.publicClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `__namedParameters.publicClient.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `__namedParameters.publicClient.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `__namedParameters.publicClient.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `__namedParameters.publicClient.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `__namedParameters.publicClient.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `__namedParameters.publicClient.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `__namedParameters.publicClient.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `__namedParameters.publicClient.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `__namedParameters.publicClient.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `__namedParameters.publicClient.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `__namedParameters.publicClient.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `__namedParameters.publicClient.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `__namedParameters.publicClient.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `__namedParameters.publicClient.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `__namedParameters.publicClient.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `__namedParameters.publicClient.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `__namedParameters.publicClient.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `__namedParameters.publicClient.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `__namedParameters.publicClient.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `__namedParameters.publicClient.key` | `string` | A key for the client. | +| `__namedParameters.publicClient.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `__namedParameters.publicClient.name` | `string` | A name for the client. | +| `__namedParameters.publicClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `__namedParameters.publicClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `__namedParameters.publicClient.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `__namedParameters.publicClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `__namedParameters.publicClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `__namedParameters.publicClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `__namedParameters.publicClient.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `__namedParameters.publicClient.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `__namedParameters.publicClient.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `__namedParameters.publicClient.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `__namedParameters.publicClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `__namedParameters.publicClient.type` | `string` | The type of client. | +| `__namedParameters.publicClient.uid` | `string` | A unique ID for the client. | +| `__namedParameters.publicClient.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `__namedParameters.publicClient.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `__namedParameters.publicClient.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `__namedParameters.publicClient.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `__namedParameters.publicClient.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `__namedParameters.publicClient.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `__namedParameters.publicClient.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `__namedParameters.publicClient.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `__namedParameters.publicClient.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `__namedParameters.publicClient.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `__namedParameters.publicClient.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `__namedParameters.userOp` | [`PackedUserOperation`](../interfaces/PackedUserOperation.md) | - | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### jsonifyUserOp() + +> `static` **jsonifyUserOp**(`userOp`): `any` + +Defined in: [packages/sdk/src/utils/userOp.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L193) + +Formats a PackedUserOperation into a JSON-RPC compatible object with hex-encoded strings. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `any` | + +#### Returns + +`any` + +*** + +### packAccountGasLimits() + +> `static` **packAccountGasLimits**(`verificationGasLimit`, `callGasLimit`): `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L35) + +Packs verificationGasLimit and callGasLimit into a bytes32 Hex string. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `verificationGasLimit` | `bigint` | +| `callGasLimit` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +*** + +### packGasFees() + +> `static` **packGasFees**(`maxPriorityFeePerGas`, `maxFeePerGas`): `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L45) + +Packs maxPriorityFeePerGas and maxFeePerGas into a bytes32 Hex string. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `maxPriorityFeePerGas` | `bigint` | +| `maxFeePerGas` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +*** + +### packPaymasterAndData() + +> `static` **packPaymasterAndData**(`paymaster`, `paymasterGasLimit`, `paymasterPostOpGasLimit`, `paymasterData`): `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L104) + +Packs Paymaster parameters into the v0.7 paymasterAndData format. + +#### Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `paymaster` | `` `0x${string}` `` | `undefined` | +| `paymasterGasLimit` | `bigint` | `undefined` | +| `paymasterPostOpGasLimit` | `bigint` | `undefined` | +| `paymasterData` | `` `0x${string}` `` | `'0x'` | + +#### Returns + +`` `0x${string}` `` + +*** + +### packPaymasterV4DepositData() + +> `static` **packPaymasterV4DepositData**(`paymaster`, `paymasterVerificationGasLimit`, `paymasterPostOpGasLimit`, `paymentToken`, `validUntil`, `validAfter`): `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L131) + +Pack PaymasterV4 Deposit-Only paymasterAndData + +v0.7 EntryPoint packs: [paymaster(20)][verificationGas(16)][postOpGas(16)][paymasterData] +Contract extracts token at offset 52 = paymasterData[0:20] + +So paymasterData format must be: [token(20)][validUntil(6)][validAfter(6)] + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `paymaster` | `` `0x${string}` `` | Paymaster address (20 bytes) | +| `paymasterVerificationGasLimit` | `bigint` | - | +| `paymasterPostOpGasLimit` | `bigint` | - | +| `paymentToken` | `` `0x${string}` `` | ERC20 token address (20 bytes, FIRST in paymasterData!) | +| `validUntil` | `bigint` | Validity end timestamp (6 bytes) | +| `validAfter` | `bigint` | Validity start timestamp (6 bytes) | + +#### Returns + +`` `0x${string}` `` + +*** + +### toAlchemyUserOperation() + +> `static` **toAlchemyUserOperation**(`userOp`, `options?`): `any` + +Defined in: [packages/sdk/src/utils/userOp.ts:234](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L234) + +Converts a PackedUserOperation to the Alchemy-specific v0.7 JSON format. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `userOp` | `any` | The packed UserOperation | +| `options?` | \{ `paymasterPostOpGasLimit?`: `bigint`; `paymasterVerificationGasLimit?`: `bigint`; \} | Optional configuration | +| `options.paymasterPostOpGasLimit?` | `bigint` | Gas limit for paymaster postOp (default: 200000) | +| `options.paymasterVerificationGasLimit?` | `bigint` | Gas limit for paymaster verification (default: 200000) | + +#### Returns + +`any` diff --git a/api/@aastar/sdk/classes/X402Client.md b/api/@aastar/sdk/classes/X402Client.md new file mode 100644 index 000000000..f2b11a5b5 --- /dev/null +++ b/api/@aastar/sdk/classes/X402Client.md @@ -0,0 +1,181 @@ +Defined in: [packages/x402/src/X402Client.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L40) + +## Constructors + +### Constructor + +> **new X402Client**(`config`): `X402Client` + +Defined in: [packages/x402/src/X402Client.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`X402ClientConfig`](../type-aliases/X402ClientConfig.md) | + +#### Returns + +`X402Client` + +## Methods + +### checkNonce() + +> **checkNonce**(`nonce`): `Promise`\<`boolean`\> + +Defined in: [packages/x402/src/X402Client.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L154) + +Check if a nonce has been used. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `nonce` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### createPayment() + +> **createPayment**(`params`): `Promise`\<\{ `encoded`: `string`; `nonce`: `` `0x${string}` ``; `payload`: [`PaymentPayload`](../type-aliases/PaymentPayload.md); \}\> + +Defined in: [packages/x402/src/X402Client.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L61) + +Create a signed payment payload (EIP-3009 TransferWithAuthorization). +Returns a base64-encoded PaymentPayload ready for PAYMENT-SIGNATURE header. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`X402PaymentParams`](../type-aliases/X402PaymentParams.md) | + +#### Returns + +`Promise`\<\{ `encoded`: `string`; `nonce`: `` `0x${string}` ``; `payload`: [`PaymentPayload`](../type-aliases/PaymentPayload.md); \}\> + +*** + +### getQuote() + +> **getQuote**(): `Promise`\<\{ `feeBPS`: `bigint`; \}\> + +Defined in: [packages/x402/src/X402Client.ts:146](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L146) + +Get facilitator fee quote from on-chain contract. + +#### Returns + +`Promise`\<\{ `feeBPS`: `bigint`; \}\> + +*** + +### settleDirectOnChain() + +> **settleDirectOnChain**(`params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/X402Client.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L134) + +Settle payment on-chain via direct transfer (for xPNTs and pre-approved tokens). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `amount`: `bigint`; `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; \} | +| `params.amount` | `bigint` | +| `params.asset` | `` `0x${string}` `` | +| `params.from` | `` `0x${string}` `` | +| `params.nonce` | `` `0x${string}` `` | +| `params.to` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### settleOnChain() + +> **settleOnChain**(`params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/X402Client.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L121) + +Settle payment on-chain via SuperPaymaster (self-facilitated). +Uses EIP-3009 transferWithAuthorization path. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `amount`: `bigint`; `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `signature`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `validAfter`: `bigint`; `validBefore`: `bigint`; \} | +| `params.amount` | `bigint` | +| `params.asset` | `` `0x${string}` `` | +| `params.from` | `` `0x${string}` `` | +| `params.nonce` | `` `0x${string}` `` | +| `params.signature` | `` `0x${string}` `` | +| `params.to` | `` `0x${string}` `` | +| `params.validAfter` | `bigint` | +| `params.validBefore` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### settleViaFacilitator() + +> **settleViaFacilitator**(`payload`, `requirements`): `Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +Defined in: [packages/x402/src/X402Client.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L162) + +Settle via external facilitator (Coinbase, self-hosted, etc.). +Requires facilitator config in constructor. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `payload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | +| `requirements` | [`PaymentRequirements`](../type-aliases/PaymentRequirements.md) | + +#### Returns + +`Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +*** + +### x402Fetch() + +> **x402Fetch**(`url`, `init?`): `Promise`\<`Response`\> + +Defined in: [packages/x402/src/X402Client.ts:182](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L182) + +x402-aware fetch wrapper. +Automatically handles 402 → sign → retry flow per x402 v2 spec. + +Pattern from: @x402/fetch wrapFetchWithPayment + +Flow: +1. Make initial request +2. If 402, extract PaymentRequired from PAYMENT-REQUIRED header +3. Select best payment option (applies policy: max amount check) +4. Sign EIP-3009 authorization +5. Retry with PAYMENT-SIGNATURE header + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `url` | `string` | +| `init?` | `RequestInit` | + +#### Returns + +`Promise`\<`Response`\> diff --git a/api/@aastar/sdk/enumerations/AuthorizationState.md b/api/@aastar/sdk/enumerations/AuthorizationState.md new file mode 100644 index 000000000..27c1fc687 --- /dev/null +++ b/api/@aastar/sdk/enumerations/AuthorizationState.md @@ -0,0 +1,25 @@ +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L6) + +## Enumeration Members + +### Canceled + +> **Canceled**: `2` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L9) + +*** + +### Unused + +> **Unused**: `0` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L7) + +*** + +### Used + +> **Used**: `1` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L8) diff --git a/api/@aastar/sdk/enumerations/EntryPointVersion.md b/api/@aastar/sdk/enumerations/EntryPointVersion.md new file mode 100644 index 000000000..7b221956f --- /dev/null +++ b/api/@aastar/sdk/enumerations/EntryPointVersion.md @@ -0,0 +1,17 @@ +Defined in: [packages/core/src/actions/entryPoint.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L6) + +## Enumeration Members + +### V06 + +> **V06**: `"0.6"` + +Defined in: [packages/core/src/actions/entryPoint.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L7) + +*** + +### V07 + +> **V07**: `"0.7"` + +Defined in: [packages/core/src/actions/entryPoint.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L8) diff --git a/api/@aastar/sdk/enumerations/NodeType.md b/api/@aastar/sdk/enumerations/NodeType.md new file mode 100644 index 000000000..c1dfa107c --- /dev/null +++ b/api/@aastar/sdk/enumerations/NodeType.md @@ -0,0 +1,33 @@ +Defined in: [packages/core/src/communities.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L8) + +## Enumeration Members + +### ANODE + +> **ANODE**: `2` + +Defined in: [packages/core/src/communities.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L11) + +*** + +### KMS + +> **KMS**: `3` + +Defined in: [packages/core/src/communities.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L12) + +*** + +### PAYMASTER\_AOA + +> **PAYMASTER\_AOA**: `0` + +Defined in: [packages/core/src/communities.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L9) + +*** + +### PAYMASTER\_SUPER + +> **PAYMASTER\_SUPER**: `1` + +Defined in: [packages/core/src/communities.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L10) diff --git a/api/@aastar/sdk/enumerations/PolicyDecision.md b/api/@aastar/sdk/enumerations/PolicyDecision.md new file mode 100644 index 000000000..d58edbef1 --- /dev/null +++ b/api/@aastar/sdk/enumerations/PolicyDecision.md @@ -0,0 +1,32 @@ +Defined in: [packages/core/src/actions/policyRegistry.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L14) + +Tri-state result of a validation-time policy read (checkPolicy). +Mirrors `IPolicyRegistry.PolicyDecision` (the on-chain `uint8` enum): + 0 ALLOW — proceed with normal single-signature validation. + 1 REQUIRE_DVT — within the hard ceiling but past a configured DVT trigger; the + consumer MUST additionally verify a >=threshold DVT BLS co-sign. + 2 REJECT — frozen sender, over a hard cap / daily limit, or off-allowlist. + +## Enumeration Members + +### ALLOW + +> **ALLOW**: `0` + +Defined in: [packages/core/src/actions/policyRegistry.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L15) + +*** + +### REJECT + +> **REJECT**: `2` + +Defined in: [packages/core/src/actions/policyRegistry.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L17) + +*** + +### REQUIRE\_DVT + +> **REQUIRE\_DVT**: `1` + +Defined in: [packages/core/src/actions/policyRegistry.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L16) diff --git a/api/@aastar/sdk/enumerations/ProposalState.md b/api/@aastar/sdk/enumerations/ProposalState.md new file mode 100644 index 000000000..2d4fefcba --- /dev/null +++ b/api/@aastar/sdk/enumerations/ProposalState.md @@ -0,0 +1,65 @@ +Defined in: [packages/operator/src/ProtocolClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L11) + +## Enumeration Members + +### Active + +> **Active**: `1` + +Defined in: [packages/operator/src/ProtocolClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L13) + +*** + +### Canceled + +> **Canceled**: `2` + +Defined in: [packages/operator/src/ProtocolClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L14) + +*** + +### Defeated + +> **Defeated**: `3` + +Defined in: [packages/operator/src/ProtocolClient.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L15) + +*** + +### Executed + +> **Executed**: `7` + +Defined in: [packages/operator/src/ProtocolClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L19) + +*** + +### Expired + +> **Expired**: `6` + +Defined in: [packages/operator/src/ProtocolClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L18) + +*** + +### Pending + +> **Pending**: `0` + +Defined in: [packages/operator/src/ProtocolClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L12) + +*** + +### Queued + +> **Queued**: `5` + +Defined in: [packages/operator/src/ProtocolClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L17) + +*** + +### Succeeded + +> **Succeeded**: `4` + +Defined in: [packages/operator/src/ProtocolClient.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L16) diff --git a/api/@aastar/sdk/enumerations/RolePermissionLevel.md b/api/@aastar/sdk/enumerations/RolePermissionLevel.md new file mode 100644 index 000000000..56000587c --- /dev/null +++ b/api/@aastar/sdk/enumerations/RolePermissionLevel.md @@ -0,0 +1,43 @@ +Defined in: [packages/core/src/roles.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L149) + +Role permission levels (for UI sorting/filtering) + +## Enumeration Members + +### COMMUNITY + +> **COMMUNITY**: `30` + +Defined in: [packages/core/src/roles.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L153) + +*** + +### KMS + +> **KMS**: `80` + +Defined in: [packages/core/src/roles.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L151) + +*** + +### OPERATOR + +> **OPERATOR**: `50` + +Defined in: [packages/core/src/roles.ts:152](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L152) + +*** + +### PROTOCOL + +> **PROTOCOL**: `100` + +Defined in: [packages/core/src/roles.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L150) + +*** + +### USER + +> **USER**: `10` + +Defined in: [packages/core/src/roles.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L154) diff --git a/api/@aastar/sdk/enumerations/UserOpScenarioType.md b/api/@aastar/sdk/enumerations/UserOpScenarioType.md new file mode 100644 index 000000000..bce156c50 --- /dev/null +++ b/api/@aastar/sdk/enumerations/UserOpScenarioType.md @@ -0,0 +1,41 @@ +Defined in: [packages/sdk/src/utils/testScenarios.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L5) + +## Enumeration Members + +### GASLESS\_V4 + +> **GASLESS\_V4**: `"GASLESS_V4"` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L7) + +*** + +### NATIVE + +> **NATIVE**: `"NATIVE"` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L6) + +*** + +### SUPER\_BPNT + +> **SUPER\_BPNT**: `"SUPER_BPNT"` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L8) + +*** + +### SUPER\_CPNT + +> **SUPER\_CPNT**: `"SUPER_CPNT"` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L9) + +*** + +### SUPER\_CUSTOM + +> **SUPER\_CUSTOM**: `"SUPER_CUSTOM"` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L10) diff --git a/api/@aastar/sdk/functions/accountActions.md b/api/@aastar/sdk/functions/accountActions.md new file mode 100644 index 000000000..375dd7a4e --- /dev/null +++ b/api/@aastar/sdk/functions/accountActions.md @@ -0,0 +1,23 @@ +> **accountActions**(`address`): (`client`) => [`AccountActions`](../type-aliases/AccountActions.md) + +Defined in: [packages/core/src/actions/account.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L24) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AccountActions`](../type-aliases/AccountActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AccountActions`](../type-aliases/AccountActions.md) diff --git a/api/@aastar/sdk/functions/accountFactoryActions.md b/api/@aastar/sdk/functions/accountFactoryActions.md new file mode 100644 index 000000000..08c34bea4 --- /dev/null +++ b/api/@aastar/sdk/functions/accountFactoryActions.md @@ -0,0 +1,24 @@ +> **accountFactoryActions**(`address`, `abi`): (`client`) => [`AccountFactoryActions`](../type-aliases/AccountFactoryActions.md) + +Defined in: [packages/core/src/actions/account.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L158) + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `address` | `` `0x${string}` `` | `undefined` | +| `abi` | `any` | `SimpleAccountFactoryABI` | + +## Returns + +> (`client`): [`AccountFactoryActions`](../type-aliases/AccountFactoryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AccountFactoryActions`](../type-aliases/AccountFactoryActions.md) diff --git a/api/@aastar/sdk/functions/agentActions.md b/api/@aastar/sdk/functions/agentActions.md new file mode 100644 index 000000000..de269ff1f --- /dev/null +++ b/api/@aastar/sdk/functions/agentActions.md @@ -0,0 +1,23 @@ +> **agentActions**(`address`): (`client`) => [`AgentActions`](../type-aliases/AgentActions.md) + +Defined in: [packages/core/src/actions/agent.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L29) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AgentActions`](../type-aliases/AgentActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AgentActions`](../type-aliases/AgentActions.md) diff --git a/api/@aastar/sdk/functions/agentRegistryActions.md b/api/@aastar/sdk/functions/agentRegistryActions.md new file mode 100644 index 000000000..a135f14e1 --- /dev/null +++ b/api/@aastar/sdk/functions/agentRegistryActions.md @@ -0,0 +1,23 @@ +> **agentRegistryActions**(`address`): (`client`) => [`AgentRegistryActions`](../type-aliases/AgentRegistryActions.md) + +Defined in: [packages/core/src/actions/agentRegistry.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L52) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AgentRegistryActions`](../type-aliases/AgentRegistryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AgentRegistryActions`](../type-aliases/AgentRegistryActions.md) diff --git a/api/@aastar/sdk/functions/aggregatorActions.md b/api/@aastar/sdk/functions/aggregatorActions.md new file mode 100644 index 000000000..151e9d67f --- /dev/null +++ b/api/@aastar/sdk/functions/aggregatorActions.md @@ -0,0 +1,23 @@ +> **aggregatorActions**(`address`): (`client`) => [`AggregatorActions`](../type-aliases/AggregatorActions.md) + +Defined in: [packages/core/src/actions/aggregator.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L72) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AggregatorActions`](../type-aliases/AggregatorActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AggregatorActions`](../type-aliases/AggregatorActions.md) diff --git a/api/@aastar/sdk/functions/airAccountActions.md b/api/@aastar/sdk/functions/airAccountActions.md new file mode 100644 index 000000000..636657014 --- /dev/null +++ b/api/@aastar/sdk/functions/airAccountActions.md @@ -0,0 +1,23 @@ +> **airAccountActions**(`address`): (`client`) => [`AirAccountActions`](../type-aliases/AirAccountActions.md) + +Defined in: [packages/core/src/actions/airAccount.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L87) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AirAccountActions`](../type-aliases/AirAccountActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AirAccountActions`](../type-aliases/AirAccountActions.md) diff --git a/api/@aastar/sdk/functions/airAccountFactoryActions.md b/api/@aastar/sdk/functions/airAccountFactoryActions.md new file mode 100644 index 000000000..56b1dda6c --- /dev/null +++ b/api/@aastar/sdk/functions/airAccountFactoryActions.md @@ -0,0 +1,23 @@ +> **airAccountFactoryActions**(`address`): (`client`) => [`AirAccountFactoryActions`](../type-aliases/AirAccountFactoryActions.md) + +Defined in: [packages/core/src/actions/airAccountFactory.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L54) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`AirAccountFactoryActions`](../type-aliases/AirAccountFactoryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`AirAccountFactoryActions`](../type-aliases/AirAccountFactoryActions.md) diff --git a/api/@aastar/sdk/functions/applyConfig.md b/api/@aastar/sdk/functions/applyConfig.md new file mode 100644 index 000000000..ce752e84e --- /dev/null +++ b/api/@aastar/sdk/functions/applyConfig.md @@ -0,0 +1,15 @@ +> **applyConfig**(`newConfig`): `void` + +Defined in: [packages/core/src/constants.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L51) + +Apply external configuration (for Node.js environment) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `newConfig` | `any` | + +## Returns + +`void` diff --git a/api/@aastar/sdk/functions/blsAlgorithmActions.md b/api/@aastar/sdk/functions/blsAlgorithmActions.md new file mode 100644 index 000000000..cc29d29bc --- /dev/null +++ b/api/@aastar/sdk/functions/blsAlgorithmActions.md @@ -0,0 +1,27 @@ +> **blsAlgorithmActions**(`address`): (`client`) => [`BLSAlgorithmActions`](../type-aliases/BLSAlgorithmActions.md) + +Defined in: [packages/core/src/actions/blsAlgorithm.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/blsAlgorithm.ts#L19) + +AAStarBLSAlgorithm — the on-chain DVT combined-signature verifier. Pair with +`dvtWire.encodeDVTVerifierProof()` (which builds `proof`) to verify an SDK-assembled +DVT co-signature on-chain via the SDK rather than a hand-written ABI call. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`BLSAlgorithmActions`](../type-aliases/BLSAlgorithmActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`BLSAlgorithmActions`](../type-aliases/BLSAlgorithmActions.md) diff --git a/api/@aastar/sdk/functions/buildPaymasterData.md b/api/@aastar/sdk/functions/buildPaymasterData.md new file mode 100644 index 000000000..01f367980 --- /dev/null +++ b/api/@aastar/sdk/functions/buildPaymasterData.md @@ -0,0 +1,21 @@ +> **buildPaymasterData**(`paymasterAddress`, `token`, `options?`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L58) + +Build paymasterAndData for gasless UserOperation. +Layout: [Paymaster(20)] [VerificationGasLimit(16)] [PostOpGasLimit(16)] [Token(20)] [ValidUntil(6)] [ValidAfter(6)] + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymasterAddress` | `` `0x${string}` `` | +| `token` | `` `0x${string}` `` | +| `options?` | \{ `postOpGasLimit?`: `bigint`; `validityWindow?`: `number`; `verificationGasLimit?`: `bigint`; \} | +| `options.postOpGasLimit?` | `bigint` | +| `options.validityWindow?` | `number` | +| `options.verificationGasLimit?` | `bigint` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/buildSuperPaymasterData.md b/api/@aastar/sdk/functions/buildSuperPaymasterData.md new file mode 100644 index 000000000..3247c2aac --- /dev/null +++ b/api/@aastar/sdk/functions/buildSuperPaymasterData.md @@ -0,0 +1,26 @@ +> **buildSuperPaymasterData**(`paymasterAddress`, `operator`, `options?`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L94) + +Build paymasterAndData for SuperPaymaster V3. +Layout: [Paymaster(20)] [verGas(16)] [postGas(16)] [operator(20)] [maxRate(32)] +Total: 104 bytes + +IMPORTANT: SuperPaymaster contract generates validUntil internally using: + validUntil = cachedPrice.updatedAt + priceStalenessThreshold +Do NOT include validUntil/validAfter in paymasterAndData! + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymasterAddress` | `` `0x${string}` `` | +| `operator` | `` `0x${string}` `` | +| `options?` | \{ `maxRate?`: `bigint`; `postOpGasLimit?`: `bigint`; `verificationGasLimit?`: `bigint`; \} | +| `options.maxRate?` | `bigint` | +| `options.postOpGasLimit?` | `bigint` | +| `options.verificationGasLimit?` | `bigint` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/channelActions.md b/api/@aastar/sdk/functions/channelActions.md new file mode 100644 index 000000000..959fa059c --- /dev/null +++ b/api/@aastar/sdk/functions/channelActions.md @@ -0,0 +1,23 @@ +> **channelActions**(`address`): (`client`) => [`ChannelActions`](../type-aliases/ChannelActions.md) + +Defined in: [packages/core/src/actions/channel.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L64) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`ChannelActions`](../type-aliases/ChannelActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`ChannelActions`](../type-aliases/ChannelActions.md) diff --git a/api/@aastar/sdk/functions/checkEligibility.md b/api/@aastar/sdk/functions/checkEligibility.md new file mode 100644 index 000000000..689bda200 --- /dev/null +++ b/api/@aastar/sdk/functions/checkEligibility.md @@ -0,0 +1,19 @@ +> **checkEligibility**(`client`, `paymaster`, `user`, `operator`): `Promise`\<\{ `credit?`: `bigint`; `eligible`: `boolean`; `token?`: `` `0x${string}` ``; \}\> + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L49) + +Enhanced eligibility check for SuperPaymaster V3. +Validates that user has sufficient credit with the given operator. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `paymaster` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | +| `operator` | `` `0x${string}` `` | + +## Returns + +`Promise`\<\{ `credit?`: `bigint`; `eligible`: `boolean`; `token?`: `` `0x${string}` ``; \}\> diff --git a/api/@aastar/sdk/functions/checkMySBT.md b/api/@aastar/sdk/functions/checkMySBT.md new file mode 100644 index 000000000..01e4b3fb7 --- /dev/null +++ b/api/@aastar/sdk/functions/checkMySBT.md @@ -0,0 +1,23 @@ +> **checkMySBT**(`client`, `sbtAddress`, `user`): `Promise`\<\{ `balance`: `bigint`; `hasSBT`: `boolean`; \}\> + +Defined in: [packages/identity/src/mysbt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/mysbt.ts#L14) + +Check if user holds MySBT token (identity verification). + +Does NOT swallow read errors: `balanceOf` returns 0 for a non-holder, so any +thrown error is an RPC/transport/contract failure — masking it as +`{ hasSBT: false }` would turn a transient RPC blip into a false "no SBT" and +wrongly fail eligibility checks. The error propagates so the caller can retry +or surface "couldn't determine" rather than "no SBT". + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `sbtAddress` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | + +## Returns + +`Promise`\<\{ `balance`: `bigint`; `hasSBT`: `boolean`; \}\> diff --git a/api/@aastar/sdk/functions/createAAStarPublicClient.md b/api/@aastar/sdk/functions/createAAStarPublicClient.md new file mode 100644 index 000000000..7b3ae7c1e --- /dev/null +++ b/api/@aastar/sdk/functions/createAAStarPublicClient.md @@ -0,0 +1,16 @@ +> **createAAStarPublicClient**(`rpcUrl`, `chain`): [`PublicClient`](../interfaces/PublicClient.md) + +Defined in: [packages/core/src/clients.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients.ts#L8) + +Creates a standard AAStar public client for any given chain. + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `rpcUrl` | `string` | `undefined` | +| `chain` | [`Chain`](https://viem.sh/docs/index.html) | `sepolia` | + +## Returns + +[`PublicClient`](../interfaces/PublicClient.md) diff --git a/api/@aastar/sdk/functions/createAdminClient.md b/api/@aastar/sdk/functions/createAdminClient.md new file mode 100644 index 000000000..f9e959702 --- /dev/null +++ b/api/@aastar/sdk/functions/createAdminClient.md @@ -0,0 +1,17 @@ +> **createAdminClient**(`__namedParameters`): [`AdminClient`](../type-aliases/AdminClient.md) + +Defined in: [packages/sdk/src/clients/admin.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/admin.ts#L29) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `__namedParameters` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html); `addresses?`: \{\[`key`: `string`\]: `` `0x${string}` ``; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html); `transport`: [`Transport`](https://viem.sh/docs/index.html); \} | +| `__namedParameters.account?` | [`Account`](https://viem.sh/docs/index.html) | +| `__namedParameters.addresses?` | \{\[`key`: `string`\]: `` `0x${string}` ``; \} | +| `__namedParameters.chain` | [`Chain`](https://viem.sh/docs/index.html) | +| `__namedParameters.transport` | [`Transport`](https://viem.sh/docs/index.html) | + +## Returns + +[`AdminClient`](../type-aliases/AdminClient.md) diff --git a/api/@aastar/sdk/functions/createCommunityClient.md b/api/@aastar/sdk/functions/createCommunityClient.md new file mode 100644 index 000000000..adf17f202 --- /dev/null +++ b/api/@aastar/sdk/functions/createCommunityClient.md @@ -0,0 +1,17 @@ +> **createCommunityClient**(`__namedParameters`): [`LegacyCommunityClient`](../type-aliases/LegacyCommunityClient.md) + +Defined in: [packages/sdk/src/clients/community.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/community.ts#L60) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `__namedParameters` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html); `addresses?`: \{\[`key`: `string`\]: `` `0x${string}` ``; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html); `transport`: [`Transport`](https://viem.sh/docs/index.html); \} | +| `__namedParameters.account?` | [`Account`](https://viem.sh/docs/index.html) | +| `__namedParameters.addresses?` | \{\[`key`: `string`\]: `` `0x${string}` ``; \} | +| `__namedParameters.chain` | [`Chain`](https://viem.sh/docs/index.html) | +| `__namedParameters.transport` | [`Transport`](https://viem.sh/docs/index.html) | + +## Returns + +[`LegacyCommunityClient`](../type-aliases/LegacyCommunityClient.md) diff --git a/api/@aastar/sdk/functions/createEOAWalletClient.md b/api/@aastar/sdk/functions/createEOAWalletClient.md new file mode 100644 index 000000000..8e423f8f8 --- /dev/null +++ b/api/@aastar/sdk/functions/createEOAWalletClient.md @@ -0,0 +1,15 @@ +> **createEOAWalletClient**(`privateKey`, `chain`, `transport`): [`EOAWalletClient`](../type-aliases/EOAWalletClient.md) + +Defined in: [packages/account/src/eoa.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/eoa.ts#L9) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `privateKey` | `` `0x${string}` `` | +| `chain` | [`Chain`](https://viem.sh/docs/index.html) | +| `transport` | [`Transport`](https://viem.sh/docs/index.html) | + +## Returns + +[`EOAWalletClient`](../type-aliases/EOAWalletClient.md) diff --git a/api/@aastar/sdk/functions/createEndUserClient.md b/api/@aastar/sdk/functions/createEndUserClient.md new file mode 100644 index 000000000..c45f65639 --- /dev/null +++ b/api/@aastar/sdk/functions/createEndUserClient.md @@ -0,0 +1,17 @@ +> **createEndUserClient**(`__namedParameters`): [`EndUserClient`](../type-aliases/EndUserClient.md) + +Defined in: [packages/sdk/src/clients/endUser.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/endUser.ts#L80) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `__namedParameters` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html); `addresses?`: \{\[`key`: `string`\]: `` `0x${string}` ``; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html); `transport`: [`Transport`](https://viem.sh/docs/index.html); \} | +| `__namedParameters.account?` | [`Account`](https://viem.sh/docs/index.html) | +| `__namedParameters.addresses?` | \{\[`key`: `string`\]: `` `0x${string}` ``; \} | +| `__namedParameters.chain` | [`Chain`](https://viem.sh/docs/index.html) | +| `__namedParameters.transport` | [`Transport`](https://viem.sh/docs/index.html) | + +## Returns + +[`EndUserClient`](../type-aliases/EndUserClient.md) diff --git a/api/@aastar/sdk/functions/createHeliosTransport.md b/api/@aastar/sdk/functions/createHeliosTransport.md new file mode 100644 index 000000000..247675fb6 --- /dev/null +++ b/api/@aastar/sdk/functions/createHeliosTransport.md @@ -0,0 +1,19 @@ +> **createHeliosTransport**(`config`): `Promise`\<[`CustomTransport`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/transports/helios.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L62) + +Create a viem custom transport backed by the Helios light client. + +Helios is lazy-initialized on the first RPC request so the WASM module +loads only when needed. The returned transport is safe to pass directly +to `createPublicClient`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`HeliosTransportConfig`](../interfaces/HeliosTransportConfig.md) | + +## Returns + +`Promise`\<[`CustomTransport`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/functions/createOperatorClient.md b/api/@aastar/sdk/functions/createOperatorClient.md new file mode 100644 index 000000000..576ae38dd --- /dev/null +++ b/api/@aastar/sdk/functions/createOperatorClient.md @@ -0,0 +1,17 @@ +> **createOperatorClient**(`__namedParameters`): [`OperatorClient`](../type-aliases/OperatorClient.md) + +Defined in: [packages/sdk/src/clients/operator.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/operator.ts#L60) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `__namedParameters` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html); `addresses?`: \{\[`key`: `string`\]: `` `0x${string}` ``; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html); `transport`: [`Transport`](https://viem.sh/docs/index.html); \} | +| `__namedParameters.account?` | [`Account`](https://viem.sh/docs/index.html) | +| `__namedParameters.addresses?` | \{\[`key`: `string`\]: `` `0x${string}` ``; \} | +| `__namedParameters.chain` | [`Chain`](https://viem.sh/docs/index.html) | +| `__namedParameters.transport` | [`Transport`](https://viem.sh/docs/index.html) | + +## Returns + +[`OperatorClient`](../type-aliases/OperatorClient.md) diff --git a/api/@aastar/sdk/functions/decodeContractError.md b/api/@aastar/sdk/functions/decodeContractError.md new file mode 100644 index 000000000..211f71cea --- /dev/null +++ b/api/@aastar/sdk/functions/decodeContractError.md @@ -0,0 +1,13 @@ +> **decodeContractError**(`error`): `string` \| `null` + +Defined in: [packages/sdk/src/errors/decoder.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/errors/decoder.ts#L10) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `error` | `any` | + +## Returns + +`string` \| `null` diff --git a/api/@aastar/sdk/functions/decodePaymentPayload.md b/api/@aastar/sdk/functions/decodePaymentPayload.md new file mode 100644 index 000000000..d63374481 --- /dev/null +++ b/api/@aastar/sdk/functions/decodePaymentPayload.md @@ -0,0 +1,13 @@ +> **decodePaymentPayload**(`encoded`): [`PaymentPayload`](../type-aliases/PaymentPayload.md) + +Defined in: [packages/x402/src/payment-header.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L55) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encoded` | `string` | + +## Returns + +[`PaymentPayload`](../type-aliases/PaymentPayload.md) diff --git a/api/@aastar/sdk/functions/decodePaymentRequired.md b/api/@aastar/sdk/functions/decodePaymentRequired.md new file mode 100644 index 000000000..567a71e66 --- /dev/null +++ b/api/@aastar/sdk/functions/decodePaymentRequired.md @@ -0,0 +1,13 @@ +> **decodePaymentRequired**(`encoded`): [`PaymentRequired`](../type-aliases/PaymentRequired.md) + +Defined in: [packages/x402/src/payment-header.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L45) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encoded` | `string` | + +## Returns + +[`PaymentRequired`](../type-aliases/PaymentRequired.md) diff --git a/api/@aastar/sdk/functions/decodeSettleResponse.md b/api/@aastar/sdk/functions/decodeSettleResponse.md new file mode 100644 index 000000000..55bd9c6a2 --- /dev/null +++ b/api/@aastar/sdk/functions/decodeSettleResponse.md @@ -0,0 +1,13 @@ +> **decodeSettleResponse**(`encoded`): [`SettleResponse`](../type-aliases/SettleResponse.md) + +Defined in: [packages/x402/src/payment-header.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L65) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encoded` | `string` | + +## Returns + +[`SettleResponse`](../type-aliases/SettleResponse.md) diff --git a/api/@aastar/sdk/functions/describeSupportedChains.md b/api/@aastar/sdk/functions/describeSupportedChains.md new file mode 100644 index 000000000..397450056 --- /dev/null +++ b/api/@aastar/sdk/functions/describeSupportedChains.md @@ -0,0 +1,11 @@ +> **describeSupportedChains**(): `string` + +Defined in: [packages/core/src/addresses.ts:251](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L251) + +A friendly, human-readable list of the supported chains for error messages — +e.g. `"OP Mainnet (10), Sepolia (11155111), OP Sepolia (11155420)"`. Names come +from viem/chains so callers recognize them by the same label viem uses. + +## Returns + +`string` diff --git a/api/@aastar/sdk/functions/dvtActions.md b/api/@aastar/sdk/functions/dvtActions.md new file mode 100644 index 000000000..bed66072e --- /dev/null +++ b/api/@aastar/sdk/functions/dvtActions.md @@ -0,0 +1,23 @@ +> **dvtActions**(`address`): (`client`) => [`DVTActions`](../type-aliases/DVTActions.md) + +Defined in: [packages/core/src/actions/dvt.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L38) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`DVTActions`](../type-aliases/DVTActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`DVTActions`](../type-aliases/DVTActions.md) diff --git a/api/@aastar/sdk/functions/encodeDVTAccountSignature.md b/api/@aastar/sdk/functions/encodeDVTAccountSignature.md new file mode 100644 index 000000000..f6c0144d6 --- /dev/null +++ b/api/@aastar/sdk/functions/encodeDVTAccountSignature.md @@ -0,0 +1,21 @@ +> **encodeDVTAccountSignature**(`params`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L201) + +Encode the ACCOUNT-LEVEL combined signature that goes into +`PackedUserOperation.signature`, per airaccount-contract #110: +``` +T2: [0x04][P256(64)][nodeIdsLength(32)][nodeIds(N×32)][blsSig(256)] +T3: [0x05][P256(64)][nodeIdsLength(32)][nodeIds(N×32)][blsSig(256)][guardianECDSA(65)] +``` +`nodeIdsLength` is a 32-byte big-endian `uint256` count of `nodeIds`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`DVTAccountSignatureParams`](../interfaces/DVTAccountSignatureParams.md) | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/encodeDVTVerifierProof.md b/api/@aastar/sdk/functions/encodeDVTVerifierProof.md new file mode 100644 index 000000000..94e230d81 --- /dev/null +++ b/api/@aastar/sdk/functions/encodeDVTVerifierProof.md @@ -0,0 +1,20 @@ +> **encodeDVTVerifierProof**(`nodeIds`, `blsSig`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L155) + +Encode the VERIFIER-LEVEL proof passed to `AAStarBLSAlgorithm.validate`: +`[nodeId_1(32)…nodeId_N(32)][blsSig(256)]` — NO `nodeIdsLength` prefix (the contract +derives `nodeCount = (sig.length - 256) / 32`). + +`nodeIds` order MUST equal the nodes' signing/aggregation order. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `nodeIds` | `` `0x${string}` ``[] | Explicit `bytes32` node IDs of the contributing signers, in order. | +| `blsSig` | `Uint8Array` \| `` `0x${string}` `` | The aggregate BLS G2 signature (256-byte EIP-2537, or 96/192-byte zkcrypto). | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/encodeG2Point.md b/api/@aastar/sdk/functions/encodeG2Point.md new file mode 100644 index 000000000..52932fd09 --- /dev/null +++ b/api/@aastar/sdk/functions/encodeG2Point.md @@ -0,0 +1,27 @@ +> **encodeG2Point**(`blsSig`): `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L94) + +Produce the canonical 256-byte EIP-2537 G2 layout for a BLS aggregate signature, +byte-identical to the DVT node's `encodeG2Point` (YetAnotherAA-Validator +`src/utils/bls.util.ts`) and to what the contract pairs over. + +Layout: `x.c0 @ 16 / x.c1 @ 80 / y.c0 @ 144 / y.c1 @ 208`, each Fp a 48-byte +big-endian value right-aligned in its 64-byte slot (16 leading zero bytes). + +Accepts the signature in three forms: +- **256-byte EIP-2537** (what the node already emits): validated and passed through. +- **96-byte compressed** / **192-byte uncompressed** zkcrypto G2: re-packed via + `@noble/curves` (parse → affine → EIP-2537 slots). + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `blsSig` | `Uint8Array` \| `` `0x${string}` `` | The aggregate BLS G2 signature (hex or bytes). | + +## Returns + +`` `0x${string}` `` + +The 256-byte EIP-2537 G2 point as hex. diff --git a/api/@aastar/sdk/functions/encodePaymentPayload.md b/api/@aastar/sdk/functions/encodePaymentPayload.md new file mode 100644 index 000000000..107afa98b --- /dev/null +++ b/api/@aastar/sdk/functions/encodePaymentPayload.md @@ -0,0 +1,13 @@ +> **encodePaymentPayload**(`payload`): `string` + +Defined in: [packages/x402/src/payment-header.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L51) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `payload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | + +## Returns + +`string` diff --git a/api/@aastar/sdk/functions/encodePaymentRequired.md b/api/@aastar/sdk/functions/encodePaymentRequired.md new file mode 100644 index 000000000..9409f6a48 --- /dev/null +++ b/api/@aastar/sdk/functions/encodePaymentRequired.md @@ -0,0 +1,13 @@ +> **encodePaymentRequired**(`req`): `string` + +Defined in: [packages/x402/src/payment-header.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L41) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `req` | [`PaymentRequired`](../type-aliases/PaymentRequired.md) | + +## Returns + +`string` diff --git a/api/@aastar/sdk/functions/encodeSettleResponse.md b/api/@aastar/sdk/functions/encodeSettleResponse.md new file mode 100644 index 000000000..cd5bc85e3 --- /dev/null +++ b/api/@aastar/sdk/functions/encodeSettleResponse.md @@ -0,0 +1,13 @@ +> **encodeSettleResponse**(`resp`): `string` + +Defined in: [packages/x402/src/payment-header.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L61) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `resp` | [`SettleResponse`](../type-aliases/SettleResponse.md) | + +## Returns + +`string` diff --git a/api/@aastar/sdk/functions/entryPointActions.md b/api/@aastar/sdk/functions/entryPointActions.md new file mode 100644 index 000000000..145b38e8c --- /dev/null +++ b/api/@aastar/sdk/functions/entryPointActions.md @@ -0,0 +1,23 @@ +> **entryPointActions**(`address`): (`client`) => [`EntryPointActions`](../type-aliases/EntryPointActions.md) + +Defined in: [packages/core/src/actions/entryPoint.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L19) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`EntryPointActions`](../type-aliases/EntryPointActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`EntryPointActions`](../type-aliases/EntryPointActions.md) diff --git a/api/@aastar/sdk/functions/extractPaymentRequired.md b/api/@aastar/sdk/functions/extractPaymentRequired.md new file mode 100644 index 000000000..8052b4fd3 --- /dev/null +++ b/api/@aastar/sdk/functions/extractPaymentRequired.md @@ -0,0 +1,16 @@ +> **extractPaymentRequired**(`response`): [`PaymentRequired`](../type-aliases/PaymentRequired.md) \| `null` + +Defined in: [packages/x402/src/payment-header.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L77) + +Extract PaymentRequired from a 402 Response. +Tries v2 header first, falls back to v1. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `response` | `Response` | + +## Returns + +[`PaymentRequired`](../type-aliases/PaymentRequired.md) \| `null` diff --git a/api/@aastar/sdk/functions/extractSettleResponse.md b/api/@aastar/sdk/functions/extractSettleResponse.md new file mode 100644 index 000000000..435befd49 --- /dev/null +++ b/api/@aastar/sdk/functions/extractSettleResponse.md @@ -0,0 +1,15 @@ +> **extractSettleResponse**(`response`): [`SettleResponse`](../type-aliases/SettleResponse.md) \| `null` + +Defined in: [packages/x402/src/payment-header.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L91) + +Extract SettleResponse from a successful response. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `response` | `Response` | + +## Returns + +[`SettleResponse`](../type-aliases/SettleResponse.md) \| `null` diff --git a/api/@aastar/sdk/functions/forceExitActions.md b/api/@aastar/sdk/functions/forceExitActions.md new file mode 100644 index 000000000..aa0177039 --- /dev/null +++ b/api/@aastar/sdk/functions/forceExitActions.md @@ -0,0 +1,23 @@ +> **forceExitActions**(`address`): (`client`) => [`ForceExitActions`](../type-aliases/ForceExitActions.md) + +Defined in: [packages/core/src/actions/forceExit.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L21) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`ForceExitActions`](../type-aliases/ForceExitActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`ForceExitActions`](../type-aliases/ForceExitActions.md) diff --git a/api/@aastar/sdk/functions/formatUserOpV07.md b/api/@aastar/sdk/functions/formatUserOpV07.md new file mode 100644 index 000000000..d964d5702 --- /dev/null +++ b/api/@aastar/sdk/functions/formatUserOpV07.md @@ -0,0 +1,15 @@ +> **formatUserOpV07**(`userOp`): `any` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L119) + +Helper to format UserOp for Alchemy/Standard Bundlers (v0.7 Decomposed) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `any` | + +## Returns + +`any` diff --git a/api/@aastar/sdk/functions/gTokenActions.md b/api/@aastar/sdk/functions/gTokenActions.md new file mode 100644 index 000000000..a16ae09d6 --- /dev/null +++ b/api/@aastar/sdk/functions/gTokenActions.md @@ -0,0 +1,23 @@ +> **gTokenActions**(`address?`): (`client`) => [`GTokenActions`](../type-aliases/GTokenActions.md) + +Defined in: [packages/core/src/actions/tokens.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L129) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address?` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`GTokenActions`](../type-aliases/GTokenActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`GTokenActions`](../type-aliases/GTokenActions.md) diff --git a/api/@aastar/sdk/functions/gTokenAuthorizationActions.md b/api/@aastar/sdk/functions/gTokenAuthorizationActions.md new file mode 100644 index 000000000..3c4f65c77 --- /dev/null +++ b/api/@aastar/sdk/functions/gTokenAuthorizationActions.md @@ -0,0 +1,13 @@ +> **gTokenAuthorizationActions**(`client`): [`GTokenAuthorizationActions`](../type-aliases/GTokenAuthorizationActions.md) + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L80) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: (...) \| (...) \| (...) \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: (...)\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: (...) \| (...); paymasterService?: (...) \| (...); unstable\_addSubAccount?: (...) \| (...); \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| ...\[...\] *extends* ... \| ... ? `Extract`\<..., ...\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +## Returns + +[`GTokenAuthorizationActions`](../type-aliases/GTokenAuthorizationActions.md) diff --git a/api/@aastar/sdk/functions/generateNonce.md b/api/@aastar/sdk/functions/generateNonce.md new file mode 100644 index 000000000..ffb5ee1eb --- /dev/null +++ b/api/@aastar/sdk/functions/generateNonce.md @@ -0,0 +1,7 @@ +> **generateNonce**(): `` `0x${string}` `` + +Defined in: [packages/x402/src/eip3009.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L37) + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/getAddressUrl.md b/api/@aastar/sdk/functions/getAddressUrl.md new file mode 100644 index 000000000..b9fa93d8f --- /dev/null +++ b/api/@aastar/sdk/functions/getAddressUrl.md @@ -0,0 +1,25 @@ +> **getAddressUrl**(`network`, `address`): `string` + +Defined in: [packages/core/src/networks.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L131) + +Get address URL on block explorer + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"anvil"` \| `"optimism"` \| `"sepolia"` \| `"op-sepolia"` | Network name | +| `address` | `string` | Contract or wallet address | + +## Returns + +`string` + +Full address URL + +## Example + +```ts +const url = getAddressUrl('sepolia', '0xabc...'); +// 'https://sepolia.etherscan.io/address/0xabc...' +``` diff --git a/api/@aastar/sdk/functions/getAllCommunityConfigs.md b/api/@aastar/sdk/functions/getAllCommunityConfigs.md new file mode 100644 index 000000000..5603bb658 --- /dev/null +++ b/api/@aastar/sdk/functions/getAllCommunityConfigs.md @@ -0,0 +1,9 @@ +> **getAllCommunityConfigs**(): [`CommunityConfig`](../interfaces/CommunityConfig.md)[] + +Defined in: [packages/core/src/communities.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L84) + +Get all community configurations + +## Returns + +[`CommunityConfig`](../interfaces/CommunityConfig.md)[] diff --git a/api/@aastar/sdk/functions/getAllV2Contracts.md b/api/@aastar/sdk/functions/getAllV2Contracts.md new file mode 100644 index 000000000..f374ebd3f --- /dev/null +++ b/api/@aastar/sdk/functions/getAllV2Contracts.md @@ -0,0 +1,20 @@ +> **getAllV2Contracts**(): [`ContractVersion`](../interfaces/ContractVersion.md)[] + +Defined in: [packages/core/src/contract-versions.ts:264](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L264) + +Get all V2 contracts with VERSION interface + +## Returns + +[`ContractVersion`](../interfaces/ContractVersion.md)[] + +Array of all V2 contract versions + +## Example + +```ts +const allV2Contracts = getAllV2Contracts(); +for (const contract of allV2Contracts) { + console.log(`${contract.name} v${contract.version} at ${contract.address}`); +} +``` diff --git a/api/@aastar/sdk/functions/getBlockExplorer.md b/api/@aastar/sdk/functions/getBlockExplorer.md new file mode 100644 index 000000000..eceefc17c --- /dev/null +++ b/api/@aastar/sdk/functions/getBlockExplorer.md @@ -0,0 +1,24 @@ +> **getBlockExplorer**(`network`): `""` \| `"https://sepolia.etherscan.io"` \| `"https://optimistic.etherscan.io"` \| `"https://sepolia-optimism.etherscan.io"` + +Defined in: [packages/core/src/networks.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L97) + +Get block explorer URL + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"anvil"` \| `"optimism"` \| `"sepolia"` \| `"op-sepolia"` | Network name | + +## Returns + +`""` \| `"https://sepolia.etherscan.io"` \| `"https://optimistic.etherscan.io"` \| `"https://sepolia-optimism.etherscan.io"` + +Block explorer base URL + +## Example + +```ts +const explorer = getBlockExplorer('sepolia'); +// 'https://sepolia.etherscan.io' +``` diff --git a/api/@aastar/sdk/functions/getCanonicalAddresses.md b/api/@aastar/sdk/functions/getCanonicalAddresses.md new file mode 100644 index 000000000..d2ce597e6 --- /dev/null +++ b/api/@aastar/sdk/functions/getCanonicalAddresses.md @@ -0,0 +1,33 @@ +> **getCanonicalAddresses**(`chainId`): CanonicalAddresses & \{ gTokenStaking: \`0x$\{string\}\`; mySBT: \`0x$\{string\}\`; \} \| `undefined` + +Defined in: [packages/core/src/addresses.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L225) + +Resolve the canonical contract address book for a chain, keyed by `chainId`, +normalized to the key names the role-based client factories expect. + +The canonical table uses `staking` / `sbt`; the historical client factories +(and many consumers) reference `gTokenStaking` / `mySBT`. This helper returns +the canonical set plus those aliases so a single object satisfies both, which +is what makes `createEndUserClient({ chain })` resolve addresses automatically +— no manual `addresses` needed for any supported chain. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `chainId` | `number` | EVM chain id (e.g. 10 = Optimism, 11155111 = Sepolia). | + +## Returns + +CanonicalAddresses & \{ gTokenStaking: \`0x$\{string\}\`; mySBT: \`0x$\{string\}\`; \} \| `undefined` + +The normalized address record, or `undefined` if the chain has no + canonical entry (caller must then pass `addresses` explicitly). + +## Example + +```ts +import { optimism } from 'viem/chains'; +const addrs = getCanonicalAddresses(optimism.id); // chainId 10 +addrs?.registry; addrs?.mySBT; // alias of `sbt` +``` diff --git a/api/@aastar/sdk/functions/getChainId.md b/api/@aastar/sdk/functions/getChainId.md new file mode 100644 index 000000000..54dd396d6 --- /dev/null +++ b/api/@aastar/sdk/functions/getChainId.md @@ -0,0 +1,24 @@ +> **getChainId**(`network`): `number` + +Defined in: [packages/core/src/networks.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L147) + +Get chain ID for a network + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"anvil"` \| `"optimism"` \| `"sepolia"` \| `"op-sepolia"` | Network name | + +## Returns + +`number` + +Chain ID number + +## Example + +```ts +const chainId = getChainId('sepolia'); +// 11155111 +``` diff --git a/api/@aastar/sdk/functions/getCommunities.md b/api/@aastar/sdk/functions/getCommunities.md new file mode 100644 index 000000000..80a5b4056 --- /dev/null +++ b/api/@aastar/sdk/functions/getCommunities.md @@ -0,0 +1,74 @@ +> **getCommunities**(`network`): `object` + +Defined in: [packages/core/src/contracts.ts:395](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L395) + +Get registered communities + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +Communities object + +### aastar + +> `readonly` **aastar**: `object` + +AAStar Community - Test community for development (registered: 2025-11-01) + +#### aastar.ensName + +> `readonly` **ensName**: `"aastar.eth"` = `'aastar.eth'` + +#### aastar.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.aPNTs` + +#### aastar.name + +> `readonly` **name**: `"AAStar"` = `'AAStar'` + +#### aastar.owner + +> `readonly` **owner**: `"0x411BD567E46C0781248dbB6a9211891C032885e5"` = `COMMUNITY_OWNERS.aastarOwner` + +#### aastar.stake + +> `readonly` **stake**: `"50"` = `'50'` + +### breadCommunity + +> `readonly` **breadCommunity**: `object` + +BreadCommunity - Test community for development (registered: 2025-11-03) + +#### breadCommunity.ensName + +> `readonly` **ensName**: `"bread.eth"` = `'bread.eth'` + +#### breadCommunity.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.bPNTs` + +#### breadCommunity.name + +> `readonly` **name**: `"BreadCommunity"` = `'BreadCommunity'` + +#### breadCommunity.owner + +> `readonly` **owner**: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"` = `COMMUNITY_OWNERS.breadCommunityOwner` + +#### breadCommunity.stake + +> `readonly` **stake**: `"50"` = `'50'` + +## Example + +```ts +const communities = getCommunities('sepolia'); +console.log(communities.aastar.owner); +``` diff --git a/api/@aastar/sdk/functions/getCommunity.md b/api/@aastar/sdk/functions/getCommunity.md new file mode 100644 index 000000000..aa9d2a0bd --- /dev/null +++ b/api/@aastar/sdk/functions/getCommunity.md @@ -0,0 +1,25 @@ +> **getCommunity**(`network`, `communityName`): \{ `ensName`: `"aastar.eth"`; `gasToken`: `` `0x${string}` ``; `name`: `"AAStar"`; `owner`: `"0x411BD567E46C0781248dbB6a9211891C032885e5"`; `stake`: `"50"`; \} \| \{ `ensName`: `"bread.eth"`; `gasToken`: `` `0x${string}` ``; `name`: `"BreadCommunity"`; `owner`: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"`; `stake`: `"50"`; \} + +Defined in: [packages/core/src/contracts.ts:412](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L412) + +Get a specific community + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | +| `communityName` | `"aastar"` \| `"breadCommunity"` | Community name (aastar, builderDao) | + +## Returns + +\{ `ensName`: `"aastar.eth"`; `gasToken`: `` `0x${string}` ``; `name`: `"AAStar"`; `owner`: `"0x411BD567E46C0781248dbB6a9211891C032885e5"`; `stake`: `"50"`; \} \| \{ `ensName`: `"bread.eth"`; `gasToken`: `` `0x${string}` ``; `name`: `"BreadCommunity"`; `owner`: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"`; `stake`: `"50"`; \} + +Community information + +## Example + +```ts +const aastar = getCommunity('sepolia', 'aastar'); +console.log(aastar.gasToken); // aPNTs address +``` diff --git a/api/@aastar/sdk/functions/getCommunityConfig.md b/api/@aastar/sdk/functions/getCommunityConfig.md new file mode 100644 index 000000000..eb5bed43a --- /dev/null +++ b/api/@aastar/sdk/functions/getCommunityConfig.md @@ -0,0 +1,15 @@ +> **getCommunityConfig**(`address`): [`CommunityConfig`](../interfaces/CommunityConfig.md) \| `undefined` + +Defined in: [packages/core/src/communities.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L77) + +Get community configuration by address + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `string` | + +## Returns + +[`CommunityConfig`](../interfaces/CommunityConfig.md) \| `undefined` diff --git a/api/@aastar/sdk/functions/getContract.md b/api/@aastar/sdk/functions/getContract.md new file mode 100644 index 000000000..9221798cb --- /dev/null +++ b/api/@aastar/sdk/functions/getContract.md @@ -0,0 +1,25 @@ +> **getContract**(`network`, `category`, `name`): `string` + +Defined in: [packages/core/src/contracts.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L151) + +Get a specific contract address + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | +| `category` | [`ContractCategory`](../type-aliases/ContractCategory.md) | Contract category | +| `name` | `string` | Contract name | + +## Returns + +`string` + +Contract address + +## Example + +```ts +const address = getContract('sepolia', 'core', 'superPaymaster'); +``` diff --git a/api/@aastar/sdk/functions/getContractNetworks.md b/api/@aastar/sdk/functions/getContractNetworks.md new file mode 100644 index 000000000..35d045360 --- /dev/null +++ b/api/@aastar/sdk/functions/getContractNetworks.md @@ -0,0 +1,18 @@ +> **getContractNetworks**(): `"sepolia"`[] + +Defined in: [packages/core/src/contracts.ts:325](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L325) + +Get all supported contract network names + +## Returns + +`"sepolia"`[] + +Array of supported network names + +## Example + +```ts +const networks = getContractNetworks(); +// ['sepolia'] +``` diff --git a/api/@aastar/sdk/functions/getContracts.md b/api/@aastar/sdk/functions/getContracts.md new file mode 100644 index 000000000..29d5ef3ee --- /dev/null +++ b/api/@aastar/sdk/functions/getContracts.md @@ -0,0 +1,204 @@ +> **getContracts**(`network`): `object` + +Defined in: [packages/core/src/contracts.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L130) + +Get all contracts for a specific network + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name (e.g., 'sepolia') | + +## Returns + +`object` + +All contract addresses for the network + +### communities + +> `readonly` **communities**: `object` + +#### communities.aastar + +> `readonly` **aastar**: `object` + +AAStar Community - Test community for development (registered: 2025-11-01) + +#### communities.aastar.ensName + +> `readonly` **ensName**: `"aastar.eth"` = `'aastar.eth'` + +#### communities.aastar.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.aPNTs` + +#### communities.aastar.name + +> `readonly` **name**: `"AAStar"` = `'AAStar'` + +#### communities.aastar.owner + +> `readonly` **owner**: `"0x411BD567E46C0781248dbB6a9211891C032885e5"` = `COMMUNITY_OWNERS.aastarOwner` + +#### communities.aastar.stake + +> `readonly` **stake**: `"50"` = `'50'` + +#### communities.breadCommunity + +> `readonly` **breadCommunity**: `object` + +BreadCommunity - Test community for development (registered: 2025-11-03) + +#### communities.breadCommunity.ensName + +> `readonly` **ensName**: `"bread.eth"` = `'bread.eth'` + +#### communities.breadCommunity.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.bPNTs` + +#### communities.breadCommunity.name + +> `readonly` **name**: `"BreadCommunity"` = `'BreadCommunity'` + +#### communities.breadCommunity.owner + +> `readonly` **owner**: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"` = `COMMUNITY_OWNERS.breadCommunityOwner` + +#### communities.breadCommunity.stake + +> `readonly` **stake**: `"50"` = `'50'` + +### core + +> `readonly` **core**: `object` = `CORE_ADDRESSES` + +#### core.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +#### core.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + +#### core.aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` + +#### core.dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +#### core.entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` = `ENTRY_POINT_ADDRESS` + +#### core.gToken + +> `readonly` **gToken**: `` `0x${string}` `` = `GTOKEN_ADDRESS` + +#### core.gTokenStaking + +> `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` + +#### core.microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + +#### core.mySBT + +> `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` + +#### core.paymasterFactory + +> `readonly` **paymasterFactory**: `` `0x${string}` `` = `PAYMASTER_FACTORY_ADDRESS` + +#### core.paymasterV4 + +> `readonly` **paymasterV4**: `` `0x${string}` `` + +#### core.registry + +> `readonly` **registry**: `` `0x${string}` `` = `REGISTRY_ADDRESS` + +#### core.superPaymaster + +> `readonly` **superPaymaster**: `` `0x${string}` `` = `SUPER_PAYMASTER_ADDRESS` + +#### core.xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` + +### monitoring + +> `readonly` **monitoring**: `object` = `MONITORING_ADDRESSES` + +#### monitoring.blsAggregator + +> `readonly` **blsAggregator**: `` `0x${string}` `` = `BLS_AGGREGATOR_ADDRESS` + +#### monitoring.dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +### official + +> `readonly` **official**: `object` = `OFFICIAL_ADDRESSES` + +#### official.entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` + +### paymaster + +> `readonly` **paymaster**: `object` = `PAYMASTER_ADDRESSES` + +#### paymaster.paymasterV4\_1 + +> `readonly` **paymasterV4\_1**: `` `0x${string}` `` + +#### paymaster.paymasterV4\_1iImplementation + +> `readonly` **paymasterV4\_1iImplementation**: `` `0x${string}` `` = `PAYMASTER_V4_IMPL_ADDRESS` + +### testAccounts + +> `readonly` **testAccounts**: `object` = `TEST_ACCOUNT_ADDRESSES` + +#### testAccounts.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `` `0x${string}` `` + +### testTokens + +> `readonly` **testTokens**: `object` = `TEST_TOKEN_ADDRESSES` + +#### testTokens.aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` + +#### testTokens.bPNTs + +> `readonly` **bPNTs**: `` `0x${string}` `` + +#### testTokens.mockUSDT + +> `readonly` **mockUSDT**: `` `0x${string}` `` + +### tokens + +> `readonly` **tokens**: `object` = `TOKEN_ADDRESSES` + +#### tokens.xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` + +## Example + +```ts +const contracts = getContracts('sepolia'); +console.log(contracts.core.superPaymaster); +``` diff --git a/api/@aastar/sdk/functions/getCoreContracts.md b/api/@aastar/sdk/functions/getCoreContracts.md new file mode 100644 index 000000000..f01ac6770 --- /dev/null +++ b/api/@aastar/sdk/functions/getCoreContracts.md @@ -0,0 +1,81 @@ +> **getCoreContracts**(`network`): `object` + +Defined in: [packages/core/src/contracts.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L184) + +Get core system contracts + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`object` + +Core contract addresses + +### agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +### agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + +### aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` + +### dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +### entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` = `ENTRY_POINT_ADDRESS` + +### gToken + +> `readonly` **gToken**: `` `0x${string}` `` = `GTOKEN_ADDRESS` + +### gTokenStaking + +> `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` + +### microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + +### mySBT + +> `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` + +### paymasterFactory + +> `readonly` **paymasterFactory**: `` `0x${string}` `` = `PAYMASTER_FACTORY_ADDRESS` + +### paymasterV4 + +> `readonly` **paymasterV4**: `` `0x${string}` `` + +### registry + +> `readonly` **registry**: `` `0x${string}` `` = `REGISTRY_ADDRESS` + +### superPaymaster + +> `readonly` **superPaymaster**: `` `0x${string}` `` = `SUPER_PAYMASTER_ADDRESS` + +### xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` + +## Example + +```ts +const core = getCoreContracts('sepolia'); +console.log(core.superPaymaster); +console.log(core.registry); +``` diff --git a/api/@aastar/sdk/functions/getDeploymentDate.md b/api/@aastar/sdk/functions/getDeploymentDate.md new file mode 100644 index 000000000..9b030d28b --- /dev/null +++ b/api/@aastar/sdk/functions/getDeploymentDate.md @@ -0,0 +1,25 @@ +> **getDeploymentDate**(`network`, `contractName`): `string` \| `undefined` + +Defined in: [packages/core/src/contracts.ts:376](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L376) + +Get contract deployment date + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | +| `contractName` | `string` | Contract name | + +## Returns + +`string` \| `undefined` + +Deployment date string (YYYY-MM-DD) + +## Example + +```ts +const date = getDeploymentDate('sepolia', 'superPaymaster'); +// '2025-10-25' +``` diff --git a/api/@aastar/sdk/functions/getEIP3009Domain.md b/api/@aastar/sdk/functions/getEIP3009Domain.md new file mode 100644 index 000000000..bcc1ba4d5 --- /dev/null +++ b/api/@aastar/sdk/functions/getEIP3009Domain.md @@ -0,0 +1,32 @@ +> **getEIP3009Domain**(`tokenName`, `tokenVersion`, `chainId`, `verifyingContract`): `object` + +Defined in: [packages/x402/src/eip3009.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L28) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenName` | `string` | +| `tokenVersion` | `string` | +| `chainId` | `number` | +| `verifyingContract` | `` `0x${string}` `` | + +## Returns + +`object` + +### chainId + +> **chainId**: `number` + +### name + +> **name**: `string` = `tokenName` + +### verifyingContract + +> **verifyingContract**: `` `0x${string}` `` + +### version + +> **version**: `string` = `tokenVersion` diff --git a/api/@aastar/sdk/functions/getEntryPoint.md b/api/@aastar/sdk/functions/getEntryPoint.md new file mode 100644 index 000000000..90f16125d --- /dev/null +++ b/api/@aastar/sdk/functions/getEntryPoint.md @@ -0,0 +1,23 @@ +> **getEntryPoint**(`network`): `string` + +Defined in: [packages/core/src/contracts.ts:293](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L293) + +Get EntryPoint v0.7 address + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`string` + +EntryPoint address + +## Example + +```ts +const entryPoint = getEntryPoint('sepolia'); +``` diff --git a/api/@aastar/sdk/functions/getMySBTId.md b/api/@aastar/sdk/functions/getMySBTId.md new file mode 100644 index 000000000..21f8bd847 --- /dev/null +++ b/api/@aastar/sdk/functions/getMySBTId.md @@ -0,0 +1,24 @@ +> **getMySBTId**(`client`, `sbtAddress`, `user`): `Promise`\<`bigint` \| `null`\> + +Defined in: [packages/identity/src/mysbt.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/identity/src/mysbt.ts#L39) + +Fetch MySBT token ID for a specific user. +MySBT exposes `getUserSBT(address) -> uint256` (alias of the `userToSBT` +mapping), which returns the user's tokenId or 0 when they hold no SBT. + +Returns the tokenId, or `null` ONLY for the genuine "no SBT" sentinel (id == 0). +Read errors are NOT swallowed (see [checkMySBT](checkMySBT.md)): a transient RPC failure +must not be reported as "no SBT" (a false negative for eligibility). The error +propagates to the caller. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | `any` | +| `sbtAddress` | `` `0x${string}` `` | +| `user` | `` `0x${string}` `` | + +## Returns + +`Promise`\<`bigint` \| `null`\> diff --git a/api/@aastar/sdk/functions/getNetwork.md b/api/@aastar/sdk/functions/getNetwork.md new file mode 100644 index 000000000..dfcf4008a --- /dev/null +++ b/api/@aastar/sdk/functions/getNetwork.md @@ -0,0 +1,24 @@ +> **getNetwork**(`network`): \{ `blockExplorer`: `"https://sepolia.etherscan.io"`; `chainId`: `11155111`; `name`: `"Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://rpc.sepolia.org"`; \} \| \{ `blockExplorer`: `""`; `chainId`: `31337`; `name`: `"Anvil"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"http://127.0.0.1:8545"`; \} \| \{ `blockExplorer`: `"https://optimistic.etherscan.io"`; `chainId`: `10`; `name`: `"Optimism"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://mainnet.optimism.io"`; \} \| \{ `blockExplorer`: `"https://sepolia-optimism.etherscan.io"`; `chainId`: `11155420`; `name`: `"Optimism Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://sepolia.optimism.io"`; \} + +Defined in: [packages/core/src/networks.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L66) + +Get network configuration + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"anvil"` \| `"optimism"` \| `"sepolia"` \| `"op-sepolia"` | Network name | + +## Returns + +\{ `blockExplorer`: `"https://sepolia.etherscan.io"`; `chainId`: `11155111`; `name`: `"Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://rpc.sepolia.org"`; \} \| \{ `blockExplorer`: `""`; `chainId`: `31337`; `name`: `"Anvil"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"ETH"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"http://127.0.0.1:8545"`; \} \| \{ `blockExplorer`: `"https://optimistic.etherscan.io"`; `chainId`: `10`; `name`: `"Optimism"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://mainnet.optimism.io"`; \} \| \{ `blockExplorer`: `"https://sepolia-optimism.etherscan.io"`; `chainId`: `11155420`; `name`: `"Optimism Sepolia"`; `nativeCurrency`: \{ `decimals`: `18`; `name`: `"Sepolia Ether"`; `symbol`: `"ETH"`; \}; `rpcUrl`: `"https://sepolia.optimism.io"`; \} + +Network configuration + +## Example + +```ts +const network = getNetwork('sepolia'); +console.log(network.chainId); // 11155111 +``` diff --git a/api/@aastar/sdk/functions/getPaymasterV4Middleware.md b/api/@aastar/sdk/functions/getPaymasterV4Middleware.md new file mode 100644 index 000000000..72a6b68d8 --- /dev/null +++ b/api/@aastar/sdk/functions/getPaymasterV4Middleware.md @@ -0,0 +1,31 @@ +> **getPaymasterV4Middleware**(`config`): `object` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L31) + +Constructs the middleware for Paymaster V4. +Returns the `paymasterAndData` hex string. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`PaymasterV4MiddlewareConfig`](../type-aliases/PaymasterV4MiddlewareConfig.md) | + +## Returns + +`object` + +### sponsorUserOperation() + +> **sponsorUserOperation**: (`args`) => `Promise`\<\{ `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `any`; `verificationGasLimit`: `bigint`; \}\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `userOperation`: `any`; \} | +| `args.userOperation` | `any` | + +#### Returns + +`Promise`\<\{ `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `any`; `verificationGasLimit`: `bigint`; \}\> diff --git a/api/@aastar/sdk/functions/getPaymasterV4_1.md b/api/@aastar/sdk/functions/getPaymasterV4_1.md new file mode 100644 index 000000000..6508508d9 --- /dev/null +++ b/api/@aastar/sdk/functions/getPaymasterV4_1.md @@ -0,0 +1,23 @@ +> **getPaymasterV4\_1**(`network`): `string` + +Defined in: [packages/core/src/contracts.ts:232](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L232) + +Get PaymasterV4_1 address (AOA mode) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`string` + +PaymasterV4_1 address + +## Example + +```ts +const paymaster = getPaymasterV4_1('sepolia'); +``` diff --git a/api/@aastar/sdk/functions/getRoleName.md b/api/@aastar/sdk/functions/getRoleName.md new file mode 100644 index 000000000..181de9e63 --- /dev/null +++ b/api/@aastar/sdk/functions/getRoleName.md @@ -0,0 +1,15 @@ +> **getRoleName**(`roleHash`): `string` + +Defined in: [packages/core/src/roles.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L142) + +Get human-readable role name + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `roleHash` | `` `0x${string}` `` | + +## Returns + +`string` diff --git a/api/@aastar/sdk/functions/getRpcUrl.md b/api/@aastar/sdk/functions/getRpcUrl.md new file mode 100644 index 000000000..4817ba08f --- /dev/null +++ b/api/@aastar/sdk/functions/getRpcUrl.md @@ -0,0 +1,23 @@ +> **getRpcUrl**(`network`): `"https://rpc.sepolia.org"` \| `"http://127.0.0.1:8545"` \| `"https://mainnet.optimism.io"` \| `"https://sepolia.optimism.io"` + +Defined in: [packages/core/src/networks.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L81) + +Get RPC URL for a network + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"anvil"` \| `"optimism"` \| `"sepolia"` \| `"op-sepolia"` | Network name | + +## Returns + +`"https://rpc.sepolia.org"` \| `"http://127.0.0.1:8545"` \| `"https://mainnet.optimism.io"` \| `"https://sepolia.optimism.io"` + +Public RPC URL + +## Example + +```ts +const rpcUrl = getRpcUrl('sepolia'); +``` diff --git a/api/@aastar/sdk/functions/getSimpleAccountFactory.md b/api/@aastar/sdk/functions/getSimpleAccountFactory.md new file mode 100644 index 000000000..f7741abd0 --- /dev/null +++ b/api/@aastar/sdk/functions/getSimpleAccountFactory.md @@ -0,0 +1,23 @@ +> **getSimpleAccountFactory**(`network`): `string` + +Defined in: [packages/core/src/contracts.ts:263](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L263) + +Get SimpleAccountFactory address + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`string` + +SimpleAccountFactory address + +## Example + +```ts +const factory = getSimpleAccountFactory('sepolia'); +``` diff --git a/api/@aastar/sdk/functions/getSuperPaymasterMiddleware.md b/api/@aastar/sdk/functions/getSuperPaymasterMiddleware.md new file mode 100644 index 000000000..d61c0342b --- /dev/null +++ b/api/@aastar/sdk/functions/getSuperPaymasterMiddleware.md @@ -0,0 +1,31 @@ +> **getSuperPaymasterMiddleware**(`config`): `object` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L19) + +Constructs the middleware for SuperPaymaster. +Returns the `paymasterAndData` hex string. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`PaymasterConfig`](../type-aliases/PaymasterConfig.md) | + +## Returns + +`object` + +### sponsorUserOperation() + +> **sponsorUserOperation**: (`args`) => `Promise`\<\{ `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `any`; `verificationGasLimit`: `bigint`; \}\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `userOperation`: `any`; \} | +| `args.userOperation` | `any` | + +#### Returns + +`Promise`\<\{ `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `any`; `verificationGasLimit`: `bigint`; \}\> diff --git a/api/@aastar/sdk/functions/getSuperPaymasterV2.md b/api/@aastar/sdk/functions/getSuperPaymasterV2.md new file mode 100644 index 000000000..833f64cd6 --- /dev/null +++ b/api/@aastar/sdk/functions/getSuperPaymasterV2.md @@ -0,0 +1,23 @@ +> **getSuperPaymasterV2**(`network`): `string` + +Defined in: [packages/core/src/contracts.ts:278](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L278) + +Get SuperPaymaster V2 address (AOA+ mode) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`string` + +SuperPaymaster V2 address + +## Example + +```ts +const superPaymaster = getSuperPaymasterV2('sepolia'); +``` diff --git a/api/@aastar/sdk/functions/getTestAccounts.md b/api/@aastar/sdk/functions/getTestAccounts.md new file mode 100644 index 000000000..c54b14085 --- /dev/null +++ b/api/@aastar/sdk/functions/getTestAccounts.md @@ -0,0 +1,28 @@ +> **getTestAccounts**(`network`): `object` + +Defined in: [packages/core/src/contracts.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L248) + +Get test account contracts (SimpleAccountFactory, etc.) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`object` + +Test account contract addresses + +### simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `` `0x${string}` `` + +## Example + +```ts +const testAccounts = getTestAccounts('sepolia'); +console.log(testAccounts.simpleAccountFactory); +``` diff --git a/api/@aastar/sdk/functions/getTestTokenContracts.md b/api/@aastar/sdk/functions/getTestTokenContracts.md new file mode 100644 index 000000000..006c1e038 --- /dev/null +++ b/api/@aastar/sdk/functions/getTestTokenContracts.md @@ -0,0 +1,36 @@ +> **getTestTokenContracts**(`network`): `object` + +Defined in: [packages/core/src/contracts.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L217) + +Get test token contracts (for development & testing) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`object` + +Test token contract addresses + +### aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` + +### bPNTs + +> `readonly` **bPNTs**: `` `0x${string}` `` + +### mockUSDT + +> `readonly` **mockUSDT**: `` `0x${string}` `` + +## Example + +```ts +const testTokens = getTestTokenContracts('sepolia'); +console.log(testTokens.mockUSDT); +``` diff --git a/api/@aastar/sdk/functions/getTokenContracts.md b/api/@aastar/sdk/functions/getTokenContracts.md new file mode 100644 index 000000000..10d539077 --- /dev/null +++ b/api/@aastar/sdk/functions/getTokenContracts.md @@ -0,0 +1,29 @@ +> **getTokenContracts**(`network`): `object` + +Defined in: [packages/core/src/contracts.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L201) + +Get token system contracts + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"sepolia"` | Network name | + +## Returns + +`object` + +Token contract addresses + +### xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` + +## Example + +```ts +const tokens = getTokenContracts('sepolia'); +console.log(tokens.xPNTsFactory); +console.log(tokens.mySBT); +``` diff --git a/api/@aastar/sdk/functions/getTxUrl.md b/api/@aastar/sdk/functions/getTxUrl.md new file mode 100644 index 000000000..c3e3d2521 --- /dev/null +++ b/api/@aastar/sdk/functions/getTxUrl.md @@ -0,0 +1,25 @@ +> **getTxUrl**(`network`, `txHash`): `string` + +Defined in: [packages/core/src/networks.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L114) + +Get transaction URL on block explorer + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `"anvil"` \| `"optimism"` \| `"sepolia"` \| `"op-sepolia"` | Network name | +| `txHash` | `string` | Transaction hash | + +## Returns + +`string` + +Full transaction URL + +## Example + +```ts +const url = getTxUrl('sepolia', '0x123...'); +// 'https://sepolia.etherscan.io/tx/0x123...' +``` diff --git a/api/@aastar/sdk/functions/getUserOpHash.md b/api/@aastar/sdk/functions/getUserOpHash.md new file mode 100644 index 000000000..797827cc9 --- /dev/null +++ b/api/@aastar/sdk/functions/getUserOpHash.md @@ -0,0 +1,17 @@ +> **getUserOpHash**(`op`, `ep`, `chainId`): `` `0x${string}` `` + +Defined in: [packages/account/src/index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L16) + +Local implementation of EntryPoint v0.7 getUserOpHash + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `op` | `any` | +| `ep` | `` `0x${string}` `` | +| `chainId` | `number` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/getUserOpHashV07.md b/api/@aastar/sdk/functions/getUserOpHashV07.md new file mode 100644 index 000000000..8c4411857 --- /dev/null +++ b/api/@aastar/sdk/functions/getUserOpHashV07.md @@ -0,0 +1,15 @@ +> **getUserOpHashV07**(`userOp`, `entryPoint`, `chainId`): `` `0x${string}` `` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L169) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `any` | +| `entryPoint` | `` `0x${string}` `` | +| `chainId` | `bigint` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/getV2ContractByAddress.md b/api/@aastar/sdk/functions/getV2ContractByAddress.md new file mode 100644 index 000000000..610b9b744 --- /dev/null +++ b/api/@aastar/sdk/functions/getV2ContractByAddress.md @@ -0,0 +1,26 @@ +> **getV2ContractByAddress**(`address`): [`ContractVersion`](../interfaces/ContractVersion.md) \| `undefined` + +Defined in: [packages/core/src/contract-versions.ts:322](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L322) + +Get V2 contract by address + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `address` | `string` | Contract address (case-insensitive) | + +## Returns + +[`ContractVersion`](../interfaces/ContractVersion.md) \| `undefined` + +Contract version info or undefined + +## Example + +```ts +const contract = getV2ContractByAddress('0xB97A20aca3D6770Deca299a1aD9DAFb12d1e5eCf'); +if (contract) { + console.log(`Found: ${contract.name} v${contract.version}`); +} +``` diff --git a/api/@aastar/sdk/functions/getV2ContractByName.md b/api/@aastar/sdk/functions/getV2ContractByName.md new file mode 100644 index 000000000..3c924cf51 --- /dev/null +++ b/api/@aastar/sdk/functions/getV2ContractByName.md @@ -0,0 +1,26 @@ +> **getV2ContractByName**(`name`): [`ContractVersion`](../interfaces/ContractVersion.md) \| `undefined` + +Defined in: [packages/core/src/contract-versions.ts:303](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L303) + +Get V2 contract by name + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `name` | `string` | Contract name | + +## Returns + +[`ContractVersion`](../interfaces/ContractVersion.md) \| `undefined` + +Contract version info or undefined + +## Example + +```ts +const contract = getV2ContractByName('SuperPaymasterV2'); +if (contract) { + console.log(`Version: ${contract.version}`); +} +``` diff --git a/api/@aastar/sdk/functions/getV2ContractsByDate.md b/api/@aastar/sdk/functions/getV2ContractsByDate.md new file mode 100644 index 000000000..4ea55d960 --- /dev/null +++ b/api/@aastar/sdk/functions/getV2ContractsByDate.md @@ -0,0 +1,24 @@ +> **getV2ContractsByDate**(`date`): [`ContractVersion`](../interfaces/ContractVersion.md)[] + +Defined in: [packages/core/src/contract-versions.ts:356](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L356) + +Get all V2 contracts deployed on a specific date + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `date` | `string` | Deployment date (YYYY-MM-DD) | + +## Returns + +[`ContractVersion`](../interfaces/ContractVersion.md)[] + +Array of contracts deployed on that date + +## Example + +```ts +const contracts = getV2ContractsByDate('2025-11-01'); +console.log(`${contracts.length} contracts deployed on 2025-11-01`); +``` diff --git a/api/@aastar/sdk/functions/getVoucherDomain.md b/api/@aastar/sdk/functions/getVoucherDomain.md new file mode 100644 index 000000000..f123e7a2b --- /dev/null +++ b/api/@aastar/sdk/functions/getVoucherDomain.md @@ -0,0 +1,30 @@ +> **getVoucherDomain**(`chainId`, `verifyingContract`): `object` + +Defined in: [packages/channel/src/voucher.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/voucher.ts#L10) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `chainId` | `number` | +| `verifyingContract` | `` `0x${string}` `` | + +## Returns + +`object` + +### chainId + +> **chainId**: `number` + +### name + +> **name**: `string` = `'MicroPaymentChannel'` + +### verifyingContract + +> **verifyingContract**: `` `0x${string}` `` + +### version + +> **version**: `string` = `'1.0.0'` diff --git a/api/@aastar/sdk/functions/hashToFieldU0U1.md b/api/@aastar/sdk/functions/hashToFieldU0U1.md new file mode 100644 index 000000000..aa4ddb977 --- /dev/null +++ b/api/@aastar/sdk/functions/hashToFieldU0U1.md @@ -0,0 +1,25 @@ +> **hashToFieldU0U1**(`message`): [`HashToFieldU0U1`](../interfaces/HashToFieldU0U1.md) + +Defined in: [packages/core/src/crypto/hashToField.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L73) + +Compute `hash_to_field(message, DST=BLS_POP_DST, count=2)` for BLS12-381 G2 +and serialize the resulting two Fp2 elements (u0, u1) into SuperPaymaster's +EIP-2537 split-bytes32 layout. + +This is the authoritative cross-repo golden surface for DVT: the node, the +SDK, and the on-chain verifier must all agree byte-for-byte on (u0, u1). +Full hash-to-curve (map_to_curve + clear_cofactor) is intentionally NOT +computed here because it needs EIP-2537 precompiles absent on cancun; the +contract only verifies the `hash_to_field` intermediate. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `message` | `` `0x${string}` `` | The message to hash (arbitrary-length bytes, as Hex). | + +## Returns + +[`HashToFieldU0U1`](../interfaces/HashToFieldU0U1.md) + +The 8 bytes32 values (u0/u1 × c0/c1 × a/b). diff --git a/api/@aastar/sdk/functions/isContractNetworkSupported.md b/api/@aastar/sdk/functions/isContractNetworkSupported.md new file mode 100644 index 000000000..2b7dba57f --- /dev/null +++ b/api/@aastar/sdk/functions/isContractNetworkSupported.md @@ -0,0 +1,25 @@ +> **isContractNetworkSupported**(`network`): `network is "sepolia"` + +Defined in: [packages/core/src/contracts.ts:310](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L310) + +Check if a network is supported for contracts + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `network` | `string` | Network name to check | + +## Returns + +`network is "sepolia"` + +True if network is supported + +## Example + +```ts +if (isContractNetworkSupported('sepolia')) { + const contracts = getContracts('sepolia'); +} +``` diff --git a/api/@aastar/sdk/functions/isRegisteredCommunity.md b/api/@aastar/sdk/functions/isRegisteredCommunity.md new file mode 100644 index 000000000..a07b09bba --- /dev/null +++ b/api/@aastar/sdk/functions/isRegisteredCommunity.md @@ -0,0 +1,15 @@ +> **isRegisteredCommunity**(`address`): `boolean` + +Defined in: [packages/core/src/communities.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L91) + +Check if address is a registered community + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `string` | + +## Returns + +`boolean` diff --git a/api/@aastar/sdk/functions/isSupportedChainId.md b/api/@aastar/sdk/functions/isSupportedChainId.md new file mode 100644 index 000000000..fabd64c18 --- /dev/null +++ b/api/@aastar/sdk/functions/isSupportedChainId.md @@ -0,0 +1,15 @@ +> **isSupportedChainId**(`chainId`): chainId is 10 \| 11155111 \| 11155420 + +Defined in: [packages/core/src/addresses.ts:200](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L200) + +True if [CANONICAL\_ADDRESSES](../variables/CANONICAL_ADDRESSES.md) has an entry for `chainId`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `chainId` | `number` | + +## Returns + +chainId is 10 \| 11155111 \| 11155420 diff --git a/api/@aastar/sdk/functions/isV2Contract.md b/api/@aastar/sdk/functions/isV2Contract.md new file mode 100644 index 000000000..0379a25a6 --- /dev/null +++ b/api/@aastar/sdk/functions/isV2Contract.md @@ -0,0 +1,25 @@ +> **isV2Contract**(`address`): `boolean` + +Defined in: [packages/core/src/contract-versions.ts:340](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L340) + +Check if an address is a V2 contract + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `address` | `string` | Contract address to check | + +## Returns + +`boolean` + +True if address is a V2 contract + +## Example + +```ts +if (isV2Contract('0xB97A20aca3D6770Deca299a1aD9DAFb12d1e5eCf')) { + console.log('This is a V2 contract with VERSION interface'); +} +``` diff --git a/api/@aastar/sdk/functions/listSupportedChainIds.md b/api/@aastar/sdk/functions/listSupportedChainIds.md new file mode 100644 index 000000000..f3d888c6d --- /dev/null +++ b/api/@aastar/sdk/functions/listSupportedChainIds.md @@ -0,0 +1,15 @@ +> **listSupportedChainIds**(): `number`[] + +Defined in: [packages/core/src/addresses.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L195) + +Chain IDs that have a canonical address book in [CANONICAL\_ADDRESSES](../variables/CANONICAL_ADDRESSES.md). + +## Returns + +`number`[] + +## Example + +```ts +listSupportedChainIds(); // [10, 11155111, 11155420] +``` diff --git a/api/@aastar/sdk/functions/lookupAddress.md b/api/@aastar/sdk/functions/lookupAddress.md new file mode 100644 index 000000000..393b5bba4 --- /dev/null +++ b/api/@aastar/sdk/functions/lookupAddress.md @@ -0,0 +1,23 @@ +> **lookupAddress**(`address`, `options`): `Promise`\<`string` \| `null`\> + +Defined in: [packages/core/src/utils/ens.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L64) + +Reverse-resolve an Ethereum address to its primary ENS name. +Returns null if the address has no reverse record. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | +| `options` | [`EnsOptions`](../interfaces/EnsOptions.md) | + +## Returns + +`Promise`\<`string` \| `null`\> + +## Example + +```ts +const name = await lookupAddress('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'); +``` diff --git a/api/@aastar/sdk/functions/packUserOpLimits.md b/api/@aastar/sdk/functions/packUserOpLimits.md new file mode 100644 index 000000000..b230360e1 --- /dev/null +++ b/api/@aastar/sdk/functions/packUserOpLimits.md @@ -0,0 +1,16 @@ +> **packUserOpLimits**(`high`, `low`): `` `0x${string}` `` + +Defined in: [packages/account/src/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/index.ts#L9) + +Common Pack Logic for v0.7 UserOperations + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `high` | `bigint` | +| `low` | `bigint` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/paymasterActions.md b/api/@aastar/sdk/functions/paymasterActions.md new file mode 100644 index 000000000..57166966d --- /dev/null +++ b/api/@aastar/sdk/functions/paymasterActions.md @@ -0,0 +1,23 @@ +> **paymasterActions**(`address`): (`client`) => [`PaymasterActions`](../type-aliases/PaymasterActions.md) + +Defined in: [packages/core/src/actions/paymaster.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L79) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`PaymasterActions`](../type-aliases/PaymasterActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`PaymasterActions`](../type-aliases/PaymasterActions.md) diff --git a/api/@aastar/sdk/functions/paymasterFactoryActions.md b/api/@aastar/sdk/functions/paymasterFactoryActions.md new file mode 100644 index 000000000..c096c978b --- /dev/null +++ b/api/@aastar/sdk/functions/paymasterFactoryActions.md @@ -0,0 +1,23 @@ +> **paymasterFactoryActions**(`address`): (`client`) => [`PaymasterFactoryActions`](../type-aliases/PaymasterFactoryActions.md) + +Defined in: [packages/core/src/actions/factory.ts:416](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L416) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`PaymasterFactoryActions`](../type-aliases/PaymasterFactoryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`PaymasterFactoryActions`](../type-aliases/PaymasterFactoryActions.md) diff --git a/api/@aastar/sdk/functions/policyRegistryActions.md b/api/@aastar/sdk/functions/policyRegistryActions.md new file mode 100644 index 000000000..4c92fad30 --- /dev/null +++ b/api/@aastar/sdk/functions/policyRegistryActions.md @@ -0,0 +1,37 @@ +> **policyRegistryActions**(`address`): (`client`) => [`PolicyRegistryActions`](../type-aliases/PolicyRegistryActions.md) + +Defined in: [packages/core/src/actions/policyRegistry.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L179) + +Action factory for the SuperPaymaster v5.4 PolicyRegistry (DVT layer-1 account policy). + +Asymmetric lifecycle (enforced ON-CHAIN — the SDK is only a client and does NOT +re-implement the delay): + - IMMEDIATE tighten/freeze: [PolicyRegistryActions.tightenAssetPolicy](../type-aliases/PolicyRegistryActions.md#tightenassetpolicy) / + [PolicyRegistryActions.tightenContractScope](../type-aliases/PolicyRegistryActions.md#tightencontractscope) / [PolicyRegistryActions.freezeSender](../type-aliases/PolicyRegistryActions.md#freezesender) + (guardian OR timelock). + - TIMELOCKED loosen/unfreeze/admin: [PolicyRegistryActions.setAssetPolicy](../type-aliases/PolicyRegistryActions.md#setassetpolicy) / + [PolicyRegistryActions.setContractScope](../type-aliases/PolicyRegistryActions.md#setcontractscope) / [PolicyRegistryActions.unfreezeSender](../type-aliases/PolicyRegistryActions.md#unfreezesender) / + [PolicyRegistryActions.setGuardian](../type-aliases/PolicyRegistryActions.md#setguardian) / [PolicyRegistryActions.setConsumerAuthorization](../type-aliases/PolicyRegistryActions.md#setconsumerauthorization) + — `onlyTimelock`. The 2-day delay is the EXTERNAL OZ TimelockController's `minDelay`; + this registry has NO pending-change store, so callers must schedule/execute through + [PolicyRegistryActions.timelock](../type-aliases/PolicyRegistryActions.md#timelock) and read the controller's ETA themselves. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`PolicyRegistryActions`](../type-aliases/PolicyRegistryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`PolicyRegistryActions`](../type-aliases/PolicyRegistryActions.md) diff --git a/api/@aastar/sdk/functions/registryActions.md b/api/@aastar/sdk/functions/registryActions.md new file mode 100644 index 000000000..603693289 --- /dev/null +++ b/api/@aastar/sdk/functions/registryActions.md @@ -0,0 +1,23 @@ +> **registryActions**(`address`): (`client`) => [`RegistryActions`](../type-aliases/RegistryActions.md) + +Defined in: [packages/core/src/actions/registry.ts:282](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L282) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`RegistryActions`](../type-aliases/RegistryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`RegistryActions`](../type-aliases/RegistryActions.md) diff --git a/api/@aastar/sdk/functions/reputationActions.md b/api/@aastar/sdk/functions/reputationActions.md new file mode 100644 index 000000000..bd5d2cba3 --- /dev/null +++ b/api/@aastar/sdk/functions/reputationActions.md @@ -0,0 +1,23 @@ +> **reputationActions**(`address`): (`client`) => [`ReputationActions`](../type-aliases/ReputationActions.md) + +Defined in: [packages/core/src/actions/reputation.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L107) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`ReputationActions`](../type-aliases/ReputationActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`ReputationActions`](../type-aliases/ReputationActions.md) diff --git a/api/@aastar/sdk/functions/resolveEns.md b/api/@aastar/sdk/functions/resolveEns.md new file mode 100644 index 000000000..39f1d7586 --- /dev/null +++ b/api/@aastar/sdk/functions/resolveEns.md @@ -0,0 +1,23 @@ +> **resolveEns**(`name`, `options`): `Promise`\<`` `0x${string}` `` \| `null`\> + +Defined in: [packages/core/src/utils/ens.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L49) + +Forward-resolve an ENS name to an Ethereum address. +Returns null if the name has no address record. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `name` | `string` | +| `options` | [`EnsOptions`](../interfaces/EnsOptions.md) | + +## Returns + +`Promise`\<`` `0x${string}` `` \| `null`\> + +## Example + +```ts +const address = await resolveEns('vitalik.eth'); +``` diff --git a/api/@aastar/sdk/functions/resolveEnsVerified.md b/api/@aastar/sdk/functions/resolveEnsVerified.md new file mode 100644 index 000000000..c63936ea2 --- /dev/null +++ b/api/@aastar/sdk/functions/resolveEnsVerified.md @@ -0,0 +1,20 @@ +> **resolveEnsVerified**(`name`, `options`): `Promise`\<\{ `address`: `` `0x${string}` `` \| `null`; `name`: `string`; `verified`: `boolean`; \}\> + +Defined in: [packages/core/src/utils/ens.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L79) + +Resolve both directions at once: given an ENS name, return the address and +confirm the reverse record matches (to detect misconfigurations). + +Returns `{ address, name, verified }` where `verified` is true only when +the reverse record of the resolved address points back to `name`. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `name` | `string` | +| `options` | [`EnsOptions`](../interfaces/EnsOptions.md) | + +## Returns + +`Promise`\<\{ `address`: `` `0x${string}` `` \| `null`; `name`: `string`; `verified`: `boolean`; \}\> diff --git a/api/@aastar/sdk/functions/sbtActions.md b/api/@aastar/sdk/functions/sbtActions.md new file mode 100644 index 000000000..540e91f52 --- /dev/null +++ b/api/@aastar/sdk/functions/sbtActions.md @@ -0,0 +1,23 @@ +> **sbtActions**(`address`): (`client`) => [`SBTActions`](../type-aliases/SBTActions.md) + +Defined in: [packages/core/src/actions/sbt.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L121) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`SBTActions`](../type-aliases/SBTActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`SBTActions`](../type-aliases/SBTActions.md) diff --git a/api/@aastar/sdk/functions/sessionKeyValidatorActions.md b/api/@aastar/sdk/functions/sessionKeyValidatorActions.md new file mode 100644 index 000000000..53010f6d8 --- /dev/null +++ b/api/@aastar/sdk/functions/sessionKeyValidatorActions.md @@ -0,0 +1,23 @@ +> **sessionKeyValidatorActions**(`address`): (`client`) => [`SessionKeyValidatorActions`](../type-aliases/SessionKeyValidatorActions.md) + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L26) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`SessionKeyValidatorActions`](../type-aliases/SessionKeyValidatorActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`SessionKeyValidatorActions`](../type-aliases/SessionKeyValidatorActions.md) diff --git a/api/@aastar/sdk/functions/signCancelAuthorization.md b/api/@aastar/sdk/functions/signCancelAuthorization.md new file mode 100644 index 000000000..6284a2f13 --- /dev/null +++ b/api/@aastar/sdk/functions/signCancelAuthorization.md @@ -0,0 +1,66 @@ +> **signCancelAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:186](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L186) + +Sign a CancelAuthorization for GTokenAuthorization (EIP-3009). +Must be signed by the original `authorizer` address. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `authorizer`: `` `0x${string}` ``; `chainId`: `number`; `nonce`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.authorizer` | `` `0x${string}` `` | - | +| `params.chainId` | `number` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/functions/signGTokenTransferWithAuthorization.md b/api/@aastar/sdk/functions/signGTokenTransferWithAuthorization.md new file mode 100644 index 000000000..7e5011d52 --- /dev/null +++ b/api/@aastar/sdk/functions/signGTokenTransferWithAuthorization.md @@ -0,0 +1,72 @@ +> **signGTokenTransferWithAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L95) + +Sign a TransferWithAuthorization for GTokenAuthorization (EIP-3009). +GToken-specific wrapper: enforces MAX_AUTH_VALIDITY = 300s before signing. +Use this instead of the generic signTransferWithAuthorization when the +verifying contract is GTokenAuthorization. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.to` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.validAfter` | `bigint` | - | +| `params.validBefore` | `bigint` | - | +| `params.value` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/functions/signReceiveWithAuthorization.md b/api/@aastar/sdk/functions/signReceiveWithAuthorization.md new file mode 100644 index 000000000..b101b05f9 --- /dev/null +++ b/api/@aastar/sdk/functions/signReceiveWithAuthorization.md @@ -0,0 +1,71 @@ +> **signReceiveWithAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L134) + +Sign a ReceiveWithAuthorization for GTokenAuthorization (EIP-3009). +The signed `to` address must be the one submitting the transaction on-chain. +Note: `xPNTsToken` is NOT included in the signature (it's a relay-supplied hint for RC-2). + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.to` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.validAfter` | `bigint` | - | +| `params.validBefore` | `bigint` | - | +| `params.value` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/functions/signTransferWithAuthorization.md b/api/@aastar/sdk/functions/signTransferWithAuthorization.md new file mode 100644 index 000000000..846f78090 --- /dev/null +++ b/api/@aastar/sdk/functions/signTransferWithAuthorization.md @@ -0,0 +1,67 @@ +> **signTransferWithAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L46) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.to` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.validAfter` | `bigint` | - | +| `params.validBefore` | `bigint` | - | +| `params.value` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/functions/signVoucher.md b/api/@aastar/sdk/functions/signVoucher.md new file mode 100644 index 000000000..e322fe15e --- /dev/null +++ b/api/@aastar/sdk/functions/signVoucher.md @@ -0,0 +1,61 @@ +> **signVoucher**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/channel/src/voucher.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/voucher.ts#L19) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `channelId`: `` `0x${string}` ``; `cumulativeAmount`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.channelId` | `` `0x${string}` `` | - | +| `params.cumulativeAmount` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/sdk/functions/stakingActions.md b/api/@aastar/sdk/functions/stakingActions.md new file mode 100644 index 000000000..f6b65a656 --- /dev/null +++ b/api/@aastar/sdk/functions/stakingActions.md @@ -0,0 +1,23 @@ +> **stakingActions**(`address`): (`client`) => [`StakingActions`](../type-aliases/StakingActions.md) + +Defined in: [packages/core/src/actions/staking.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L89) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`StakingActions`](../type-aliases/StakingActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`StakingActions`](../type-aliases/StakingActions.md) diff --git a/api/@aastar/sdk/functions/superPaymasterActions.md b/api/@aastar/sdk/functions/superPaymasterActions.md new file mode 100644 index 000000000..e18002ca0 --- /dev/null +++ b/api/@aastar/sdk/functions/superPaymasterActions.md @@ -0,0 +1,23 @@ +> **superPaymasterActions**(`address`): (`client`) => [`SuperPaymasterActions`](../type-aliases/SuperPaymasterActions.md) + +Defined in: [packages/core/src/actions/superPaymaster.ts:225](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L225) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`SuperPaymasterActions`](../type-aliases/SuperPaymasterActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`SuperPaymasterActions`](../type-aliases/SuperPaymasterActions.md) diff --git a/api/@aastar/sdk/functions/toSimpleSmartAccount.md b/api/@aastar/sdk/functions/toSimpleSmartAccount.md new file mode 100644 index 000000000..e11c24376 --- /dev/null +++ b/api/@aastar/sdk/functions/toSimpleSmartAccount.md @@ -0,0 +1,31 @@ +> **toSimpleSmartAccount**(`parameters`): `Promise`\<[`SimpleSmartAccount`](../type-aliases/SimpleSmartAccount.md)\> + +Defined in: [packages/account/src/accounts/simple.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/accounts/simple.ts#L22) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | \{ `client`: `any`; `entryPoint`: \{ `address`: `` `0x${string}` ``; `version`: `"0.6"` \| `"0.7"`; \}; `factoryAddress`: `` `0x${string}` ``; `index?`: `bigint`; `owner`: \{ `address`: `` `0x${string}` ``; `nonceManager?`: [`NonceManager`](https://viem.sh/docs/index.html); `publicKey`: `` `0x${string}` ``; `sign?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; `signAuthorization?`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`__namedParameters`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`serializer`, `transaction`\>(`transaction`, `options?`) => `Promise`\<`` `0x${string}` ``\>; `signTypedData`: \<`typedData`, `primaryType`\>(`parameters`) => `Promise`\<`` `0x${string}` ``\>; `source`: `string`; `type`: `"local"`; \}; `salt?`: `bigint`; \} | +| `parameters.client` | `any` | +| `parameters.entryPoint` | \{ `address`: `` `0x${string}` ``; `version`: `"0.6"` \| `"0.7"`; \} | +| `parameters.entryPoint.address` | `` `0x${string}` `` | +| `parameters.entryPoint.version` | `"0.6"` \| `"0.7"` | +| `parameters.factoryAddress` | `` `0x${string}` `` | +| `parameters.index?` | `bigint` | +| `parameters.owner` | \{ `address`: `` `0x${string}` ``; `nonceManager?`: [`NonceManager`](https://viem.sh/docs/index.html); `publicKey`: `` `0x${string}` ``; `sign?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; `signAuthorization?`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`__namedParameters`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`serializer`, `transaction`\>(`transaction`, `options?`) => `Promise`\<`` `0x${string}` ``\>; `signTypedData`: \<`typedData`, `primaryType`\>(`parameters`) => `Promise`\<`` `0x${string}` ``\>; `source`: `string`; `type`: `"local"`; \} | +| `parameters.owner.address` | `` `0x${string}` `` | +| `parameters.owner.nonceManager?` | [`NonceManager`](https://viem.sh/docs/index.html) | +| `parameters.owner.publicKey` | `` `0x${string}` `` | +| `parameters.owner.sign?` | (`parameters`) => `Promise`\<`` `0x${string}` ``\> | +| `parameters.owner.signAuthorization?` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | +| `parameters.owner.signMessage` | (`__namedParameters`) => `Promise`\<`` `0x${string}` ``\> | +| `parameters.owner.signTransaction` | \<`serializer`, `transaction`\>(`transaction`, `options?`) => `Promise`\<`` `0x${string}` ``\> | +| `parameters.owner.signTypedData` | \<`typedData`, `primaryType`\>(`parameters`) => `Promise`\<`` `0x${string}` ``\> | +| `parameters.owner.source` | `string` | +| `parameters.owner.type` | `"local"` | +| `parameters.salt?` | `bigint` | + +## Returns + +`Promise`\<[`SimpleSmartAccount`](../type-aliases/SimpleSmartAccount.md)\> diff --git a/api/@aastar/sdk/functions/tokenActions.md b/api/@aastar/sdk/functions/tokenActions.md new file mode 100644 index 000000000..0a1704226 --- /dev/null +++ b/api/@aastar/sdk/functions/tokenActions.md @@ -0,0 +1,23 @@ +> **tokenActions**(`address?`): (`client`) => [`TokenActions`](../type-aliases/TokenActions.md) + +Defined in: [packages/core/src/actions/tokens.ts:631](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L631) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address?` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`TokenActions`](../type-aliases/TokenActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`TokenActions`](../type-aliases/TokenActions.md) diff --git a/api/@aastar/sdk/functions/tuneGasLimit.md b/api/@aastar/sdk/functions/tuneGasLimit.md new file mode 100644 index 000000000..90d2b89d9 --- /dev/null +++ b/api/@aastar/sdk/functions/tuneGasLimit.md @@ -0,0 +1,18 @@ +> **tuneGasLimit**(`estimate`, `nominalActual`, `targetEfficiency`): `bigint` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L193) + +Tune gas limit using a dynamic nominal ceiling to satisfy Bundler efficiency (0.4) +Target: Actual / Limit >= targetEfficiency + +## Parameters + +| Parameter | Type | Default value | +| ------ | ------ | ------ | +| `estimate` | `bigint` | `undefined` | +| `nominalActual` | `bigint` | `undefined` | +| `targetEfficiency` | `number` | `0.45` | + +## Returns + +`bigint` diff --git a/api/@aastar/sdk/functions/x402Actions.md b/api/@aastar/sdk/functions/x402Actions.md new file mode 100644 index 000000000..6f1984fa7 --- /dev/null +++ b/api/@aastar/sdk/functions/x402Actions.md @@ -0,0 +1,27 @@ +> **x402Actions**(`address`): (`client`) => [`X402Actions`](../type-aliases/X402Actions.md) + +Defined in: [packages/core/src/actions/x402.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L75) + +x402 settlement actions. As of SP v5.4 these functions live on the standalone +X402Facilitator contract (NOT SuperPaymaster), so `address` MUST be the deployed +X402Facilitator address — passing the SuperPaymaster address will revert on-chain. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`X402Actions`](../type-aliases/X402Actions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`X402Actions`](../type-aliases/X402Actions.md) diff --git a/api/@aastar/sdk/functions/x402IsNonceUsed.md b/api/@aastar/sdk/functions/x402IsNonceUsed.md new file mode 100644 index 000000000..d49c12841 --- /dev/null +++ b/api/@aastar/sdk/functions/x402IsNonceUsed.md @@ -0,0 +1,94 @@ +> **x402IsNonceUsed**(`client`, `superPaymasterAddress`, `params`): `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/x402.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L23) + +Checks if an x402 settlement nonce has been used. +Queries the triple-key slot: keccak256(abi.encode(asset, from, nonce)). +Replaces the pre-P0-13 pattern of querying x402SettlementNonces({ nonce }). + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} | - | +| `client.account` | `undefined` | The Account of the Client. | +| `client.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `client.call` | (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `client.createAccessList` | (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> | Creates an EIP-2930 access list that you can include in a transaction. - Docs: https://viem.sh/docs/actions/public/createAccessList - JSON-RPC Methods: `eth_createAccessList` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.createAccessList({ data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', })` | +| `client.createBlockFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **Example** `import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' }` | +| `client.createContractEventFilter` | \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> | 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). - Docs: https://viem.sh/docs/contract/createContractEventFilter **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), })` | +| `client.createEventFilter` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', })` | +| `client.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }` | +| `client.estimateContractGas` | \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **Remarks** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', })` | +| `client.estimateFeesPerGas` | \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }` | +| `client.estimateGas` | (`args`) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.estimateMaxPriorityFeePerGas` | \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n` | +| `client.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `client.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `client.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `client.getBalance` | (`args`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **Remarks** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942"` **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei)` | +| `client.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee()` | +| `client.getBlock` | \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock()` | +| `client.getBlockNumber` | (`args?`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n` | +| `client.getBlockTransactionCount` | (`args?`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount()` | +| `client.getBytecode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | **Deprecated** Use `getCode` instead. | +| `client.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1` | +| `client.getCode` | (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getCode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getCode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', })` | +| `client.getContractEvents` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' })` | +| `client.getEip712Domain` | (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> | Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const domain = await client.getEip712Domain({ address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', }) // { // domain: { // name: 'ExampleContract', // version: '1', // chainId: 1, // verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // }, // fields: '0x0f', // extensions: [], // }` | +| `client.getEnsAddress` | (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B'` | +| `client.getEnsAvatar` | (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'` | +| `client.getEnsName` | (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth'` | +| `client.getEnsResolver` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'` | +| `client.getEnsText` | (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **Remarks** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wevm_dev'` | +| `client.getFeeHistory` | (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], })` | +| `client.getFilterChanges` | \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **Remarks** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **Examples** `// Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter })` `// Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter })` `// Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter })` `// Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter })` | +| `client.getFilterLogs` | \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **Remarks** `getFilterLogs` is only compatible with **event filters**. **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter })` | +| `client.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice()` | +| `client.getLogs` | \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **Example** `import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs()` | +| `client.getProof` | (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], })` | +| `client.getStorageAt` | (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), })` | +| `client.getTransaction` | \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionConfirmations` | (`args`) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.getTransactionCount` | (`args`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.getTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.key` | `string` | A key for the client. | +| `client.multicall` | \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]` | +| `client.name` | `string` | A name for the client. | +| `client.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `client.readContract` | \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n` | +| `client.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `client.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `client.simulate` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | **Deprecated** Use `simulateBlocks` instead. | +| `client.simulateBlocks` | \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls on block(s) with optional block and state overrides. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateBlocks({ blocks: [{ blockOverrides: { number: 69420n, }, calls: [{ { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, }], stateOverrides: [{ address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', balance: parseEther('10'), }], }] })` | +| `client.simulateCalls` | \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> | Simulates a set of calls. **Example** `import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateCalls({ account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', calls: [{ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }, ] })` | +| `client.simulateContract` | \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts **Remarks** 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. Internally, 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). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `client.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `client.type` | `string` | The type of client. | +| `client.uid` | `string` | A unique ID for the client. | +| `client.uninstallFilter` | (`args`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true` | +| `client.verifyHash` | (`args`) => `Promise`\<`boolean`\> | Verify that a hash was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) | +| `client.verifyMessage` | (`args`) => `Promise`\<`boolean`\> | Verify that a message was signed by the provided address. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) | +| `client.verifySiweMessage` | (`args`) => `Promise`\<`boolean`\> | Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). - Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) | +| `client.verifyTypedData` | (`args`) => `Promise`\<`boolean`\> | Verify that typed data was signed by the provided address. - Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) | +| `client.waitForTransactionReceipt` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **Remarks** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', })` | +| `client.watchBlockNumber` | (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), })` | +| `client.watchBlocks` | \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), })` | +| `client.watchContractEvent` | \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **Remarks** 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). `watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **Example** `import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), })` | +| `client.watchEvent` | \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **Remarks** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), })` | +| `client.watchPendingTransactions` | (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **Remarks** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **Example** `import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), })` | +| `superPaymasterAddress` | `` `0x${string}` `` | - | +| `params` | \{ `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; \} | - | +| `params.asset` | `` `0x${string}` `` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/sdk/functions/x402NonceKey.md b/api/@aastar/sdk/functions/x402NonceKey.md new file mode 100644 index 000000000..5d7548c8a --- /dev/null +++ b/api/@aastar/sdk/functions/x402NonceKey.md @@ -0,0 +1,19 @@ +> **x402NonceKey**(`asset`, `from`, `nonce`): `` `0x${string}` `` + +Defined in: [packages/core/src/actions/x402.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L11) + +Computes the storage key for x402SettlementNonces[key]. +Mirrors SuperPaymaster.x402NonceKey: keccak256(abi.encode(asset, from, nonce)). +Changed from raw nonce (pre P0-13) to triple-key (post P0-13). + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `asset` | `` `0x${string}` `` | +| `from` | `` `0x${string}` `` | +| `nonce` | `` `0x${string}` `` | + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/functions/xPNTsFactoryActions.md b/api/@aastar/sdk/functions/xPNTsFactoryActions.md new file mode 100644 index 000000000..4b4e4c7c7 --- /dev/null +++ b/api/@aastar/sdk/functions/xPNTsFactoryActions.md @@ -0,0 +1,23 @@ +> **xPNTsFactoryActions**(`address`): (`client`) => [`XPNTsFactoryActions`](../type-aliases/XPNTsFactoryActions.md) + +Defined in: [packages/core/src/actions/factory.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L94) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`XPNTsFactoryActions`](../type-aliases/XPNTsFactoryActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`XPNTsFactoryActions`](../type-aliases/XPNTsFactoryActions.md) diff --git a/api/@aastar/sdk/functions/xPNTsTokenActions.md b/api/@aastar/sdk/functions/xPNTsTokenActions.md new file mode 100644 index 000000000..561f0dee8 --- /dev/null +++ b/api/@aastar/sdk/functions/xPNTsTokenActions.md @@ -0,0 +1,23 @@ +> **xPNTsTokenActions**(`address?`): (`client`) => [`XPNTsTokenActions`](../type-aliases/XPNTsTokenActions.md) + +Defined in: [packages/core/src/actions/tokens.ts:240](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L240) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `address?` | `` `0x${string}` `` | + +## Returns + +> (`client`): [`XPNTsTokenActions`](../type-aliases/XPNTsTokenActions.md) + +### Parameters + +| Parameter | Type | +| ------ | ------ | +| `client` | \{ `account`: `undefined`; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `call`: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\>; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `createAccessList`: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\>; `createBlockFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\>; `createContractEventFilter`: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\>; `createEventFilter`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\>; `createPendingTransactionFilter`: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\>; `estimateContractGas`: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\>; `estimateFeesPerGas`: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\>; `estimateGas`: (`args`) => `Promise`\<`bigint`\>; `estimateMaxPriorityFeePerGas`: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getBalance`: (`args`) => `Promise`\<`bigint`\>; `getBlobBaseFee`: () => `Promise`\<`bigint`\>; `getBlock`: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId?`: ... \| ...; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"legacy"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip2930"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip1559"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly ...[]; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip4844"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ...; `blockNumber`: ... *extends* ... ? ... : ...; `chainId`: `number`; `from`: `` `0x${(...)}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${(...)}` ``; `input`: `` `0x${(...)}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${(...)}` ``; `s`: `` `0x${(...)}` ``; `to`: ... \| ...; `transactionIndex`: ... *extends* ... ? ... : ...; `type`: `"eip7702"`; `typeHex`: ... \| ...; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\>; `getBlockNumber`: (`args?`) => `Promise`\<`bigint`\>; `getBlockTransactionCount`: (`args?`) => `Promise`\<`number`\>; `getBytecode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getChainId`: () => `Promise`\<`number`\>; `getCode`: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\>; `getContractEvents`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getEip712Domain`: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAddress`: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\>; `getEnsAvatar`: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\>; `getEnsName`: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\>; `getEnsResolver`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `getEnsText`: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\>; `getFeeHistory`: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\>; `getFilterChanges`: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getFilterLogs`: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\>; `getGasPrice`: () => `Promise`\<`bigint`\>; `getLogs`: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\>; `getProof`: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\>; `getStorageAt`: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\>; `getTransaction`: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\>; `getTransactionConfirmations`: (`args`) => `Promise`\<`bigint`\>; `getTransactionCount`: (`args`) => `Promise`\<`number`\>; `getTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `key`: `string`; `multicall`: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\>; `name`: `string`; `pollingInterval`: `number`; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `readContract`: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `simulate`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateBlocks`: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateCalls`: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\>; `simulateContract`: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `uninstallFilter`: (`args`) => `Promise`\<`boolean`\>; `verifyHash`: (`args`) => `Promise`\<`boolean`\>; `verifyMessage`: (`args`) => `Promise`\<`boolean`\>; `verifySiweMessage`: (`args`) => `Promise`\<`boolean`\>; `verifyTypedData`: (`args`) => `Promise`\<`boolean`\>; `waitForTransactionReceipt`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `watchBlockNumber`: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html); `watchBlocks`: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html); `watchContractEvent`: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html); `watchEvent`: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html); `watchPendingTransactions`: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html); \} \| \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: ...; paymasterService?: ...; unstable\_addSubAccount?: ...; \[key: ...\]: ... \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...), (...)\> & \{ chainId?: ... \}, ParameterTypeToParameters\<(...) extends (...) ? (...) : (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ... \| ... *extends* ... ? ... : ...\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | + +### Returns + +[`XPNTsTokenActions`](../type-aliases/XPNTsTokenActions.md) diff --git a/api/@aastar/sdk/index.md b/api/@aastar/sdk/index.md index 4a8c6f575..da483e5e2 100644 --- a/api/@aastar/sdk/index.md +++ b/api/@aastar/sdk/index.md @@ -4,7 +4,7 @@ The ultimate TypeScript SDK for the AAstar Protocol - a decentralized, community AAstar 协议的终极 TypeScript SDK —— 构建去中心化、社区驱动的账户抽象生态系统。 [![npm version](https://img.shields.io/npm/v/@aastar/sdk.svg)](https://www.npmjs.com/package/@aastar/sdk) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) --- @@ -14,18 +14,36 @@ AAstar SDK provides a complete suite of tools to interact with the AAstar Protoc AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采用了 **"先检查,后执行"** 的设计理念,帮助开发者构建低错误率、健壮的去中心化应用。 -### Core Modules | 核心模块 - -- **[`@aastar/community`](https://docs.aastar.io/api/@aastar/community)**: Launch & manage DAOs. (启动和管理 DAO) -- **[`@aastar/operator`](https://docs.aastar.io/api/@aastar/operator)**: Run Paymasters & earn rewards. (运行 Paymaster 并赚取收益) -- **[`@aastar/enduser`](https://docs.aastar.io/api/@aastar/enduser)**: Join communities & enjoy gasless txs. (加入社区并享受免 Gas 交易) -- **[`@aastar/analytics`](https://docs.aastar.io/api/@aastar/analytics)**: Monitor ecosystem data. (监控生态系统数据) -- **[`@aastar/tokens`](https://docs.aastar.io/api/@aastar/tokens)**: GToken & XPNTs finance tools. (GToken 和 XPNTs 金融工具) -- **[`@aastar/identity`](https://docs.aastar.io/api/@aastar/identity)**: Reputation & SBT management. (声誉和 SBT 管理) -- **[`@aastar/account`](https://docs.aastar.io/api/@aastar/account)**: Smart Account (ERC-4337) utilities. (智能账户工具) -- **[`@aastar/core`](https://docs.aastar.io/api/@aastar/core)**: Shared logic, Roles, and configuration. (共享逻辑、角色和配置) -- **[`@aastar/paymaster`](https://docs.aastar.io/api/@aastar/paymaster)**: Low-level Paymaster interactions. (低层级 Paymaster 交互) -- **[`@aastar/dapp`](https://docs.aastar.io/api/@aastar/dapp)**: Pre-built UI components and React hooks. (预建 UI 组件和 React hooks) +> **📦 Single-package since v0.20.x | 自 v0.20.x 起单包发布** +> Everything ships in ONE package — `@aastar/sdk` — with **subpath exports** that preserve the +> original module structure. The legacy split packages (`@aastar/core`, `@aastar/account`, +> `@aastar/paymaster`, `@aastar/identity`, `@aastar/tokens`, `@aastar/dapp`, `@aastar/x402`, +> `@aastar/channel`, `@aastar/enduser`, `@aastar/operator`, `@aastar/admin`, `@aastar/airaccount`) +> are **deprecated on npm** and now live as subpaths of `@aastar/sdk`. +> 所有能力合并到 **一个包** `@aastar/sdk`,通过 **子路径导出** 保留原有模块结构;上述老的分包已在 npm 上标记弃用。 + +### Modules (now subpaths) | 模块(现为子路径) + +| Import | Functionality (功能) | +|---|---| +| `@aastar/sdk` | Umbrella: re-exports everything + role-based client factories (总入口 + 角色客户端) | +| `@aastar/sdk/core` | Shared logic, Roles, ABIs, **per-chain addresses** (共享逻辑、角色、ABI、多链地址) | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities (智能账户工具) | +| `@aastar/sdk/paymaster` | SuperPaymaster middleware, gas sponsorship (代付中间件) | +| `@aastar/sdk/identity` | Reputation, SBT, credit limits (声誉、SBT、信用额度) | +| `@aastar/sdk/tokens` | GToken & xPNTs finance tools (代币金融工具) | +| `@aastar/sdk/dapp` | React components & hooks — **requires `react` peer dep** (React 组件与 hooks) | +| `@aastar/sdk/x402` | x402 settlement (x402 结算) | +| `@aastar/sdk/channel` | Micro-payment channels (微支付通道) | +| `@aastar/sdk/enduser` · `/operator` · `/admin` | Role lifecycle workflows (角色生命周期) | +| `@aastar/sdk/kms` | KMS WebAuthn passkeys, BLS aggregate signatures, tiered ERC-4337 accounts (Passkey + BLS + 分层签名) | + +> 🔄 The `@aastar/sdk/airaccount` subpath is **deprecated** — it still works as an alias of `@aastar/sdk/kms` for one release. Please migrate to `@aastar/sdk/kms`. +> `@aastar/sdk/airaccount` 子路径已**废弃**,作为 `@aastar/sdk/kms` 的别名再保留一个版本,请尽快迁移到 `@aastar/sdk/kms`。 + +> ⚠️ **`react` / `react-dom` are optional peer deps.** They're only needed for the `@aastar/sdk/dapp` +> subpath. The root `import '@aastar/sdk'` and all non-UI subpaths work in Node/server with no React. +> React 是可选 peer 依赖,仅 `@aastar/sdk/dapp` 需要;root 及其它子路径在 Node/服务端无需 React。 --- @@ -35,10 +53,72 @@ AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采 pnpm add @aastar/sdk viem # or npm install @aastar/sdk viem + +# Only if you use the React UI subpath (@aastar/sdk/dapp): +pnpm add react react-dom +``` + +> You only need `@aastar/sdk` + `viem` — all transitive deps install automatically. KMS / WebAuthn / BLS features are bundled in — no separate install. Import them from `@aastar/sdk/kms`. +> 只需安装 `@aastar/sdk` + `viem`,其余依赖自动带入。KMS / WebAuthn / BLS 能力已内置,无需单独安装,从 `@aastar/sdk/kms` 导入即可。 + +### Importing | 导入方式 + +```typescript +// Everything from the root barrel (no React pulled in): +import { createEndUserClient, createOperatorClient, CANONICAL_ADDRESSES } from '@aastar/sdk'; + +// …or cherry-pick from a subpath to keep bundles lean: +import { registryActions } from '@aastar/sdk/core'; +import { KmsManager, P256PasskeySigner } from '@aastar/sdk/kms'; +import { useGasless } from '@aastar/sdk/dapp'; // requires react ``` --- +## 🌐 Multi-chain | 多链配置 + +**Switching chains is seamless — just pass a viem `chain`.** Contract addresses are auto-resolved +from `chain.id`, so you never hardcode addresses or memorize chainIds. Use the exact chain objects +from `viem/chains`. +切链是无感的——**只需传入一个 viem `chain`**,合约地址会根据 `chain.id` 自动解析,无需手写地址、无需记 chainId。直接用 `viem/chains` 里的链对象即可。 + +| Network | viem chain | chainId | Status | +|---|---|---|---| +| Optimism (mainnet) | `optimism` | `10` | ✅ deployed | +| Sepolia (testnet) | `sepolia` | `11155111` | ✅ deployed (primary test target) | +| OP Sepolia (testnet) | `optimismSepolia` | `11155420` | ✅ deployed | +| Ethereum mainnet | `mainnet` | `1` | ⏳ not yet deployed | + +```typescript +import { createEndUserClient } from '@aastar/sdk'; +import { sepolia, optimism } from 'viem/chains'; +import { http } from 'viem'; + +// Sepolia testnet — addresses auto-resolved from sepolia.id +const test = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), +}); + +// Optimism mainnet — same code, just swap chain + transport +const prod = createEndUserClient({ + chain: optimism, + transport: http('https://mainnet.optimism.io'), +}); +``` + +- **Unsupported chain?** If you pass a chain that has no deployment yet (e.g. `mainnet`) and no + explicit `addresses`, the factory throws a clear error naming the supported chains — no silent + misconfiguration. +- **Custom / private deployment?** Override per-call with `addresses: { ... }` (or `CANONICAL_ADDRESSES[chainId]` + to start from a known set); the explicit value always wins over auto-resolution. +- 未部署的链(如 `mainnet`)且未显式传 `addresses` 时,工厂会抛出列明受支持链的清晰报错;自定义部署可通过 `addresses` 覆盖,显式值优先。 + +Helpers for RPC URLs and explorer links live in `@aastar/sdk` too: +`getNetwork(name)`, `getRpcUrl(name)`, `getChainId(name)`, `getTxUrl(name, hash)`, `getAddressUrl(name, addr)`. + +--- + ## 📚 Documentation | 文档导航 - **Docs Home**: https://docs.aastar.io/ @@ -57,17 +137,26 @@ npm install @aastar/sdk viem ### 1. Initialize Client | 初始化客户端 ```typescript -import { createPublicClient, createWalletClient, http } from 'viem'; +import { http } from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; import { sepolia } from 'viem/chains'; -import { CommunityClient, OperatorClient } from '@aastar/sdk'; +import { createEndUserClient, createOperatorClient } from '@aastar/sdk'; + +const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`); -// 1. Setup VIEM clients -const publicClient = createPublicClient({ chain: sepolia, transport: http() }); -const walletClient = createWalletClient({ chain: sepolia, transport: http() }); +// Role-based clients compose viem action factories under the hood. +// Addresses auto-resolve from chain.id — no `addresses` needed for supported chains. +const enduser = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); -// 2. Initialize AAstar Clients -const communityClient = new CommunityClient(publicClient, walletClient); -const operatorClient = new OperatorClient(publicClient, walletClient); +const operator = createOperatorClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); ``` ### 2. "Pre-check" Pattern | "预检查" 模式 @@ -143,16 +232,20 @@ AAstar SDK is built on top of **viem**, ensuring lightweight and type-safe inter AAstar SDK 基于 **viem** 构建,确保轻量级和类型安全的交互。它将复杂的合约逻辑抽象为直观的业务原语。 -| Package | Functionality (功能) | +All capabilities are bundled into `@aastar/sdk`; the table below maps each former package to its subpath. +所有能力已打包进 `@aastar/sdk`,下表对应每个旧分包现在的子路径。 + +| Subpath | Functionality (功能) | |---------|---------------------| -| `@aastar/core` | Shared logic, Roles, RequirementChecker | -| `@aastar/community` | DAO Registry, XPNTs issuance | -| `@aastar/operator` | Paymaster ops, Staking management | -| `@aastar/enduser` | User onboarding, SBT minting | -| `@aastar/tokens` | Finance, Tokenomics, Approval flows | -| `@aastar/identity` | Reputation, Credit limits, ZK Proofs | -| `@aastar/paymaster` | EntryPoint & Paymaster low-level API | -| `@aastar/dapp` | React Components & Integration Hooks | +| `@aastar/sdk/core` | Shared logic, Roles, RequirementChecker, per-chain addresses | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities | +| `@aastar/sdk/operator` | Paymaster ops, Staking management | +| `@aastar/sdk/enduser` | User onboarding, SBT minting | +| `@aastar/sdk/tokens` | Finance, Tokenomics, Approval flows | +| `@aastar/sdk/identity` | Reputation, Credit limits, ZK Proofs | +| `@aastar/sdk/paymaster` | EntryPoint & Paymaster low-level API | +| `@aastar/sdk/dapp` | React Components & Integration Hooks (needs `react`) | +| `@aastar/sdk/kms` | KMS WebAuthn, BLS Signatures, ERC-4337 Tiered Accounts (`/airaccount` = deprecated alias) | --- @@ -184,6 +277,6 @@ We welcome contributions! Please see our Contributing Guide for details. --- -

+<p align="center"> Built with ❤️ by the AAstar Community -

+</p> diff --git a/api/@aastar/sdk/interfaces/AccountBalance.md b/api/@aastar/sdk/interfaces/AccountBalance.md new file mode 100644 index 000000000..66a213033 --- /dev/null +++ b/api/@aastar/sdk/interfaces/AccountBalance.md @@ -0,0 +1,41 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L36) + +## Properties + +### address + +> **address**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L37) + +*** + +### aPNTs + +> **aPNTs**: `bigint` + +Defined in: [packages/core/src/actions/StateValidator.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L40) + +*** + +### eth + +> **eth**: `bigint` + +Defined in: [packages/core/src/actions/StateValidator.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L38) + +*** + +### gToken + +> **gToken**: `bigint` + +Defined in: [packages/core/src/actions/StateValidator.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L39) + +*** + +### xPNTs + +> **xPNTs**: `bigint` + +Defined in: [packages/core/src/actions/StateValidator.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L41) diff --git a/api/@aastar/sdk/interfaces/BalanceValidationParams.md b/api/@aastar/sdk/interfaces/BalanceValidationParams.md new file mode 100644 index 000000000..ee9fd2c1b --- /dev/null +++ b/api/@aastar/sdk/interfaces/BalanceValidationParams.md @@ -0,0 +1,51 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L17) + +Interface definitions + +## Extends + +- [`ValidationParams`](ValidationParams.md) + +## Extended by + +- [`TokenBalanceValidationParams`](TokenBalanceValidationParams.md) + +## Properties + +### address + +> **address**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L18) + +*** + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) + +#### Inherited from + +[`ValidationParams`](ValidationParams.md).[`chain`](ValidationParams.md#chain) + +*** + +### minBalance? + +> `optional` **minBalance**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L19) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) + +#### Inherited from + +[`ValidationParams`](ValidationParams.md).[`rpcUrl`](ValidationParams.md#rpcurl) diff --git a/api/@aastar/sdk/interfaces/BuildPaymasterDataParams.md b/api/@aastar/sdk/interfaces/BuildPaymasterDataParams.md new file mode 100644 index 000000000..17429652f --- /dev/null +++ b/api/@aastar/sdk/interfaces/BuildPaymasterDataParams.md @@ -0,0 +1,90 @@ +Defined in: [packages/paymaster/src/PaymasterManager.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L22) + +Unified parameters for building `paymasterAndData`. + +The byte layout differs by paymaster type; this shape carries the union of +both packers' inputs. `buildPaymasterData` validates that the fields required +for the resolved type are present, and dispatches to the correct existing +packer. Callers no longer need to know which format a given paymaster uses. + +## Properties + +### maxRate? + +> `optional` **maxRate**: `bigint` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L46) + +Optional max rate commitment (rug-pull protection). 'super' only. + +*** + +### operator? + +> `optional` **operator**: `` `0x${string}` `` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L44) + +Operator address. Required for type 'super'. + +*** + +### paymasterAddress + +> **paymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L30) + +Paymaster contract address (first 20 bytes of the layout). + +*** + +### postOpGasLimit? + +> `optional` **postOpGasLimit**: `bigint` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L34) + +Paymaster postOp gas limit (16-byte field, both layouts). + +*** + +### token? + +> `optional` **token**: `` `0x${string}` `` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L38) + +Gas token address. Required for type 'v4'. + +*** + +### type? + +> `optional` **type**: [`PaymasterType`](../type-aliases/PaymasterType.md) + +Defined in: [packages/paymaster/src/PaymasterManager.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L28) + +Explicit paymaster type. Preferred over address-based heuristics. +If omitted, the type is resolved from `paymasterAddress` against the +manager's registered known-paymaster map (throws if unresolved). + +*** + +### validityWindow? + +> `optional` **validityWindow**: `number` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L40) + +Validity window in seconds (used to compute validUntil/validAfter). 'v4' only. + +*** + +### verificationGasLimit? + +> `optional` **verificationGasLimit**: `bigint` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L32) + +Paymaster verification gas limit (16-byte field, both layouts). diff --git a/api/@aastar/sdk/interfaces/BundlerResponse.md b/api/@aastar/sdk/interfaces/BundlerResponse.md new file mode 100644 index 000000000..82ffa0770 --- /dev/null +++ b/api/@aastar/sdk/interfaces/BundlerResponse.md @@ -0,0 +1,51 @@ +Defined in: [packages/core/src/clients/BundlerClient.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L16) + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Properties + +### error? + +> `optional` **error**: `object` + +Defined in: [packages/core/src/clients/BundlerClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L20) + +#### code + +> **code**: `number` + +#### data? + +> `optional` **data**: `any` + +#### message + +> **message**: `string` + +*** + +### id + +> **id**: `number` + +Defined in: [packages/core/src/clients/BundlerClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L18) + +*** + +### jsonrpc + +> **jsonrpc**: `"2.0"` + +Defined in: [packages/core/src/clients/BundlerClient.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L17) + +*** + +### result? + +> `optional` **result**: `T` + +Defined in: [packages/core/src/clients/BundlerClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L19) diff --git a/api/@aastar/sdk/interfaces/CheckResourcesOptions.md b/api/@aastar/sdk/interfaces/CheckResourcesOptions.md new file mode 100644 index 000000000..53f3be287 --- /dev/null +++ b/api/@aastar/sdk/interfaces/CheckResourcesOptions.md @@ -0,0 +1,13 @@ +Defined in: [packages/core/src/requirementChecker.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L60) + +Optional threshold overrides for [RequirementChecker.checkResources](../classes/RequirementChecker.md#checkresources). + +## Properties + +### requiredStake? + +> `optional` **requiredStake**: `bigint` + +Defined in: [packages/core/src/requirementChecker.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L62) + +Minimum role stake (defaults: 30 GT for AOA, 50 GT for AOA+). diff --git a/api/@aastar/sdk/interfaces/ClientConfig.md b/api/@aastar/sdk/interfaces/ClientConfig.md new file mode 100644 index 000000000..7dbc7e4b4 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ClientConfig.md @@ -0,0 +1,108 @@ +Defined in: [packages/core/src/clients/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L7) + +Base configuration for all L2 Business Clients + +## Extended by + +- [`UserClientConfig`](UserClientConfig.md) +- [`CommunityClientConfig`](CommunityClientConfig.md) +- [`UserLifecycleConfig`](UserLifecycleConfig.md) +- [`OperatorClientConfig`](OperatorClientConfig.md) +- [`ProtocolClientConfig`](ProtocolClientConfig.md) +- [`CommunityClientConfig`](../../enduser/interfaces/CommunityClientConfig.md) +- [`UserClientConfig`](../../enduser/interfaces/UserClientConfig.md) +- [`UserLifecycleConfig`](../../enduser/interfaces/UserLifecycleConfig.md) +- [`OperatorClientConfig`](../../operator/interfaces/OperatorClientConfig.md) +- [`ProtocolClientConfig`](../../operator/interfaces/ProtocolClientConfig.md) + +## Properties + +### client + +> **client**: [`WalletClient`](WalletClient.md) + +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) + +Viem WalletClient for write operations. +Must have an account attached. + +*** + +### entryPointAddress? + +> `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L47) + +*** + +### ethUsdPriceFeedAddress? + +> `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) + +*** + +### gTokenAddress? + +> `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L32) + +GToken contract address. +Required for operations involving token approvals and transfers. + +*** + +### gTokenStakingAddress? + +> `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L38) + +GTokenStaking contract address. +Required for role registration that involves staking. + +*** + +### paymasterFactoryAddress? + +> `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) + +PaymasterFactory contract address. +Required for deploying new PaymasterV4 instances. + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](PublicClient.md) + +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) + +Optional PublicClient for read operations. +If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). +Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. +However, explicitly accepting PublicClient encourages separation. + +*** + +### registryAddress? + +> `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L26) + +Registry contract address. +Essential for looking up other contracts if not provided explicitly. + +*** + +### xpntsFactoryAddress? + +> `optional` **xpntsFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) diff --git a/api/@aastar/sdk/interfaces/CommunityClientConfig.md b/api/@aastar/sdk/interfaces/CommunityClientConfig.md new file mode 100644 index 000000000..b7bf82306 --- /dev/null +++ b/api/@aastar/sdk/interfaces/CommunityClientConfig.md @@ -0,0 +1,159 @@ +Defined in: [packages/enduser/src/CommunityClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L5) + +Base configuration for all L2 Business Clients + +## Extends + +- [`ClientConfig`](ClientConfig.md) + +## Properties + +### client + +> **client**: [`WalletClient`](WalletClient.md) + +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) + +Viem WalletClient for write operations. +Must have an account attached. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`client`](ClientConfig.md#client) + +*** + +### entryPointAddress? + +> `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L47) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`entryPointAddress`](ClientConfig.md#entrypointaddress) + +*** + +### ethUsdPriceFeedAddress? + +> `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`ethUsdPriceFeedAddress`](ClientConfig.md#ethusdpricefeedaddress) + +*** + +### factoryAddress? + +> `optional` **factoryAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L7) + +*** + +### gTokenAddress? + +> `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L32) + +GToken contract address. +Required for operations involving token approvals and transfers. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`gTokenAddress`](ClientConfig.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L38) + +GTokenStaking contract address. +Required for role registration that involves staking. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`gTokenStakingAddress`](ClientConfig.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) + +PaymasterFactory contract address. +Required for deploying new PaymasterV4 instances. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`paymasterFactoryAddress`](ClientConfig.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](PublicClient.md) + +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) + +Optional PublicClient for read operations. +If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). +Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. +However, explicitly accepting PublicClient encourages separation. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`publicClient`](ClientConfig.md#publicclient) + +*** + +### registryAddress? + +> `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L26) + +Registry contract address. +Essential for looking up other contracts if not provided explicitly. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`registryAddress`](ClientConfig.md#registryaddress) + +*** + +### reputationAddress? + +> `optional` **reputationAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L8) + +*** + +### sbtAddress? + +> `optional` **sbtAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L6) + +*** + +### xpntsFactoryAddress? + +> `optional` **xpntsFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`xpntsFactoryAddress`](ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/sdk/interfaces/CommunityConfig.md b/api/@aastar/sdk/interfaces/CommunityConfig.md new file mode 100644 index 000000000..f7cbc92d3 --- /dev/null +++ b/api/@aastar/sdk/interfaces/CommunityConfig.md @@ -0,0 +1,81 @@ +Defined in: [packages/core/src/communities.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L15) + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/core/src/communities.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L18) + +*** + +### allowPermissionlessMint + +> **allowPermissionlessMint**: `boolean` + +Defined in: [packages/core/src/communities.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L23) + +*** + +### ensName + +> **ensName**: `string` + +Defined in: [packages/core/src/communities.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L17) + +*** + +### isActive + +> **isActive**: `boolean` + +Defined in: [packages/core/src/communities.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L22) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/core/src/communities.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L16) + +*** + +### nodeType + +> **nodeType**: [`NodeType`](../enumerations/NodeType.md) + +Defined in: [packages/core/src/communities.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L21) + +*** + +### registeredAt + +> **registeredAt**: `number` + +Defined in: [packages/core/src/communities.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L25) + +*** + +### stakedAmount + +> **stakedAmount**: `string` + +Defined in: [packages/core/src/communities.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L24) + +*** + +### supportedSBTs + +> **supportedSBTs**: `string`[] + +Defined in: [packages/core/src/communities.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L20) + +*** + +### xPNTsToken + +> **xPNTsToken**: `string` + +Defined in: [packages/core/src/communities.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L19) diff --git a/api/@aastar/sdk/interfaces/CommunityInfo.md b/api/@aastar/sdk/interfaces/CommunityInfo.md new file mode 100644 index 000000000..65df9220f --- /dev/null +++ b/api/@aastar/sdk/interfaces/CommunityInfo.md @@ -0,0 +1,9 @@ +Defined in: [packages/enduser/src/CommunityClient.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L18) + +## Properties + +### address + +> **address**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/CommunityClient.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L19) diff --git a/api/@aastar/sdk/interfaces/ContractVersion.md b/api/@aastar/sdk/interfaces/ContractVersion.md new file mode 100644 index 000000000..33dfe5f30 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ContractVersion.md @@ -0,0 +1,63 @@ +Defined in: [packages/core/src/contract-versions.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L24) + +Contract version information + +## Properties + +### address + +> **address**: `string` + +Defined in: [packages/core/src/contract-versions.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L34) + +Contract address on network + +*** + +### deployedAt + +> **deployedAt**: `string` + +Defined in: [packages/core/src/contract-versions.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L32) + +Deployment date (YYYY-MM-DD) + +*** + +### features? + +> `optional` **features**: `string`[] + +Defined in: [packages/core/src/contract-versions.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L36) + +Key features in this version + +*** + +### name + +> **name**: `string` + +Defined in: [packages/core/src/contract-versions.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L26) + +Contract name + +*** + +### version + +> **version**: `string` + +Defined in: [packages/core/src/contract-versions.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L28) + +Semantic version string (e.g., "2.0.0") + +*** + +### versionCode + +> **versionCode**: `number` + +Defined in: [packages/core/src/contract-versions.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L30) + +Numeric version code (e.g., 20000) diff --git a/api/@aastar/sdk/interfaces/CreateCommunityParams.md b/api/@aastar/sdk/interfaces/CreateCommunityParams.md new file mode 100644 index 000000000..0721dea12 --- /dev/null +++ b/api/@aastar/sdk/interfaces/CreateCommunityParams.md @@ -0,0 +1,33 @@ +Defined in: [packages/enduser/src/CommunityClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L11) + +## Properties + +### description? + +> `optional` **description**: `string` + +Defined in: [packages/enduser/src/CommunityClient.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L15) + +*** + +### ensName? + +> `optional` **ensName**: `string` + +Defined in: [packages/enduser/src/CommunityClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L14) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/enduser/src/CommunityClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L12) + +*** + +### tokenSymbol + +> **tokenSymbol**: `string` + +Defined in: [packages/enduser/src/CommunityClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/CommunityClient.ts#L13) diff --git a/api/@aastar/sdk/interfaces/DVTAccountSignatureParams.md b/api/@aastar/sdk/interfaces/DVTAccountSignatureParams.md new file mode 100644 index 000000000..1e4f0eea2 --- /dev/null +++ b/api/@aastar/sdk/interfaces/DVTAccountSignatureParams.md @@ -0,0 +1,53 @@ +Defined in: [packages/core/src/crypto/dvtWire.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L179) + +Parameters for [encodeDVTAccountSignature](../functions/encodeDVTAccountSignature.md). + +## Properties + +### blsSig + +> **blsSig**: `Uint8Array` \| `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L187) + +Aggregate BLS G2 signature (256-byte EIP-2537, or 96/192-byte zkcrypto). + +*** + +### guardianSig? + +> `optional` **guardianSig**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/dvtWire.ts:189](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L189) + +REQUIRED for T3 (0x05): the trailing 65-byte guardian ECDSA signature. Forbidden for T2. + +*** + +### nodeIds + +> **nodeIds**: `` `0x${string}` ``[] + +Defined in: [packages/core/src/crypto/dvtWire.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L185) + +Explicit `bytes32` node IDs of the contributing signers, in signing/aggregation order. + +*** + +### p256 + +> **p256**: `` `0x${string}` `` \| \{ `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; \} + +Defined in: [packages/core/src/crypto/dvtWire.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L183) + +P256 primary signature, as `{ r, s }` (each 32 bytes) or a 64-byte `r‖s` hex value. + +*** + +### tier + +> **tier**: [`DVTTier`](../type-aliases/DVTTier.md) + +Defined in: [packages/core/src/crypto/dvtWire.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L181) + +Tier byte: [DVT\_TIER\_T2](../variables/DVT_TIER_T2.md) (0x04) or [DVT\_TIER\_T3](../variables/DVT_TIER_T3.md) (0x05). diff --git a/api/@aastar/sdk/interfaces/DeploymentValidationParams.md b/api/@aastar/sdk/interfaces/DeploymentValidationParams.md new file mode 100644 index 000000000..804ac39c3 --- /dev/null +++ b/api/@aastar/sdk/interfaces/DeploymentValidationParams.md @@ -0,0 +1,39 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L26) + +Interface definitions + +## Extends + +- [`ValidationParams`](ValidationParams.md) + +## Properties + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) + +#### Inherited from + +[`ValidationParams`](ValidationParams.md).[`chain`](ValidationParams.md#chain) + +*** + +### contractAddress + +> **contractAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L27) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) + +#### Inherited from + +[`ValidationParams`](ValidationParams.md).[`rpcUrl`](ValidationParams.md#rpcurl) diff --git a/api/@aastar/sdk/interfaces/EnsOptions.md b/api/@aastar/sdk/interfaces/EnsOptions.md new file mode 100644 index 000000000..c461e3803 --- /dev/null +++ b/api/@aastar/sdk/interfaces/EnsOptions.md @@ -0,0 +1,2581 @@ +Defined in: [packages/core/src/utils/ens.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L27) + +Options accepted by resolveEns and lookupAddress. + +## Properties + +### client? + +> `optional` **client**: `object` + +Defined in: [packages/core/src/utils/ens.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L33) + +viem PublicClient configured for the ENS registry chain (usually mainnet). +If omitted, a default mainnet client using the public RPC is created. +Pass your own client to control the RPC URL, caching, etc. + +#### account + +> **account**: `undefined` + +The Account of the Client. + +#### batch? + +> `optional` **batch**: `object` + +Flags for batch settings. + +##### batch.multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +###### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +#### cacheTime + +> **cacheTime**: `number` + +Time (in ms) that cached data will remain in memory. + +#### call() + +> **call**: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CallParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +##### Returns + +`Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +The call data. [CallReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +##### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +#### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) \| `undefined` + +Chain for the client. + +#### createAccessList() + +> **createAccessList**: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +Creates an EIP-2930 access list that you can include in a transaction. + +- Docs: https://viem.sh/docs/actions/public/createAccessList +- JSON-RPC Methods: `eth_createAccessList` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CreateAccessListParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +##### Returns + +`Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +The call data. [CreateAccessListReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const data = await client.createAccessList({ + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +##### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Filter. [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +#### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +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). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`CreateContractEventFilterParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> | [CreateContractEventFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateContractEventFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +#### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`CreateEventFilterParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> | [CreateEventFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateEventFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +#### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +##### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +#### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +##### Type Parameters + +| Type Parameter | +| ------ | +| `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateContractGasParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `chain`\> | [EstimateContractGasParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateContractGasReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +#### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `type` *extends* [`FeeValuesType`](https://viem.sh/docs/index.html) | `"eip1559"` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | [`EstimateFeesPerGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `type`\> | + +##### Returns + +`Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +An estimate (in wei) for the fees per gas. [EstimateFeesPerGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +#### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [EstimateGasParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `chain`: `chainOverride` \| `null`; \} | +| `args.chain?` | `chainOverride` \| `null` | + +##### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. [EstimateMaxPriorityFeePerGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +#### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Default block tag to use for RPC requests. + +#### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +##### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`\>\> | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +##### Returns + +[`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +#### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | + +##### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetBalanceParameters`](https://viem.sh/docs/index.html) | [GetBalanceParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. [GetBalanceReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +#### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +##### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). [GetBlobBaseFeeReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +#### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockParameters`](https://viem.sh/docs/index.html)\<`includeTransactions`, `blockTag`\> | [GetBlockParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${(...)}` ``[]; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `` `0x${(...)}` ``; `blockNumber`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${(...)}` `` \| `null`; `transactionIndex`: ... *extends* ... ? ... : ... *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${(...)}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Information about the block. [GetBlockReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +#### getBlockNumber() + +> **getBlockNumber**: (`args?`) => `Promise`\<`bigint`\> + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockNumberParameters`](https://viem.sh/docs/index.html) | [GetBlockNumberParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The number of the block. [GetBlockNumberReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +#### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args?`) => `Promise`\<`number`\> + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetBlockTransactionCountParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`number`\> + +The block transaction count. [GetBlockTransactionCountReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +#### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +##### Deprecated + +Use `getCode` instead. + +#### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +##### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +#### getCode() + +> **getCode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | GetBytecodeParameters | + +##### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +The contract's bytecode. GetBytecodeReturnType + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +#### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetContractEventsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | + +##### Returns + +`Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetContractEventsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +#### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetEip712DomainParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +The EIP-712 domain, fields, and extensions. [GetEip712DomainReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +#### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAddressParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | Name to get the address for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS name or `null` if not found. [GetEnsAddressReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +#### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `assetGatewayUrls?`: [`AssetGatewayUrls`](https://viem.sh/docs/index.html); `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAvatarParameters](https://viem.sh/docs/index.html) | +| `args.assetGatewayUrls?` | [`AssetGatewayUrls`](https://viem.sh/docs/index.html) | Gateway urls to resolve IPFS and/or Arweave assets. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Avatar URI or `null` if not found. [GetEnsAvatarReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +#### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsNameParameters](https://viem.sh/docs/index.html) | +| `args.address` | `` `0x${string}` `` | Address to get ENS name for. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Name or `null` if not found. [GetEnsNameReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +#### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `name`: `string`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsResolverParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.name` | `string` | Name to get the address for. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +Address for ENS resolver. [GetEnsResolverReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +#### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `key`: `string`; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsTextParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.key` | `string` | Text record to retrieve. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS resolver. [GetEnsTextReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +#### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFeeHistoryParameters`](https://viem.sh/docs/index.html) | [GetFeeHistoryParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +The gas estimate (in wei). [GetFeeHistoryReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +#### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterChangesParameters`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterChangesParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. [GetFilterChangesReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +##### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +#### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterLogsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterLogsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetFilterLogsReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +##### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +#### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +##### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). [GetGasPriceReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +#### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetLogsParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> | [GetLogsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetLogsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +#### getProof() + +> **getProof**: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetProofParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Proof data. [GetProofReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +#### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetStorageAtParameters`](https://viem.sh/docs/index.html) | [GetStorageAtParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +The value of the storage slot. [GetStorageAtReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +#### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionParameters`](https://viem.sh/docs/index.html)\<`blockTag`\> | [GetTransactionParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +The transaction information. [GetTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionConfirmationsParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [GetTransactionConfirmationsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. [GetTransactionConfirmationsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetTransactionCountParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. [GetTransactionCountReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionReceiptParameters`](https://viem.sh/docs/index.html) | [GetTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [GetTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### key + +> **key**: `string` + +A key for the client. + +#### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `contracts` *extends* readonly `unknown`[] | - | +| `allowFailure` *extends* `boolean` | `true` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`MulticallParameters`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\> | [MulticallParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. [MulticallReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +#### name + +> **name**: `string` + +A name for the client. + +#### pollingInterval + +> **pollingInterval**: `number` + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +#### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${(...)}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${(...)}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<(...) & (...) & (...), (...) extends (...) ? (...) : (...)\> & \{ chainId?: (...) \| (...) \}, ParameterTypeToParameters\<(...)\[(...)\] extends readonly (...)\[\] ? (...)\[(...)\] : (...) \| (...) \| (...) \| (...) \| (...) \| (...)\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +##### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +#### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts + +##### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`ReadContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\> | [ReadContractParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. [ReadContractReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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. + +Internally, 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). + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +#### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> + +Request function wrapped with friendly error handling + +#### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### ~~simulate()~~ + +> **simulate**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +##### Deprecated + +Use `simulateBlocks` instead. + +#### simulateBlocks() + +> **simulateBlocks**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls on block(s) with optional block and state overrides. + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulated blocks. SimulateReturnType + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateBlocks({ + blocks: [{ + blockOverrides: { + number: 69420n, + }, + calls: [{ + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + }], + stateOverrides: [{ + address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + balance: parseEther('10'), + }], + }] +}) +``` + +#### simulateCalls() + +> **simulateCalls**: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls. + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateCallsParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Results. [SimulateCallsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateCalls({ + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + calls: [{ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + ] +}) +``` + +#### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SimulateContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | [SimulateContractParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. [SimulateContractReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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. + +Internally, 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). + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### transport + +> **transport**: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> + +The RPC transport + +#### type + +> **type**: `string` + +The type of client. + +#### uid + +> **uid**: `string` + +A unique ID for the client. + +#### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`UninstallFilterParameters`](https://viem.sh/docs/index.html) | [UninstallFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. [UninstallFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +#### verifyHash() + +> **verifyHash**: (`args`) => `Promise`\<`boolean`\> + +Verify that a hash was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyHashParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyHashReturnType](https://viem.sh/docs/index.html) + +#### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args.address` | `` `0x${string}` `` | The address that signed the original message. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `null` | The chain to use. | +| `args.erc6492VerifierAddress?` | `` `0x${string}` `` | The address of the ERC-6492 signature verifier contract. | +| `args.factory?` | `` `0x${string}` `` | - | +| `args.factoryData?` | `` `0x${string}` `` | - | +| `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | +| `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | +| `args.signature` | `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyMessageReturnType](https://viem.sh/docs/index.html) + +#### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address?`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `domain?`: `string`; `message`: `string`; `nonce?`: `string`; `scheme?`: `string`; `signature`: `` `0x${string}` ``; `time?`: `Date`; \} | - | +| `args.address?` | `` `0x${string}` `` | Ethereum address to check against. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.domain?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. | +| `args.message` | `string` | EIP-4361 formatted message. | +| `args.nonce?` | `string` | Random string to check against. | +| `args.scheme?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. | +| `args.signature` | `` `0x${string}` `` | Signature to check against. | +| `args.time?` | `Date` | Current time to check optional `expirationTime` and `notBefore` fields. **Default** `new Date()` | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifySiweMessageReturnType](https://viem.sh/docs/index.html) + +#### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyTypedDataParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyTypedDataReturnType](https://viem.sh/docs/index.html) + +#### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WaitForTransactionReceiptParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [WaitForTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [WaitForTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlockNumberParameters`](https://viem.sh/docs/index.html) | [WatchBlockNumberParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlockNumberReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +#### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlocksParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `includeTransactions`, `blockTag`\> | [WatchBlocksParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlocksReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +#### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchContractEventParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchContractEventParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new event logs. [WatchContractEventReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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). + +`watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +#### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchEventParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchEventParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new Event Logs. [WatchEventReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +#### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchPendingTransactionsParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html)\> | [WatchPendingTransactionsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new pending transaction hashes. [WatchPendingTransactionsReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +*** + +### rpcUrl? + +> `optional` **rpcUrl**: `string` + +Defined in: [packages/core/src/utils/ens.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/utils/ens.ts#L39) + +Mainnet JSON-RPC URL. Only used when `client` is not provided. +Defaults to the viem public mainnet RPC. diff --git a/api/@aastar/sdk/interfaces/EnsureFundingParams.md b/api/@aastar/sdk/interfaces/EnsureFundingParams.md new file mode 100644 index 000000000..a536ad3f8 --- /dev/null +++ b/api/@aastar/sdk/interfaces/EnsureFundingParams.md @@ -0,0 +1,105 @@ +Defined in: [packages/sdk/src/utils/funding.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L39) + +智能充值参数 + +## Extends + +- [`FundingParams`](FundingParams.md) + +## Properties + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/sdk/src/utils/funding.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L11) + +链配置 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`chain`](FundingParams.md#chain) + +*** + +### minETH? + +> `optional` **minETH**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L41) + +最小 ETH 余额阈值 + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L9) + +RPC URL + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`rpcUrl`](FundingParams.md#rpcurl) + +*** + +### supplierKey + +> **supplierKey**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L13) + +资金提供者私钥 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`supplierKey`](FundingParams.md#supplierkey) + +*** + +### targetAddress + +> **targetAddress**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L15) + +目标地址 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`targetAddress`](FundingParams.md#targetaddress) + +*** + +### targetETH? + +> `optional` **targetETH**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L43) + +目标 ETH 充值金额 + +*** + +### token? + +> `optional` **token**: `object` + +Defined in: [packages/sdk/src/utils/funding.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L45) + +Token 配置(可选) + +#### address + +> **address**: `` `0x${string}` `` + +#### minBalance? + +> `optional` **minBalance**: `string` + +#### targetAmount? + +> `optional` **targetAmount**: `string` diff --git a/api/@aastar/sdk/interfaces/ExperimentRecord.md b/api/@aastar/sdk/interfaces/ExperimentRecord.md new file mode 100644 index 000000000..d9fda11ec --- /dev/null +++ b/api/@aastar/sdk/interfaces/ExperimentRecord.md @@ -0,0 +1,81 @@ +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L3) + +## Properties + +### costETH + +> **costETH**: `string` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L10) + +*** + +### gasPrice + +> **gasPrice**: `bigint` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L9) + +*** + +### gasUsed + +> **gasUsed**: `bigint` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L8) + +*** + +### group + +> **group**: `"EOA"` \| `"AA"` \| `"SuperPaymaster"` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L6) + +*** + +### id + +> **id**: `string` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L4) + +*** + +### meta? + +> `optional` **meta**: `any` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L13) + +*** + +### scenario + +> **scenario**: `string` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L5) + +*** + +### status + +> **status**: `"Success"` \| `"Failed"` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L11) + +*** + +### timestamp + +> **timestamp**: `number` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L12) + +*** + +### txHash + +> **txHash**: `string` + +Defined in: [packages/sdk/src/clients/ExperimentClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/ExperimentClient.ts#L7) diff --git a/api/@aastar/sdk/interfaces/FundETHParams.md b/api/@aastar/sdk/interfaces/FundETHParams.md new file mode 100644 index 000000000..ec250e678 --- /dev/null +++ b/api/@aastar/sdk/interfaces/FundETHParams.md @@ -0,0 +1,73 @@ +Defined in: [packages/sdk/src/utils/funding.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L21) + +ETH 充值参数 + +## Extends + +- [`FundingParams`](FundingParams.md) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L23) + +充值金额(ETH,如 '0.1') + +*** + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/sdk/src/utils/funding.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L11) + +链配置 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`chain`](FundingParams.md#chain) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L9) + +RPC URL + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`rpcUrl`](FundingParams.md#rpcurl) + +*** + +### supplierKey + +> **supplierKey**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L13) + +资金提供者私钥 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`supplierKey`](FundingParams.md#supplierkey) + +*** + +### targetAddress + +> **targetAddress**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L15) + +目标地址 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`targetAddress`](FundingParams.md#targetaddress) diff --git a/api/@aastar/sdk/interfaces/FundTokenParams.md b/api/@aastar/sdk/interfaces/FundTokenParams.md new file mode 100644 index 000000000..9417cba0a --- /dev/null +++ b/api/@aastar/sdk/interfaces/FundTokenParams.md @@ -0,0 +1,83 @@ +Defined in: [packages/sdk/src/utils/funding.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L29) + +ERC20 充值参数 + +## Extends + +- [`FundingParams`](FundingParams.md) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L33) + +充值金额(Token,如 '100') + +*** + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/sdk/src/utils/funding.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L11) + +链配置 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`chain`](FundingParams.md#chain) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L9) + +RPC URL + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`rpcUrl`](FundingParams.md#rpcurl) + +*** + +### supplierKey + +> **supplierKey**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L13) + +资金提供者私钥 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`supplierKey`](FundingParams.md#supplierkey) + +*** + +### targetAddress + +> **targetAddress**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L15) + +目标地址 + +#### Inherited from + +[`FundingParams`](FundingParams.md).[`targetAddress`](FundingParams.md#targetaddress) + +*** + +### tokenAddress + +> **tokenAddress**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L31) + +Token 合约地址 diff --git a/api/@aastar/sdk/interfaces/FundingParams.md b/api/@aastar/sdk/interfaces/FundingParams.md new file mode 100644 index 000000000..304bcd736 --- /dev/null +++ b/api/@aastar/sdk/interfaces/FundingParams.md @@ -0,0 +1,49 @@ +Defined in: [packages/sdk/src/utils/funding.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L7) + +资金管理参数 + +## Extended by + +- [`FundETHParams`](FundETHParams.md) +- [`FundTokenParams`](FundTokenParams.md) +- [`EnsureFundingParams`](EnsureFundingParams.md) + +## Properties + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/sdk/src/utils/funding.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L11) + +链配置 + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L9) + +RPC URL + +*** + +### supplierKey + +> **supplierKey**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L13) + +资金提供者私钥 + +*** + +### targetAddress + +> **targetAddress**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L15) + +目标地址 diff --git a/api/@aastar/sdk/interfaces/FundingResult.md b/api/@aastar/sdk/interfaces/FundingResult.md new file mode 100644 index 000000000..b98f88866 --- /dev/null +++ b/api/@aastar/sdk/interfaces/FundingResult.md @@ -0,0 +1,27 @@ +Defined in: [packages/sdk/src/utils/funding.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L55) + +充值结果 + +## Properties + +### error? + +> `optional` **error**: `string` + +Defined in: [packages/sdk/src/utils/funding.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L58) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/sdk/src/utils/funding.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L56) + +*** + +### txHash? + +> `optional` **txHash**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/funding.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/funding.ts#L57) diff --git a/api/@aastar/sdk/interfaces/GaslessConfig.md b/api/@aastar/sdk/interfaces/GaslessConfig.md new file mode 100644 index 000000000..0fee2d9aa --- /dev/null +++ b/api/@aastar/sdk/interfaces/GaslessConfig.md @@ -0,0 +1,17 @@ +Defined in: [packages/enduser/src/UserLifecycle.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L5) + +## Properties + +### paymasterUrl + +> **paymasterUrl**: `string` + +Defined in: [packages/enduser/src/UserLifecycle.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L6) + +*** + +### policy? + +> `optional` **policy**: `"CREDIT"` \| `"TOKEN"` \| `"SPONSORED"` + +Defined in: [packages/enduser/src/UserLifecycle.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L7) diff --git a/api/@aastar/sdk/interfaces/HashToFieldU0U1.md b/api/@aastar/sdk/interfaces/HashToFieldU0U1.md new file mode 100644 index 000000000..3d71de8a2 --- /dev/null +++ b/api/@aastar/sdk/interfaces/HashToFieldU0U1.md @@ -0,0 +1,75 @@ +Defined in: [packages/core/src/crypto/hashToField.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L29) + +The two Fp2 field elements (u0, u1) produced by `hash_to_field(msg, DST, 2)`, +each serialized in EIP-2537 split form to mirror SuperPaymaster's on-chain +`BLS.G2Point` X-coordinate layout. + +Each Fp2 element has two coordinates (c0, c1). Each Fp (a BLS12-381 base-field +element, 48 bytes) is serialized EIP-2537-style as 64 bytes +(16 zero bytes + 48-byte big-endian) and split into two bytes32: + - `a` = high 32 bytes (16 zero bytes + top 16 bytes of the field element) + - `b` = low 32 bytes (bottom 32 bytes of the field element) + +## Properties + +### u0c0a + +> **u0c0a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L31) + +*** + +### u0c0b + +> **u0c0b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L32) + +*** + +### u0c1a + +> **u0c1a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L33) + +*** + +### u0c1b + +> **u0c1b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L34) + +*** + +### u1c0a + +> **u1c0a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L36) + +*** + +### u1c0b + +> **u1c0b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L37) + +*** + +### u1c1a + +> **u1c1a**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L38) + +*** + +### u1c1b + +> **u1c1b**: `` `0x${string}` `` + +Defined in: [packages/core/src/crypto/hashToField.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L39) diff --git a/api/@aastar/sdk/interfaces/HeliosTransportConfig.md b/api/@aastar/sdk/interfaces/HeliosTransportConfig.md new file mode 100644 index 000000000..3afb880ba --- /dev/null +++ b/api/@aastar/sdk/interfaces/HeliosTransportConfig.md @@ -0,0 +1,43 @@ +Defined in: [packages/core/src/transports/helios.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L31) + +## Properties + +### consensusRpcUrl + +> **consensusRpcUrl**: `string` + +Defined in: [packages/core/src/transports/helios.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L42) + +Consensus-layer REST beacon URL (used for light client sync). +Example: "https://www.lightclientdata.org" + +*** + +### executionRpcUrl + +> **executionRpcUrl**: `string` + +Defined in: [packages/core/src/transports/helios.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L36) + +Execution-layer JSON-RPC URL (used for historical state, mempool). +Example: "https://eth.llamarpc.com" + +*** + +### network? + +> `optional` **network**: `"mainnet"` \| `"sepolia"` + +Defined in: [packages/core/src/transports/helios.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L47) + +Network name. Defaults to "mainnet". Also accepts "sepolia". + +*** + +### transportConfig? + +> `optional` **transportConfig**: [`CustomTransportConfig`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/transports/helios.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/transports/helios.ts#L52) + +Options forwarded to viem's custom() transport (timeout, retryCount, etc.) diff --git a/api/@aastar/sdk/interfaces/KeyPair.md b/api/@aastar/sdk/interfaces/KeyPair.md new file mode 100644 index 000000000..d650a5ecf --- /dev/null +++ b/api/@aastar/sdk/interfaces/KeyPair.md @@ -0,0 +1,27 @@ +Defined in: [packages/sdk/src/utils/keys.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L9) + +密钥对接口 + +## Properties + +### address + +> **address**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/keys.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L12) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/sdk/src/utils/keys.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L10) + +*** + +### privateKey + +> **privateKey**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/keys.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/keys.ts#L11) diff --git a/api/@aastar/sdk/interfaces/OnboardResult.md b/api/@aastar/sdk/interfaces/OnboardResult.md new file mode 100644 index 000000000..b4af0e8e4 --- /dev/null +++ b/api/@aastar/sdk/interfaces/OnboardResult.md @@ -0,0 +1,25 @@ +Defined in: [packages/enduser/src/UserLifecycle.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L20) + +## Properties + +### sbtId? + +> `optional` **sbtId**: `bigint` + +Defined in: [packages/enduser/src/UserLifecycle.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L22) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/enduser/src/UserLifecycle.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L21) + +*** + +### txHash? + +> `optional` **txHash**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L23) diff --git a/api/@aastar/sdk/interfaces/OperatorClientConfig.md b/api/@aastar/sdk/interfaces/OperatorClientConfig.md new file mode 100644 index 000000000..294ba39f6 --- /dev/null +++ b/api/@aastar/sdk/interfaces/OperatorClientConfig.md @@ -0,0 +1,151 @@ +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L5) + +Base configuration for all L2 Business Clients + +## Extends + +- [`ClientConfig`](ClientConfig.md) + +## Properties + +### client + +> **client**: [`WalletClient`](WalletClient.md) + +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) + +Viem WalletClient for write operations. +Must have an account attached. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`client`](ClientConfig.md#client) + +*** + +### entryPointAddress? + +> `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L47) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`entryPointAddress`](ClientConfig.md#entrypointaddress) + +*** + +### ethUsdPriceFeedAddress? + +> `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`ethUsdPriceFeedAddress`](ClientConfig.md#ethusdpricefeedaddress) + +*** + +### gTokenAddress? + +> `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L32) + +GToken contract address. +Required for operations involving token approvals and transfers. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`gTokenAddress`](ClientConfig.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L38) + +GTokenStaking contract address. +Required for role registration that involves staking. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`gTokenStakingAddress`](ClientConfig.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) + +PaymasterFactory contract address. +Required for deploying new PaymasterV4 instances. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`paymasterFactoryAddress`](ClientConfig.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](PublicClient.md) + +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) + +Optional PublicClient for read operations. +If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). +Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. +However, explicitly accepting PublicClient encourages separation. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`publicClient`](ClientConfig.md#publicclient) + +*** + +### registryAddress? + +> `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L26) + +Registry contract address. +Essential for looking up other contracts if not provided explicitly. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`registryAddress`](ClientConfig.md#registryaddress) + +*** + +### superPaymasterAddress + +> **superPaymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L6) + +*** + +### tokenAddress? + +> `optional` **tokenAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L7) + +*** + +### xpntsFactoryAddress? + +> `optional` **xpntsFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`xpntsFactoryAddress`](ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/sdk/interfaces/OperatorStatus.md b/api/@aastar/sdk/interfaces/OperatorStatus.md new file mode 100644 index 000000000..2a4c720a1 --- /dev/null +++ b/api/@aastar/sdk/interfaces/OperatorStatus.md @@ -0,0 +1,25 @@ +Defined in: [packages/operator/src/OperatorLifecycle.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L6) + +## Properties + +### balance + +> **balance**: `bigint` + +Defined in: [packages/operator/src/OperatorLifecycle.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L9) + +*** + +### isActive + +> **isActive**: `boolean` + +Defined in: [packages/operator/src/OperatorLifecycle.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L8) + +*** + +### isConfigured + +> **isConfigured**: `boolean` + +Defined in: [packages/operator/src/OperatorLifecycle.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/OperatorLifecycle.ts#L7) diff --git a/api/@aastar/sdk/interfaces/PackedUserOperation.md b/api/@aastar/sdk/interfaces/PackedUserOperation.md new file mode 100644 index 000000000..a2dba4b67 --- /dev/null +++ b/api/@aastar/sdk/interfaces/PackedUserOperation.md @@ -0,0 +1,75 @@ +Defined in: [packages/sdk/src/utils/userOp.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L6) + +ERC-4337 v0.7 Packed UserOperation structure. + +## Properties + +### accountGasLimits + +> **accountGasLimits**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L11) + +*** + +### callData + +> **callData**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L10) + +*** + +### gasFees + +> **gasFees**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L13) + +*** + +### initCode + +> **initCode**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L9) + +*** + +### nonce + +> **nonce**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L8) + +*** + +### paymasterAndData + +> **paymasterAndData**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L14) + +*** + +### preVerificationGas + +> **preVerificationGas**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L12) + +*** + +### sender + +> **sender**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L7) + +*** + +### signature + +> **signature**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/userOp.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L15) diff --git a/api/@aastar/sdk/interfaces/PaymasterGasParams.md b/api/@aastar/sdk/interfaces/PaymasterGasParams.md new file mode 100644 index 000000000..8846a83f1 --- /dev/null +++ b/api/@aastar/sdk/interfaces/PaymasterGasParams.md @@ -0,0 +1,17 @@ +Defined in: [packages/sdk/src/utils/userOp.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L26) + +## Properties + +### paymasterGasLimit + +> **paymasterGasLimit**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L27) + +*** + +### paymasterPostOpGasLimit + +> **paymasterPostOpGasLimit**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L28) diff --git a/api/@aastar/sdk/interfaces/ProtocolClientConfig.md b/api/@aastar/sdk/interfaces/ProtocolClientConfig.md new file mode 100644 index 000000000..533a790cc --- /dev/null +++ b/api/@aastar/sdk/interfaces/ProtocolClientConfig.md @@ -0,0 +1,159 @@ +Defined in: [packages/operator/src/ProtocolClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L5) + +Base configuration for all L2 Business Clients + +## Extends + +- [`ClientConfig`](ClientConfig.md) + +## Properties + +### blsAggregatorAddress? + +> `optional` **blsAggregatorAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/ProtocolClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L7) + +*** + +### client + +> **client**: [`WalletClient`](WalletClient.md) + +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) + +Viem WalletClient for write operations. +Must have an account attached. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`client`](ClientConfig.md#client) + +*** + +### dvtValidatorAddress + +> **dvtValidatorAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/ProtocolClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L6) + +*** + +### entryPointAddress? + +> `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L47) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`entryPointAddress`](ClientConfig.md#entrypointaddress) + +*** + +### ethUsdPriceFeedAddress? + +> `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`ethUsdPriceFeedAddress`](ClientConfig.md#ethusdpricefeedaddress) + +*** + +### gTokenAddress? + +> `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L32) + +GToken contract address. +Required for operations involving token approvals and transfers. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`gTokenAddress`](ClientConfig.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L38) + +GTokenStaking contract address. +Required for role registration that involves staking. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`gTokenStakingAddress`](ClientConfig.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) + +PaymasterFactory contract address. +Required for deploying new PaymasterV4 instances. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`paymasterFactoryAddress`](ClientConfig.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](PublicClient.md) + +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) + +Optional PublicClient for read operations. +If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). +Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. +However, explicitly accepting PublicClient encourages separation. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`publicClient`](ClientConfig.md#publicclient) + +*** + +### registryAddress? + +> `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L26) + +Registry contract address. +Essential for looking up other contracts if not provided explicitly. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`registryAddress`](ClientConfig.md#registryaddress) + +*** + +### superPaymasterAddress? + +> `optional` **superPaymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/operator/src/ProtocolClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/ProtocolClient.ts#L8) + +*** + +### xpntsFactoryAddress? + +> `optional` **xpntsFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`xpntsFactoryAddress`](ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/sdk/interfaces/ProtocolParams.md b/api/@aastar/sdk/interfaces/ProtocolParams.md new file mode 100644 index 000000000..12d7d4d57 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ProtocolParams.md @@ -0,0 +1,33 @@ +Defined in: [packages/admin/src/ProtocolGovernance.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L5) + +## Properties + +### entryPoint + +> **entryPoint**: `` `0x${string}` `` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L8) + +*** + +### minStake + +> **minStake**: `bigint` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L6) + +*** + +### superPaymaster + +> **superPaymaster**: `` `0x${string}` `` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L9) + +*** + +### treasury + +> **treasury**: `` `0x${string}` `` + +Defined in: [packages/admin/src/ProtocolGovernance.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/admin/src/ProtocolGovernance.ts#L7) diff --git a/api/@aastar/sdk/interfaces/PublicClient.md b/api/@aastar/sdk/interfaces/PublicClient.md new file mode 100644 index 000000000..6cfde74b5 --- /dev/null +++ b/api/@aastar/sdk/interfaces/PublicClient.md @@ -0,0 +1,3151 @@ +Defined in: [packages/core/src/clients/doc-types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/doc-types.ts#L7) + +Public Client Interface +Standardized interface for reading from the blockchain. + +## Extends + +- [`PublicClient`](https://viem.sh/docs/index.html) + +## Properties + +### account + +> **account**: `undefined` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:73 + +The Account of the Client. + +#### Inherited from + +`ViemPublicClient.account` + +*** + +### batch? + +> `optional` **batch**: `object` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:75 + +Flags for batch settings. + +#### multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +##### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +#### Inherited from + +`ViemPublicClient.batch` + +*** + +### cacheTime + +> **cacheTime**: `number` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:77 + +Time (in ms) that cached data will remain in memory. + +#### Inherited from + +`ViemPublicClient.cacheTime` + +*** + +### call() + +> **call**: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:89 + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CallParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +#### Returns + +`Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +The call data. [CallReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### Inherited from + +`ViemPublicClient.call` + +*** + +### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:79 + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +#### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +#### request()? + +> `optional` **request**: (`parameters`) => `Promise`\<`` `0x${string}` ``\> + +A function that will be called to make the offchain CCIP lookup request. + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CcipRequestParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +##### See + +https://eips.ethereum.org/EIPS/eip-3668#client-lookup-protocol + +#### Inherited from + +`ViemPublicClient.ccipRead` + +*** + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) \| `undefined` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:81 + +Chain for the client. + +#### Inherited from + +`ViemPublicClient.chain` + +*** + +### createAccessList() + +> **createAccessList**: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:113 + +Creates an EIP-2930 access list that you can include in a transaction. + +- Docs: https://viem.sh/docs/actions/public/createAccessList +- JSON-RPC Methods: `eth_createAccessList` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CreateAccessListParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +#### Returns + +`Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +The call data. [CreateAccessListReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const data = await client.createAccessList({ + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### Inherited from + +`ViemPublicClient.createAccessList` + +*** + +### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:133 + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +#### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Filter. [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +#### Inherited from + +`ViemPublicClient.createBlockFilter` + +*** + +### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:154 + +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). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`CreateContractEventFilterParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> | [CreateContractEventFilterParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateContractEventFilterReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +#### Inherited from + +`ViemPublicClient.createContractEventFilter` + +*** + +### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:176 + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`CreateEventFilterParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> | [CreateEventFilterParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateEventFilterReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +#### Inherited from + +`ViemPublicClient.createEventFilter` + +*** + +### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:196 + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +#### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +#### Inherited from + +`ViemPublicClient.createPendingTransactionFilter` + +*** + +### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:223 + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +#### Type Parameters + +| Type Parameter | +| ------ | +| `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateContractGasParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `chain`\> | [EstimateContractGasParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateContractGasReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +#### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +#### Inherited from + +`ViemPublicClient.estimateContractGas` + +*** + +### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:685 + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `type` *extends* [`FeeValuesType`](https://viem.sh/docs/index.html) | `"eip1559"` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | [`EstimateFeesPerGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `type`\> | + +#### Returns + +`Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +An estimate (in wei) for the fees per gas. [EstimateFeesPerGasReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +#### Inherited from + +`ViemPublicClient.estimateFeesPerGas` + +*** + +### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:247 + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [EstimateGasParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateGasReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### Inherited from + +`ViemPublicClient.estimateGas` + +*** + +### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:877 + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `chain`: `chainOverride` \| `null`; \} | +| `args.chain?` | `chainOverride` \| `null` | + +#### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. [EstimateMaxPriorityFeePerGasReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +#### Inherited from + +`ViemPublicClient.estimateMaxPriorityFeePerGas` + +*** + +### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:83 + +Default block tag to use for RPC requests. + +#### Inherited from + +`ViemPublicClient.experimental_blockTag` + +*** + +### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:69 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`\>\> | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +#### Returns + +[`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +#### Inherited from + +`ViemPublicClient.extend` + +*** + +### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:271 + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | + +#### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### Inherited from + +`ViemPublicClient.fillTransaction` + +*** + +### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:306 + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetBalanceParameters`](https://viem.sh/docs/index.html) | [GetBalanceParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. [GetBalanceReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +#### Inherited from + +`ViemPublicClient.getBalance` + +*** + +### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:327 + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +#### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). [GetBlobBaseFeeReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +#### Inherited from + +`ViemPublicClient.getBlobBaseFee` + +*** + +### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:350 + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockParameters`](https://viem.sh/docs/index.html)\<`includeTransactions`, `blockTag`\> | [GetBlockParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Information about the block. [GetBlockReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +#### Inherited from + +`ViemPublicClient.getBlock` + +*** + +### getBlockNumber() + +> **getBlockNumber**: (`args?`) => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:372 + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockNumberParameters`](https://viem.sh/docs/index.html) | [GetBlockNumberParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +The number of the block. [GetBlockNumberReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +#### Inherited from + +`ViemPublicClient.getBlockNumber` + +*** + +### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args?`) => `Promise`\<`number`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:394 + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetBlockTransactionCountParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`number`\> + +The block transaction count. [GetBlockTransactionCountReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +#### Inherited from + +`ViemPublicClient.getBlockTransactionCount` + +*** + +### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:396 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Use `getCode` instead. + +#### Inherited from + +`ViemPublicClient.getBytecode` + +*** + +### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:416 + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +#### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +#### Inherited from + +`ViemPublicClient.getChainId` + +*** + +### getCode() + +> **getCode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:438 + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | GetBytecodeParameters | + +#### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +The contract's bytecode. GetBytecodeReturnType + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +#### Inherited from + +`ViemPublicClient.getCode` + +*** + +### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:464 + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetContractEventsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | + +#### Returns + +`Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetContractEventsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +#### Inherited from + +`ViemPublicClient.getContractEvents` + +*** + +### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:497 + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetEip712DomainParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +The EIP-712 domain, fields, and extensions. [GetEip712DomainReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +#### Inherited from + +`ViemPublicClient.getEip712Domain` + +*** + +### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:526 + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAddressParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | Name to get the address for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +#### Returns + +`Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS name or `null` if not found. [GetEnsAddressReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +#### Inherited from + +`ViemPublicClient.getEnsAddress` + +*** + +### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:555 + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `assetGatewayUrls?`: [`AssetGatewayUrls`](https://viem.sh/docs/index.html); `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAvatarParameters](https://viem.sh/docs/index.html) | +| `args.assetGatewayUrls?` | [`AssetGatewayUrls`](https://viem.sh/docs/index.html) | Gateway urls to resolve IPFS and/or Arweave assets. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +#### Returns + +`Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Avatar URI or `null` if not found. [GetEnsAvatarReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +#### Inherited from + +`ViemPublicClient.getEnsAvatar` + +*** + +### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:581 + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsNameParameters](https://viem.sh/docs/index.html) | +| `args.address` | `` `0x${string}` `` | Address to get ENS name for. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +#### Returns + +`Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Name or `null` if not found. [GetEnsNameReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +#### Inherited from + +`ViemPublicClient.getEnsName` + +*** + +### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:610 + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `name`: `string`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsResolverParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.name` | `string` | Name to get the address for. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +Address for ENS resolver. [GetEnsResolverReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +#### Inherited from + +`ViemPublicClient.getEnsResolver` + +*** + +### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:640 + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `key`: `string`; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsTextParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.key` | `string` | Text record to retrieve. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +#### Returns + +`Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS resolver. [GetEnsTextReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +#### Inherited from + +`ViemPublicClient.getEnsText` + +*** + +### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:663 + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFeeHistoryParameters`](https://viem.sh/docs/index.html) | [GetFeeHistoryParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +The gas estimate (in wei). [GetFeeHistoryReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +#### Inherited from + +`ViemPublicClient.getFeeHistory` + +*** + +### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:764 + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterChangesParameters`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterChangesParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. [GetFilterChangesReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +#### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +#### Inherited from + +`ViemPublicClient.getFilterChanges` + +*** + +### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:791 + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterLogsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterLogsParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetFilterLogsReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +#### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +#### Inherited from + +`ViemPublicClient.getFilterLogs` + +*** + +### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:810 + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +#### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). [GetGasPriceReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +#### Inherited from + +`ViemPublicClient.getGasPrice` + +*** + +### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:831 + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetLogsParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> | [GetLogsParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetLogsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +#### Inherited from + +`ViemPublicClient.getLogs` + +*** + +### getProof() + +> **getProof**: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:856 + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetProofParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Proof data. [GetProofReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +#### Inherited from + +`ViemPublicClient.getProof` + +*** + +### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:901 + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetStorageAtParameters`](https://viem.sh/docs/index.html) | [GetStorageAtParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +The value of the storage slot. [GetStorageAtReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +#### Inherited from + +`ViemPublicClient.getStorageAt` + +*** + +### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:924 + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionParameters`](https://viem.sh/docs/index.html)\<`blockTag`\> | [GetTransactionParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +The transaction information. [GetTransactionReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### Inherited from + +`ViemPublicClient.getTransaction` + +*** + +### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:947 + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionConfirmationsParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [GetTransactionConfirmationsParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. [GetTransactionConfirmationsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### Inherited from + +`ViemPublicClient.getTransactionConfirmations` + +*** + +### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:969 + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetTransactionCountParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. [GetTransactionCountReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### Inherited from + +`ViemPublicClient.getTransactionCount` + +*** + +### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:992 + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionReceiptParameters`](https://viem.sh/docs/index.html) | [GetTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [GetTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### Inherited from + +`ViemPublicClient.getTransactionReceipt` + +*** + +### key + +> **key**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:85 + +A key for the client. + +#### Inherited from + +`ViemPublicClient.key` + +*** + +### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1030 + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `contracts` *extends* readonly `unknown`[] | - | +| `allowFailure` *extends* `boolean` | `true` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`MulticallParameters`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\> | [MulticallParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. [MulticallReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +#### Inherited from + +`ViemPublicClient.multicall` + +*** + +### name + +> **name**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:87 + +A name for the client. + +#### Inherited from + +`ViemPublicClient.name` + +*** + +### pollingInterval + +> **pollingInterval**: `number` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:89 + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +#### Inherited from + +`ViemPublicClient.pollingInterval` + +*** + +### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1069 + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +#### Inherited from + +`ViemPublicClient.prepareTransactionRequest` + +*** + +### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1101 + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts + +#### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`ReadContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\> | [ReadContractParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. [ReadContractReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +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. + +Internally, 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). + +#### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +#### Inherited from + +`ViemPublicClient.readContract` + +*** + +### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:91 + +Request function wrapped with friendly error handling + +#### Inherited from + +`ViemPublicClient.request` + +*** + +### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1126 + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### Inherited from + +`ViemPublicClient.sendRawTransaction` + +*** + +### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1151 + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### Inherited from + +`ViemPublicClient.sendRawTransactionSync` + +*** + +### ~~simulate()~~ + +> **simulate**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1155 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +#### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +#### Deprecated + +Use `simulateBlocks` instead. + +#### Inherited from + +`ViemPublicClient.simulate` + +*** + +### simulateBlocks() + +> **simulateBlocks**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1198 + +Simulates a set of calls on block(s) with optional block and state overrides. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +#### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulated blocks. SimulateReturnType + +#### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateBlocks({ + blocks: [{ + blockOverrides: { + number: 69420n, + }, + calls: [{ + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + }], + stateOverrides: [{ + address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + balance: parseEther('10'), + }], + }] +}) +``` + +#### Inherited from + +`ViemPublicClient.simulateBlocks` + +*** + +### simulateCalls() + +> **simulateCalls**: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1231 + +Simulates a set of calls. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateCallsParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +#### Returns + +`Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Results. [SimulateCallsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateCalls({ + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + calls: [{ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + ] +}) +``` + +#### Inherited from + +`ViemPublicClient.simulateCalls` + +*** + +### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1262 + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SimulateContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | [SimulateContractParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. [SimulateContractReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +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. + +Internally, 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). + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### Inherited from + +`ViemPublicClient.simulateContract` + +*** + +### transport + +> **transport**: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:93 + +The RPC transport + +#### Inherited from + +`ViemPublicClient.transport` + +*** + +### type + +> **type**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:95 + +The type of client. + +#### Inherited from + +`ViemPublicClient.type` + +*** + +### uid + +> **uid**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:97 + +A unique ID for the client. + +#### Inherited from + +`ViemPublicClient.uid` + +*** + +### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1325 + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`UninstallFilterParameters`](https://viem.sh/docs/index.html) | [UninstallFilterParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. [UninstallFilterReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +#### Inherited from + +`ViemPublicClient.uninstallFilter` + +*** + +### verifyHash() + +> **verifyHash**: (`args`) => `Promise`\<`boolean`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1271 + +Verify that a hash was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyHashParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyHashReturnType](https://viem.sh/docs/index.html) + +#### Inherited from + +`ViemPublicClient.verifyHash` + +*** + +### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1282 + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args.address` | `` `0x${string}` `` | The address that signed the original message. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `null` | The chain to use. | +| `args.erc6492VerifierAddress?` | `` `0x${string}` `` | The address of the ERC-6492 signature verifier contract. | +| `args.factory?` | `` `0x${string}` `` | - | +| `args.factoryData?` | `` `0x${string}` `` | - | +| `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | +| `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | +| `args.signature` | `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | + +#### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyMessageReturnType](https://viem.sh/docs/index.html) + +#### Inherited from + +`ViemPublicClient.verifyMessage` + +*** + +### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1293 + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address?`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `domain?`: `string`; `message`: `string`; `nonce?`: `string`; `scheme?`: `string`; `signature`: `` `0x${string}` ``; `time?`: `Date`; \} | - | +| `args.address?` | `` `0x${string}` `` | Ethereum address to check against. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.domain?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. | +| `args.message` | `string` | EIP-4361 formatted message. | +| `args.nonce?` | `string` | Random string to check against. | +| `args.scheme?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. | +| `args.signature` | `` `0x${string}` `` | Signature to check against. | +| `args.time?` | `Date` | Current time to check optional `expirationTime` and `notBefore` fields. **Default** `new Date()` | + +#### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifySiweMessageReturnType](https://viem.sh/docs/index.html) + +#### Inherited from + +`ViemPublicClient.verifySiweMessage` + +*** + +### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1302 + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyTypedDataParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyTypedDataReturnType](https://viem.sh/docs/index.html) + +#### Inherited from + +`ViemPublicClient.verifyTypedData` + +*** + +### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1364 + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WaitForTransactionReceiptParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [WaitForTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [WaitForTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### Inherited from + +`ViemPublicClient.waitForTransactionReceipt` + +*** + +### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1389 + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlockNumberParameters`](https://viem.sh/docs/index.html) | [WatchBlockNumberParameters](https://viem.sh/docs/index.html) | + +#### Returns + +[`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlockNumberReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +#### Inherited from + +`ViemPublicClient.watchBlockNumber` + +*** + +### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1414 + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlocksParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `includeTransactions`, `blockTag`\> | [WatchBlocksParameters](https://viem.sh/docs/index.html) | + +#### Returns + +[`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlocksReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +#### Inherited from + +`ViemPublicClient.watchBlocks` + +*** + +### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1444 + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchContractEventParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchContractEventParameters](https://viem.sh/docs/index.html) | + +#### Returns + +[`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new event logs. [WatchContractEventReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +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). + +`watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +#### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +#### Inherited from + +`ViemPublicClient.watchContractEvent` + +*** + +### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1476 + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchEventParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchEventParameters](https://viem.sh/docs/index.html) | + +#### Returns + +[`WatchEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new Event Logs. [WatchEventReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +#### Inherited from + +`ViemPublicClient.watchEvent` + +*** + +### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/public.d.ts:1505 + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchPendingTransactionsParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html)\> | [WatchPendingTransactionsParameters](https://viem.sh/docs/index.html) | + +#### Returns + +[`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new pending transaction hashes. [WatchPendingTransactionsReturnType](https://viem.sh/docs/index.html) + +#### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +#### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +#### Inherited from + +`ViemPublicClient.watchPendingTransactions` diff --git a/api/@aastar/sdk/interfaces/ReputationData.md b/api/@aastar/sdk/interfaces/ReputationData.md new file mode 100644 index 000000000..5ecbe00a8 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ReputationData.md @@ -0,0 +1,25 @@ +Defined in: [packages/enduser/src/UserLifecycle.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L26) + +## Properties + +### creditLimit + +> **creditLimit**: `bigint` + +Defined in: [packages/enduser/src/UserLifecycle.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L29) + +*** + +### level + +> **level**: `bigint` + +Defined in: [packages/enduser/src/UserLifecycle.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L28) + +*** + +### score + +> **score**: `bigint` + +Defined in: [packages/enduser/src/UserLifecycle.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L27) diff --git a/api/@aastar/sdk/interfaces/ResourceBoolCheck.md b/api/@aastar/sdk/interfaces/ResourceBoolCheck.md new file mode 100644 index 000000000..f54bb779f --- /dev/null +++ b/api/@aastar/sdk/interfaces/ResourceBoolCheck.md @@ -0,0 +1,19 @@ +Defined in: [packages/core/src/requirementChecker.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L27) + +Boolean sub-check result (role / SBT). + +## Properties + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L29) + +*** + +### value + +> **value**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L28) diff --git a/api/@aastar/sdk/interfaces/ResourceReport.md b/api/@aastar/sdk/interfaces/ResourceReport.md new file mode 100644 index 000000000..f1b8baa24 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ResourceReport.md @@ -0,0 +1,60 @@ +Defined in: [packages/core/src/requirementChecker.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L45) + +Aggregated readiness report for a given [OperatorMode](../type-aliases/OperatorMode.md). +Mirrors the structured-report style of PaymasterV4 `checkGaslessReadiness`. + +## Properties + +### checks + +> **checks**: `object` + +Defined in: [packages/core/src/requirementChecker.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L50) + +Only the sub-checks relevant to the requested mode are populated. + +#### role? + +> `optional` **role**: [`ResourceBoolCheck`](ResourceBoolCheck.md) & `object` + +##### Type Declaration + +###### roleId + +> **roleId**: `` `0x${string}` `` + +#### sbt? + +> `optional` **sbt**: [`ResourceBoolCheck`](ResourceBoolCheck.md) + +#### stake? + +> `optional` **stake**: [`ResourceStakeCheck`](ResourceStakeCheck.md) + +*** + +### issues + +> **issues**: `string`[] + +Defined in: [packages/core/src/requirementChecker.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L56) + +Actionable, human-readable description of each unmet requirement. + +*** + +### mode + +> **mode**: [`OperatorMode`](../type-aliases/OperatorMode.md) + +Defined in: [packages/core/src/requirementChecker.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L48) + +*** + +### ready + +> **ready**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L47) + +True when every relevant sub-check passed (`issues.length === 0`). diff --git a/api/@aastar/sdk/interfaces/ResourceStakeCheck.md b/api/@aastar/sdk/interfaces/ResourceStakeCheck.md new file mode 100644 index 000000000..5389e531d --- /dev/null +++ b/api/@aastar/sdk/interfaces/ResourceStakeCheck.md @@ -0,0 +1,31 @@ +Defined in: [packages/core/src/requirementChecker.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L33) + +Role-stake sub-check result. + +## Properties + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/requirementChecker.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L38) + +*** + +### required + +> **required**: `bigint` + +Defined in: [packages/core/src/requirementChecker.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L37) + +Minimum stake required for this mode. + +*** + +### staked + +> **staked**: `bigint` + +Defined in: [packages/core/src/requirementChecker.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L35) + +Current on-chain role stake (`getRoleStake(roleId, operator)`). diff --git a/api/@aastar/sdk/interfaces/RoleConfig.md b/api/@aastar/sdk/interfaces/RoleConfig.md new file mode 100644 index 000000000..6e19f911a --- /dev/null +++ b/api/@aastar/sdk/interfaces/RoleConfig.md @@ -0,0 +1,83 @@ +Defined in: [packages/core/src/roles.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L102) + +Role configuration structure (matches Registry.sol RoleConfig struct) + +## Properties + +### description + +> **description**: `string` + +Defined in: [packages/core/src/roles.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L112) + +*** + +### exitFeePercent + +> **exitFeePercent**: `bigint` + +Defined in: [packages/core/src/roles.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L109) + +*** + +### isActive + +> **isActive**: `boolean` + +Defined in: [packages/core/src/roles.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L111) + +*** + +### minExitFee + +> **minExitFee**: `bigint` + +Defined in: [packages/core/src/roles.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L110) + +*** + +### minStake + +> **minStake**: `bigint` + +Defined in: [packages/core/src/roles.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L103) + +*** + +### slashBase + +> **slashBase**: `number` + +Defined in: [packages/core/src/roles.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L106) + +*** + +### slashIncrement + +> **slashIncrement**: `number` + +Defined in: [packages/core/src/roles.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L107) + +*** + +### slashMax + +> **slashMax**: `number` + +Defined in: [packages/core/src/roles.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L108) + +*** + +### slashThreshold + +> **slashThreshold**: `number` + +Defined in: [packages/core/src/roles.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L105) + +*** + +### ticketPrice + +> **ticketPrice**: `bigint` + +Defined in: [packages/core/src/roles.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L104) diff --git a/api/@aastar/sdk/interfaces/RoleRequirement.md b/api/@aastar/sdk/interfaces/RoleRequirement.md new file mode 100644 index 000000000..c0606e7ee --- /dev/null +++ b/api/@aastar/sdk/interfaces/RoleRequirement.md @@ -0,0 +1,43 @@ +Defined in: [packages/core/src/roles.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L118) + +Role requirement check result + +## Properties + +### hasEnoughAPNTs + +> **hasEnoughAPNTs**: `boolean` + +Defined in: [packages/core/src/roles.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L121) + +*** + +### hasEnoughGToken + +> **hasEnoughGToken**: `boolean` + +Defined in: [packages/core/src/roles.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L120) + +*** + +### hasRole + +> **hasRole**: `boolean` + +Defined in: [packages/core/src/roles.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L119) + +*** + +### hasSBT + +> **hasSBT**: `boolean` + +Defined in: [packages/core/src/roles.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L122) + +*** + +### missingRequirements + +> **missingRequirements**: `string`[] + +Defined in: [packages/core/src/roles.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L123) diff --git a/api/@aastar/sdk/interfaces/RoleValidationParams.md b/api/@aastar/sdk/interfaces/RoleValidationParams.md new file mode 100644 index 000000000..118fd92dd --- /dev/null +++ b/api/@aastar/sdk/interfaces/RoleValidationParams.md @@ -0,0 +1,55 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L11) + +Interface definitions + +## Extends + +- [`ValidationParams`](ValidationParams.md) + +## Properties + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) + +#### Inherited from + +[`ValidationParams`](ValidationParams.md).[`chain`](ValidationParams.md#chain) + +*** + +### registryAddress + +> **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L12) + +*** + +### roleId + +> **roleId**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L13) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) + +#### Inherited from + +[`ValidationParams`](ValidationParams.md).[`rpcUrl`](ValidationParams.md#rpcurl) + +*** + +### userAddress + +> **userAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L14) diff --git a/api/@aastar/sdk/interfaces/ScenarioParams.md b/api/@aastar/sdk/interfaces/ScenarioParams.md new file mode 100644 index 000000000..de5218ea6 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ScenarioParams.md @@ -0,0 +1,2668 @@ +Defined in: [packages/sdk/src/utils/testScenarios.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L13) + +## Properties + +### amount + +> **amount**: `bigint` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L18) + +*** + +### chainId + +> **chainId**: `number` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L20) + +*** + +### entryPoint + +> **entryPoint**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L19) + +*** + +### gasToken? + +> `optional` **gasToken**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L27) + +*** + +### nonceKey? + +> `optional` **nonceKey**: `bigint` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L26) + +*** + +### operator? + +> `optional` **operator**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L23) + +*** + +### ownerAccount + +> **ownerAccount**: `any` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L15) + +*** + +### paymaster? + +> `optional` **paymaster**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L22) + +*** + +### paymasterGasLimit? + +> `optional` **paymasterGasLimit**: `bigint` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L24) + +*** + +### paymasterPostOpGasLimit? + +> `optional` **paymasterPostOpGasLimit**: `bigint` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L25) + +*** + +### publicClient + +> **publicClient**: `object` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L21) + +#### account + +> **account**: `undefined` + +The Account of the Client. + +#### batch? + +> `optional` **batch**: `object` + +Flags for batch settings. + +##### batch.multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +###### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +#### cacheTime + +> **cacheTime**: `number` + +Time (in ms) that cached data will remain in memory. + +#### call() + +> **call**: (`parameters`) => `Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CallParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +##### Returns + +`Promise`\<[`CallReturnType`](https://viem.sh/docs/index.html)\> + +The call data. [CallReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +##### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +#### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) \| `undefined` + +Chain for the client. + +#### createAccessList() + +> **createAccessList**: (`parameters`) => `Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +Creates an EIP-2930 access list that you can include in a transaction. + +- Docs: https://viem.sh/docs/actions/public/createAccessList +- JSON-RPC Methods: `eth_createAccessList` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CreateAccessListParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | + +##### Returns + +`Promise`\<\{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `gasUsed`: `bigint`; \}\> + +The call data. [CreateAccessListReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const data = await client.createAccessList({ + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +#### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +##### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"block"`; \}\> + +Filter. [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +#### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +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). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`CreateContractEventFilterParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> | [CreateContractEventFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`CreateContractEventFilterReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateContractEventFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +#### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `_EventName` *extends* `string` \| `undefined` | [`MaybeAbiEventName`](https://viem.sh/docs/index.html)\<`abiEvent`\> | +| `_Args` *extends* readonly `unknown`[] \| `Record`\<`string`, `unknown`\> \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`CreateEventFilterParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> | [CreateEventFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateEventFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +#### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +##### Returns + +`Promise`\<\{ `id`: `` `0x${string}` ``; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\; `type`: `"transaction"`; \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). [CreateBlockFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +#### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +##### Type Parameters + +| Type Parameter | +| ------ | +| `chain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateContractGasParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `chain`\> | [EstimateContractGasParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateContractGasReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +#### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args?`) => `Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `type` *extends* [`FeeValuesType`](https://viem.sh/docs/index.html) | `"eip1559"` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | [`EstimateFeesPerGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `type`\> | + +##### Returns + +`Promise`\<[`EstimateFeesPerGasReturnType`](https://viem.sh/docs/index.html)\<`type`\>\> + +An estimate (in wei) for the fees per gas. [EstimateFeesPerGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +#### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`EstimateGasParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [EstimateGasParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). [EstimateGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args?`) => `Promise`\<`bigint`\> + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `chain`: `chainOverride` \| `null`; \} | +| `args.chain?` | `chainOverride` \| `null` | + +##### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. [EstimateMaxPriorityFeePerGasReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +#### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Default block tag to use for RPC requests. + +#### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +##### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`\>\> | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +##### Returns + +[`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `undefined`, [`PublicRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`\>\> + +#### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | + +##### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetBalanceParameters`](https://viem.sh/docs/index.html) | [GetBalanceParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. [GetBalanceReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +#### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +##### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). [GetBlobBaseFeeReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +#### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args?`) => `Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockParameters`](https://viem.sh/docs/index.html)\<`includeTransactions`, `blockTag`\> | [GetBlockParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ `baseFeePerGas`: `bigint` \| `null`; `blobGasUsed`: `bigint`; `difficulty`: `bigint`; `excessBlobGas`: `bigint`; `extraData`: `` `0x${string}` ``; `gasLimit`: `bigint`; `gasUsed`: `bigint`; `hash`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `logsBloom`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `miner`: `` `0x${string}` ``; `mixHash`: `` `0x${string}` ``; `nonce`: `blockTag` *extends* `"pending"` ? `null` : `` `0x${string}` ``; `number`: `blockTag` *extends* `"pending"` ? `null` : `bigint`; `parentBeaconBlockRoot?`: `` `0x${string}` ``; `parentHash`: `` `0x${string}` ``; `receiptsRoot`: `` `0x${string}` ``; `sealFields`: `` `0x${string}` ``[]; `sha3Uncles`: `` `0x${string}` ``; `size`: `bigint`; `stateRoot`: `` `0x${string}` ``; `timestamp`: `bigint`; `totalDifficulty`: `bigint` \| `null`; `transactions`: `includeTransactions` *extends* `true` ? (\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \})[] : `` `0x${string}` ``[]; `transactionsRoot`: `` `0x${string}` ``; `uncles`: `` `0x${string}` ``[]; `withdrawals?`: [`Withdrawal`](https://viem.sh/docs/index.html)[]; `withdrawalsRoot?`: `` `0x${string}` ``; \}\> + +Information about the block. [GetBlockReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +#### getBlockNumber() + +> **getBlockNumber**: (`args?`) => `Promise`\<`bigint`\> + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockNumberParameters`](https://viem.sh/docs/index.html) | [GetBlockNumberParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The number of the block. [GetBlockNumberReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +#### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args?`) => `Promise`\<`number`\> + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetBlockTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetBlockTransactionCountParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`number`\> + +The block transaction count. [GetBlockTransactionCountReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +#### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +##### Deprecated + +Use `getCode` instead. + +#### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +##### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +#### getCode() + +> **getCode**: (`args`) => `Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetCodeParameters`](https://viem.sh/docs/index.html) | GetBytecodeParameters | + +##### Returns + +`Promise`\<[`GetCodeReturnType`](https://viem.sh/docs/index.html)\> + +The contract's bytecode. GetBytecodeReturnType + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +#### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` \| `undefined` | `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetContractEventsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | + +##### Returns + +`Promise`\<[`GetContractEventsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetContractEventsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +#### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetEip712DomainParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetEip712DomainReturnType`](https://viem.sh/docs/index.html)\> + +The EIP-712 domain, fields, and extensions. [GetEip712DomainReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +#### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAddressParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS address for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | Name to get the address for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsAddressReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS name or `null` if not found. [GetEnsAddressReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +#### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `assetGatewayUrls?`: [`AssetGatewayUrls`](https://viem.sh/docs/index.html); `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsAvatarParameters](https://viem.sh/docs/index.html) | +| `args.assetGatewayUrls?` | [`AssetGatewayUrls`](https://viem.sh/docs/index.html) | Gateway urls to resolve IPFS and/or Arweave assets. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsAvatarReturnType`](https://viem.sh/docs/index.html)\> + +Avatar URI or `null` if not found. [GetEnsAvatarReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +#### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `coinType?`: `bigint`; `gatewayUrls?`: `string`[]; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsNameParameters](https://viem.sh/docs/index.html) | +| `args.address` | `` `0x${string}` `` | Address to get ENS name for. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.coinType?` | `bigint` | ENSIP-9 compliant coinType (chain) to get ENS name for. To get the `coinType` for a chain id, use the `toCoinType` function: `import { toCoinType } from 'viem' import { base } from 'viem/chains' const coinType = toCoinType(base.id)` **Default** `60n` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsNameReturnType`](https://viem.sh/docs/index.html)\> + +Name or `null` if not found. [GetEnsNameReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +#### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `name`: `string`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsResolverParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.name` | `string` | Name to get the address for. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +Address for ENS resolver. [GetEnsResolverReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +#### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `gatewayUrls?`: `string`[]; `key`: `string`; `name`: `string`; `strict?`: `boolean`; `universalResolverAddress?`: `` `0x${string}` ``; \} | [GetEnsTextParameters](https://viem.sh/docs/index.html) | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.gatewayUrls?` | `string`[] | Universal Resolver gateway URLs to use for resolving CCIP-read requests. | +| `args.key` | `string` | Text record to retrieve. | +| `args.name` | `string` | ENS name to get Text for. | +| `args.strict?` | `boolean` | Whether or not to throw errors propagated from the ENS Universal Resolver Contract. | +| `args.universalResolverAddress?` | `` `0x${string}` `` | Address of ENS Universal Resolver Contract. | + +##### Returns + +`Promise`\<[`GetEnsTextReturnType`](https://viem.sh/docs/index.html)\> + +Address for ENS resolver. [GetEnsTextReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +#### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFeeHistoryParameters`](https://viem.sh/docs/index.html) | [GetFeeHistoryParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFeeHistoryReturnType`](https://viem.sh/docs/index.html)\> + +The gas estimate (in wei). [GetFeeHistoryReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +#### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `filterType` *extends* [`FilterType`](https://viem.sh/docs/index.html) | - | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterChangesParameters`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterChangesParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFilterChangesReturnType`](https://viem.sh/docs/index.html)\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. [GetFilterChangesReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +##### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +#### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` \| `undefined` | - | +| `eventName` *extends* `string` \| `undefined` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetFilterLogsParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> | [GetFilterLogsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetFilterLogsReturnType`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetFilterLogsReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +##### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +#### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +##### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). [GetGasPriceReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +#### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args?`) => `Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | +| `fromBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `toBlock` *extends* `bigint` \| [`BlockTag`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args?` | [`GetLogsParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> | [GetLogsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetLogsReturnType`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. [GetLogsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +#### getProof() + +> **getProof**: (`args`) => `Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`GetProofParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetProofReturnType`](https://viem.sh/docs/index.html)\> + +Proof data. [GetProofReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +#### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetStorageAtParameters`](https://viem.sh/docs/index.html) | [GetStorageAtParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`GetStorageAtReturnType`](https://viem.sh/docs/index.html)\> + +The value of the storage slot. [GetStorageAtReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +#### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionParameters`](https://viem.sh/docs/index.html)\<`blockTag`\> | [GetTransactionParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId?`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"legacy"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity?`: `undefined`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice`: `bigint`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip2930"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip1559"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas`: `bigint`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip4844"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \} \| \{ `accessList`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList`: [`SignedAuthorizationList`](https://viem.sh/docs/index.html); `blobVersionedHashes?`: `undefined`; `blockHash`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `` `0x${string}` ``; `blockNumber`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `bigint`; `chainId`: `number`; `from`: `` `0x${string}` ``; `gas`: `bigint`; `gasPrice?`: `undefined`; `hash`: `` `0x${string}` ``; `input`: `` `0x${string}` ``; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas`: `bigint`; `maxPriorityFeePerGas`: `bigint`; `nonce`: `number`; `r`: `` `0x${string}` ``; `s`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; `transactionIndex`: `blockTag` *extends* `"pending"` ? `true` : `false` *extends* `true` ? `null` : `number`; `type`: `"eip7702"`; `typeHex`: `` `0x${string}` `` \| `null`; `v`: `bigint`; `value`: `bigint`; `yParity`: `number`; \}\> + +The transaction information. [GetTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionConfirmationsParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [GetTransactionConfirmationsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. [GetTransactionConfirmationsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionCountParameters`](https://viem.sh/docs/index.html) | [GetTransactionCountParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. [GetTransactionCountReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`GetTransactionReceiptParameters`](https://viem.sh/docs/index.html) | [GetTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [GetTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### key + +> **key**: `string` + +A key for the client. + +#### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `contracts` *extends* readonly `unknown`[] | - | +| `allowFailure` *extends* `boolean` | `true` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`MulticallParameters`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\> | [MulticallParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`MulticallReturnType`](https://viem.sh/docs/index.html)\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. [MulticallReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +#### name + +> **name**: `string` + +A name for the client. + +#### pollingInterval + +> **pollingInterval**: `number` + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +#### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +##### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +#### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts + +##### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `functionName` *extends* `string` | +| `args` *extends* `unknown` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`ReadContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\> | [ReadContractParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`ReadContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. [ReadContractReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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. + +Internally, 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). + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +#### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`PublicRpcSchema`](https://viem.sh/docs/index.html)\> + +Request function wrapped with friendly error handling + +#### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### ~~simulate()~~ + +> **simulate**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +##### Deprecated + +Use `simulateBlocks` instead. + +#### simulateBlocks() + +> **simulateBlocks**: \<`calls`\>(`args`) => `Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls on block(s) with optional block and state overrides. + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateBlocksParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateBlocksReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulated blocks. SimulateReturnType + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateBlocks({ + blocks: [{ + blockOverrides: { + number: 69420n, + }, + calls: [{ + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + }], + stateOverrides: [{ + address: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + balance: parseEther('10'), + }], + }] +}) +``` + +#### simulateCalls() + +> **simulateCalls**: \<`calls`\>(`args`) => `Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Simulates a set of calls. + +##### Type Parameters + +| Type Parameter | +| ------ | +| `calls` *extends* readonly `unknown`[] | + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SimulateCallsParameters`](https://viem.sh/docs/index.html)\<`calls`\> | + +##### Returns + +`Promise`\<[`SimulateCallsReturnType`](https://viem.sh/docs/index.html)\<`calls`\>\> + +Results. [SimulateCallsReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const result = await client.simulateCalls({ + account: '0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929', + calls: [{ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), + }, + ] +}) +``` + +#### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SimulateContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\> | [SimulateContractParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`SimulateContractReturnType`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. [SimulateContractReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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. + +Internally, 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). + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### transport + +> **transport**: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> + +The RPC transport + +#### type + +> **type**: `string` + +The type of client. + +#### uid + +> **uid**: `string` + +A unique ID for the client. + +#### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`UninstallFilterParameters`](https://viem.sh/docs/index.html) | [UninstallFilterParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. [UninstallFilterReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +#### verifyHash() + +> **verifyHash**: (`args`) => `Promise`\<`boolean`\> + +Verify that a hash was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyHash](https://viem.sh/docs/actions/public/verifyHash) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyHashParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyHashReturnType](https://viem.sh/docs/index.html) + +#### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `chain?`: [`Chain`](https://viem.sh/docs/index.html) \| `null`; `erc6492VerifierAddress?`: `` `0x${string}` ``; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `message`: [`SignableMessage`](https://viem.sh/docs/index.html); `multicallAddress?`: `` `0x${string}` ``; `signature`: `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html); `universalSignatureVerifierAddress?`: `` `0x${string}` ``; \} | - | +| `args.address` | `` `0x${string}` `` | The address that signed the original message. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.chain?` | [`Chain`](https://viem.sh/docs/index.html) \| `null` | The chain to use. | +| `args.erc6492VerifierAddress?` | `` `0x${string}` `` | The address of the ERC-6492 signature verifier contract. | +| `args.factory?` | `` `0x${string}` `` | - | +| `args.factoryData?` | `` `0x${string}` `` | - | +| `args.message` | [`SignableMessage`](https://viem.sh/docs/index.html) | The message to be verified. | +| `args.multicallAddress?` | `` `0x${string}` `` | Multicall3 address for ERC-8010 verification. | +| `args.signature` | `Uint8Array` \| `` `0x${string}` `` \| [`Signature`](https://viem.sh/docs/index.html) | The signature that was generated by signing the message with the address's private key. | +| `args.universalSignatureVerifierAddress?` | `` `0x${string}` `` | **Deprecated** use `erc6492VerifierAddress` instead. | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyMessageReturnType](https://viem.sh/docs/index.html) + +#### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `address?`: `` `0x${string}` ``; `blockNumber?`: `bigint`; `blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `domain?`: `string`; `message`: `string`; `nonce?`: `string`; `scheme?`: `string`; `signature`: `` `0x${string}` ``; `time?`: `Date`; \} | - | +| `args.address?` | `` `0x${string}` `` | Ethereum address to check against. | +| `args.blockNumber?` | `bigint` | The balance of the account at a block number. | +| `args.blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | The balance of the account at a block tag. **Default** `'latest'` | +| `args.domain?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. | +| `args.message` | `string` | EIP-4361 formatted message. | +| `args.nonce?` | `string` | Random string to check against. | +| `args.scheme?` | `string` | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. | +| `args.signature` | `` `0x${string}` `` | Signature to check against. | +| `args.time?` | `Date` | Current time to check optional `expirationTime` and `notBefore` fields. **Default** `new Date()` | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifySiweMessageReturnType](https://viem.sh/docs/index.html) + +#### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`VerifyTypedDataParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. [VerifyTypedDataReturnType](https://viem.sh/docs/index.html) + +#### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WaitForTransactionReceiptParameters`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`\> | [WaitForTransactionReceiptParameters](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +The transaction receipt. [WaitForTransactionReceiptReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +#### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => [`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlockNumberParameters`](https://viem.sh/docs/index.html) | [WatchBlockNumberParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchBlockNumberReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlockNumberReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +#### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => [`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `includeTransactions` *extends* `boolean` | `false` | +| `blockTag` *extends* [`BlockTag`](https://viem.sh/docs/index.html) | `"latest"` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchBlocksParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `includeTransactions`, `blockTag`\> | [WatchBlocksParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchBlocksReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new block numbers. [WatchBlocksReturnType](https://viem.sh/docs/index.html) + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +#### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => [`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `eventName` *extends* `string` | - | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchContractEventParameters`](https://viem.sh/docs/index.html)\<`abi`, `eventName`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchContractEventParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchContractEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new event logs. [WatchContractEventReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +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). + +`watchContractEvent` 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 `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +##### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +#### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => [`WatchEventReturnType`](https://viem.sh/docs/index.html) + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +##### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abiEvent` *extends* `AbiEvent` \| `undefined` | `undefined` | +| `abiEvents` *extends* readonly `unknown`[] \| readonly `AbiEvent`[] \| `undefined` | `abiEvent` *extends* `AbiEvent` ? \[`abiEvent`\<`abiEvent`\>\] : `undefined` | +| `strict` *extends* `boolean` \| `undefined` | `undefined` | + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchEventParameters`](https://viem.sh/docs/index.html)\<`abiEvent`, `abiEvents`, `strict`, [`Transport`](https://viem.sh/docs/index.html)\> | [WatchEventParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchEventReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new Event Logs. [WatchEventReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) 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. + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +#### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => [`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchPendingTransactionsParameters`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html)\> | [WatchPendingTransactionsParameters](https://viem.sh/docs/index.html) | + +##### Returns + +[`WatchPendingTransactionsReturnType`](https://viem.sh/docs/index.html) + +A function that can be invoked to stop watching for new pending transaction hashes. [WatchPendingTransactionsReturnType](https://viem.sh/docs/index.html) + +##### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +##### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +*** + +### recipient + +> **recipient**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L16) + +*** + +### sender + +> **sender**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L14) + +*** + +### tokenAddress + +> **tokenAddress**: `` `0x${string}` `` + +Defined in: [packages/sdk/src/utils/testScenarios.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/testScenarios.ts#L17) diff --git a/api/@aastar/sdk/interfaces/SponsorshipPolicy.md b/api/@aastar/sdk/interfaces/SponsorshipPolicy.md new file mode 100644 index 000000000..ef2ccae95 --- /dev/null +++ b/api/@aastar/sdk/interfaces/SponsorshipPolicy.md @@ -0,0 +1,25 @@ +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L10) + +## Properties + +### globalLimit + +> **globalLimit**: `bigint` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L11) + +*** + +### itemPrice + +> **itemPrice**: `bigint` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L13) + +*** + +### userLimit + +> **userLimit**: `bigint` + +Defined in: [packages/operator/src/PaymasterOperatorClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/operator/src/PaymasterOperatorClient.ts#L12) diff --git a/api/@aastar/sdk/interfaces/SuperPaymasterConfig.md b/api/@aastar/sdk/interfaces/SuperPaymasterConfig.md new file mode 100644 index 000000000..4ac5fc950 --- /dev/null +++ b/api/@aastar/sdk/interfaces/SuperPaymasterConfig.md @@ -0,0 +1,57 @@ +Defined in: [packages/core/src/config/ContractConfigManager.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L4) + +## Properties + +### entryPoint + +> **entryPoint**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L11) + +*** + +### gToken + +> **gToken**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L6) + +*** + +### gTokenStaking + +> **gTokenStaking**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L7) + +*** + +### paymasterFactory + +> **paymasterFactory**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L9) + +*** + +### paymasterV4 + +> **paymasterV4**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L10) + +*** + +### registry + +> **registry**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L5) + +*** + +### superPaymaster + +> **superPaymaster**: `` `0x${string}` `` + +Defined in: [packages/core/src/config/ContractConfigManager.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/config/ContractConfigManager.ts#L8) diff --git a/api/@aastar/sdk/interfaces/TokenBalanceValidationParams.md b/api/@aastar/sdk/interfaces/TokenBalanceValidationParams.md new file mode 100644 index 000000000..5d7317b76 --- /dev/null +++ b/api/@aastar/sdk/interfaces/TokenBalanceValidationParams.md @@ -0,0 +1,63 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L22) + +Interface definitions + +## Extends + +- [`BalanceValidationParams`](BalanceValidationParams.md) + +## Properties + +### address + +> **address**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L18) + +#### Inherited from + +[`BalanceValidationParams`](BalanceValidationParams.md).[`address`](BalanceValidationParams.md#address) + +*** + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) + +#### Inherited from + +[`BalanceValidationParams`](BalanceValidationParams.md).[`chain`](BalanceValidationParams.md#chain) + +*** + +### minBalance? + +> `optional` **minBalance**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L19) + +#### Inherited from + +[`BalanceValidationParams`](BalanceValidationParams.md).[`minBalance`](BalanceValidationParams.md#minbalance) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) + +#### Inherited from + +[`BalanceValidationParams`](BalanceValidationParams.md).[`rpcUrl`](BalanceValidationParams.md#rpcurl) + +*** + +### tokenAddress + +> **tokenAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/actions/StateValidator.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L23) diff --git a/api/@aastar/sdk/interfaces/TransactionOptions.md b/api/@aastar/sdk/interfaces/TransactionOptions.md new file mode 100644 index 000000000..1dab79ba6 --- /dev/null +++ b/api/@aastar/sdk/interfaces/TransactionOptions.md @@ -0,0 +1,24 @@ +Defined in: [packages/core/src/clients/types.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L53) + +Common options for transaction methods + +## Properties + +### account? + +> `optional` **account**: `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/clients/types.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L58) + +Override the account to use for the transaction. +If not provided, uses the account from the WalletClient. + +*** + +### value? + +> `optional` **value**: `bigint` + +Defined in: [packages/core/src/clients/types.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L63) + +Optional value to send with the transaction (in wei) diff --git a/api/@aastar/sdk/interfaces/UserClientConfig.md b/api/@aastar/sdk/interfaces/UserClientConfig.md new file mode 100644 index 000000000..b8eb1efd4 --- /dev/null +++ b/api/@aastar/sdk/interfaces/UserClientConfig.md @@ -0,0 +1,167 @@ +Defined in: [packages/enduser/src/UserClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L6) + +Base configuration for all L2 Business Clients + +## Extends + +- [`ClientConfig`](ClientConfig.md) + +## Properties + +### accountAddress + +> **accountAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L7) + +*** + +### bundlerClient? + +> `optional` **bundlerClient**: `any` + +Defined in: [packages/enduser/src/UserClient.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L14) + +*** + +### client + +> **client**: [`WalletClient`](WalletClient.md) + +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) + +Viem WalletClient for write operations. +Must have an account attached. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`client`](ClientConfig.md#client) + +*** + +### entryPointAddress? + +> `optional` **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L9) + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`entryPointAddress`](ClientConfig.md#entrypointaddress) + +*** + +### ethUsdPriceFeedAddress? + +> `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`ethUsdPriceFeedAddress`](ClientConfig.md#ethusdpricefeedaddress) + +*** + +### gTokenAddress? + +> `optional` **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L13) + +GToken contract address. +Required for operations involving token approvals and transfers. + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`gTokenAddress`](ClientConfig.md#gtokenaddress) + +*** + +### gTokenStakingAddress? + +> `optional` **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L11) + +GTokenStaking contract address. +Required for role registration that involves staking. + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`gTokenStakingAddress`](ClientConfig.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) + +PaymasterFactory contract address. +Required for deploying new PaymasterV4 instances. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`paymasterFactoryAddress`](ClientConfig.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](PublicClient.md) + +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) + +Optional PublicClient for read operations. +If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). +Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. +However, explicitly accepting PublicClient encourages separation. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`publicClient`](ClientConfig.md#publicclient) + +*** + +### registryAddress? + +> `optional` **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L12) + +Registry contract address. +Essential for looking up other contracts if not provided explicitly. + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`registryAddress`](ClientConfig.md#registryaddress) + +*** + +### sbtAddress? + +> `optional` **sbtAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L8) + +*** + +### superPaymasterAddress? + +> `optional` **superPaymasterAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserClient.ts#L10) + +*** + +### xpntsFactoryAddress? + +> `optional` **xpntsFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`xpntsFactoryAddress`](ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/sdk/interfaces/UserLifecycleConfig.md b/api/@aastar/sdk/interfaces/UserLifecycleConfig.md new file mode 100644 index 000000000..dcb0c37f1 --- /dev/null +++ b/api/@aastar/sdk/interfaces/UserLifecycleConfig.md @@ -0,0 +1,159 @@ +Defined in: [packages/enduser/src/UserLifecycle.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L10) + +Base configuration for all L2 Business Clients + +## Extends + +- [`ClientConfig`](ClientConfig.md) + +## Properties + +### accountAddress + +> **accountAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L11) + +*** + +### client + +> **client**: [`WalletClient`](WalletClient.md) + +Defined in: [packages/core/src/clients/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L12) + +Viem WalletClient for write operations. +Must have an account attached. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`client`](ClientConfig.md#client) + +*** + +### entryPointAddress + +> **entryPointAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L16) + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`entryPointAddress`](ClientConfig.md#entrypointaddress) + +*** + +### ethUsdPriceFeedAddress? + +> `optional` **ethUsdPriceFeedAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L46) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`ethUsdPriceFeedAddress`](ClientConfig.md#ethusdpricefeedaddress) + +*** + +### gasless? + +> `optional` **gasless**: [`GaslessConfig`](GaslessConfig.md) + +Defined in: [packages/enduser/src/UserLifecycle.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L17) + +*** + +### gTokenAddress + +> **gTokenAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L14) + +GToken contract address. +Required for operations involving token approvals and transfers. + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`gTokenAddress`](ClientConfig.md#gtokenaddress) + +*** + +### gTokenStakingAddress + +> **gTokenStakingAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L15) + +GTokenStaking contract address. +Required for role registration that involves staking. + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`gTokenStakingAddress`](ClientConfig.md#gtokenstakingaddress) + +*** + +### paymasterFactoryAddress? + +> `optional` **paymasterFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L44) + +PaymasterFactory contract address. +Required for deploying new PaymasterV4 instances. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`paymasterFactoryAddress`](ClientConfig.md#paymasterfactoryaddress) + +*** + +### publicClient? + +> `optional` **publicClient**: [`PublicClient`](PublicClient.md) + +Defined in: [packages/core/src/clients/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L20) + +Optional PublicClient for read operations. +If not provided, one will be derived from the WalletClient or created internally if possible (but usually explicit is better). +Currently L1 actions use PublicClient | WalletClient, so WalletClient is enough for both if it has a provider. +However, explicitly accepting PublicClient encourages separation. + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`publicClient`](ClientConfig.md#publicclient) + +*** + +### registryAddress + +> **registryAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L12) + +Registry contract address. +Essential for looking up other contracts if not provided explicitly. + +#### Overrides + +[`ClientConfig`](ClientConfig.md).[`registryAddress`](ClientConfig.md#registryaddress) + +*** + +### sbtAddress + +> **sbtAddress**: `` `0x${string}` `` + +Defined in: [packages/enduser/src/UserLifecycle.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/enduser/src/UserLifecycle.ts#L13) + +*** + +### xpntsFactoryAddress? + +> `optional` **xpntsFactoryAddress**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L45) + +#### Inherited from + +[`ClientConfig`](ClientConfig.md).[`xpntsFactoryAddress`](ClientConfig.md#xpntsfactoryaddress) diff --git a/api/@aastar/sdk/interfaces/UserOpGasParams.md b/api/@aastar/sdk/interfaces/UserOpGasParams.md new file mode 100644 index 000000000..96498a3b2 --- /dev/null +++ b/api/@aastar/sdk/interfaces/UserOpGasParams.md @@ -0,0 +1,41 @@ +Defined in: [packages/sdk/src/utils/userOp.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L18) + +## Properties + +### callGasLimit + +> **callGasLimit**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L20) + +*** + +### maxFeePerGas + +> **maxFeePerGas**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L23) + +*** + +### maxPriorityFeePerGas + +> **maxPriorityFeePerGas**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L22) + +*** + +### preVerificationGas + +> **preVerificationGas**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L21) + +*** + +### verificationGasLimit + +> **verificationGasLimit**: `bigint` + +Defined in: [packages/sdk/src/utils/userOp.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/userOp.ts#L19) diff --git a/api/@aastar/sdk/interfaces/UserOperationV07.md b/api/@aastar/sdk/interfaces/UserOperationV07.md new file mode 100644 index 000000000..2d553e8c3 --- /dev/null +++ b/api/@aastar/sdk/interfaces/UserOperationV07.md @@ -0,0 +1,73 @@ +Defined in: [packages/core/src/clients/BundlerClient.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L4) + +## Properties + +### accountGasLimits + +> **accountGasLimits**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L9) + +*** + +### callData + +> **callData**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L8) + +*** + +### gasFees + +> **gasFees**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L11) + +*** + +### initCode + +> **initCode**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L7) + +*** + +### nonce + +> **nonce**: `bigint` + +Defined in: [packages/core/src/clients/BundlerClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L6) + +*** + +### paymasterAndData + +> **paymasterAndData**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L12) + +*** + +### preVerificationGas + +> **preVerificationGas**: `bigint` + +Defined in: [packages/core/src/clients/BundlerClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L10) + +*** + +### sender + +> **sender**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L5) + +*** + +### signature + +> **signature**: `` `0x${string}` `` + +Defined in: [packages/core/src/clients/BundlerClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/BundlerClient.ts#L13) diff --git a/api/@aastar/sdk/interfaces/ValidationParams.md b/api/@aastar/sdk/interfaces/ValidationParams.md new file mode 100644 index 000000000..83d1ca2f2 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ValidationParams.md @@ -0,0 +1,25 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L6) + +Interface definitions + +## Extended by + +- [`RoleValidationParams`](RoleValidationParams.md) +- [`BalanceValidationParams`](BalanceValidationParams.md) +- [`DeploymentValidationParams`](DeploymentValidationParams.md) + +## Properties + +### chain + +> **chain**: [`Chain`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/StateValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L8) + +*** + +### rpcUrl + +> **rpcUrl**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L7) diff --git a/api/@aastar/sdk/interfaces/ValidationResult.md b/api/@aastar/sdk/interfaces/ValidationResult.md new file mode 100644 index 000000000..d1c2c5b36 --- /dev/null +++ b/api/@aastar/sdk/interfaces/ValidationResult.md @@ -0,0 +1,25 @@ +Defined in: [packages/core/src/actions/StateValidator.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L30) + +## Properties + +### data? + +> `optional` **data**: `any` + +Defined in: [packages/core/src/actions/StateValidator.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L33) + +*** + +### message? + +> `optional` **message**: `string` + +Defined in: [packages/core/src/actions/StateValidator.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L32) + +*** + +### valid + +> **valid**: `boolean` + +Defined in: [packages/core/src/actions/StateValidator.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/StateValidator.ts#L31) diff --git a/api/@aastar/sdk/interfaces/WalletClient.md b/api/@aastar/sdk/interfaces/WalletClient.md new file mode 100644 index 000000000..1f8ea6fe0 --- /dev/null +++ b/api/@aastar/sdk/interfaces/WalletClient.md @@ -0,0 +1,1846 @@ +Defined in: [packages/core/src/clients/doc-types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/doc-types.ts#L13) + +Wallet Client Interface +Standardized interface for interacting with Ethereum wallets and accounts. + +## Extends + +- [`WalletClient`](https://viem.sh/docs/index.html)\<`TTransport`, `TChain`, `TAccount`\> + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `TTransport` *extends* [`Transport`](https://viem.sh/docs/index.html) | [`Transport`](https://viem.sh/docs/index.html) | +| `TChain` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | +| `TAccount` *extends* [`Account`](https://viem.sh/docs/index.html) \| `undefined` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | + +## Properties + +### account + +> **account**: `TAccount` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:73 + +The Account of the Client. + +#### Inherited from + +`ViemWalletClient.account` + +*** + +### addChain() + +> **addChain**: (`args`) => `Promise`\<`void`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:53 + +Adds an EVM chain to the wallet. + +- Docs: https://viem.sh/docs/actions/wallet/addChain +- JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`AddChainParameters`](https://viem.sh/docs/index.html) | [AddChainParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`void`\> + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { optimism } from 'viem/chains' + +const client = createWalletClient({ + transport: custom(window.ethereum), +}) +await client.addChain({ chain: optimism }) +``` + +#### Inherited from + +`ViemWalletClient.addChain` + +*** + +### batch? + +> `optional` **batch**: `object` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:75 + +Flags for batch settings. + +#### multicall? + +> `optional` **multicall**: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +Toggle to enable `eth_call` multicall aggregation. + +##### Type Declaration + +`boolean` + +\{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} + +#### Inherited from + +`ViemWalletClient.batch` + +*** + +### cacheTime + +> **cacheTime**: `number` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:77 + +Time (in ms) that cached data will remain in memory. + +#### Inherited from + +`ViemWalletClient.cacheTime` + +*** + +### ccipRead? + +> `optional` **ccipRead**: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:79 + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +#### Type Declaration + +`false` + +\{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} + +#### request()? + +> `optional` **request**: (`parameters`) => `Promise`\<`` `0x${string}` ``\> + +A function that will be called to make the offchain CCIP lookup request. + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`CcipRequestParameters`](https://viem.sh/docs/index.html) | + +##### Returns + +`Promise`\<`` `0x${string}` ``\> + +##### See + +https://eips.ethereum.org/EIPS/eip-3668#client-lookup-protocol + +#### Inherited from + +`ViemWalletClient.ccipRead` + +*** + +### chain + +> **chain**: `TChain` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:81 + +Chain for the client. + +#### Inherited from + +`ViemWalletClient.chain` + +*** + +### deployContract() + +> **deployContract**: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:79 + +Deploys a contract to the network, given bytecode and constructor arguments. + +- Docs: https://viem.sh/docs/contract/deployContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts + +#### Type Parameters + +| Type Parameter | +| ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`DeployContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `TChain`, `TAccount`, `chainOverride`\> | [DeployContractParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. [DeployContractReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) +const hash = await client.deployContract({ + abi: [], + account: '0x…, + bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', +}) +``` + +#### Inherited from + +`ViemWalletClient.deployContract` + +*** + +### experimental\_blockTag? + +> `optional` **experimental\_blockTag**: [`BlockTag`](https://viem.sh/docs/index.html) + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:83 + +Default block tag to use for RPC requests. + +#### Inherited from + +`ViemWalletClient.experimental_blockTag` + +*** + +### extend() + +> **extend**: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<`TTransport`, `TChain`, `TAccount`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:69 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `client` *extends* `object` & [`ExactPartial`](https://viem.sh/docs/index.html)\<[`ExtendableProtectedActions`](https://viem.sh/docs/index.html)\<`TTransport`, `TChain`, `TAccount`\>\> | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `fn` | (`client`) => `client` | + +#### Returns + +[`Client`](https://viem.sh/docs/index.html)\<`TTransport`, `TChain`, `TAccount`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`\>\> + +#### Inherited from + +`ViemWalletClient.extend` + +*** + +### fillTransaction() + +> **fillTransaction**: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<`TChain`, `chainOverride`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:103 + +Fills a transaction request with the necessary fields to be signed over. + +- Docs: https://viem.sh/docs/actions/public/fillTransaction + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`FillTransactionParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `accountOverride`\> | + +#### Returns + +`Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<`TChain`, `chainOverride`\>\> + +The filled transaction. [FillTransactionReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const result = await client.fillTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +#### Inherited from + +`ViemWalletClient.fillTransaction` + +*** + +### getAddresses() + +> **getAddresses**: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:122 + +Returns a list of account addresses owned by the wallet or client. + +- Docs: https://viem.sh/docs/actions/wallet/getAddresses +- JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) + +#### Returns + +`Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> + +List of account addresses owned by the wallet or client. [GetAddressesReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const accounts = await client.getAddresses() +``` + +#### Inherited from + +`ViemWalletClient.getAddresses` + +*** + +### getCallsStatus() + +> **getCallsStatus**: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:143 + +Returns the status of a call batch that was sent via `sendCalls`. + +- Docs: https://viem.sh/docs/actions/wallet/getCallsStatus +- JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`GetCallsStatusParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> + +Status of the calls. [GetCallsStatusReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' }) +``` + +#### Inherited from + +`ViemWalletClient.getCallsStatus` + +*** + +### getCapabilities() + +> **getCapabilities**: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ("address" \| "p256" \| "webcrypto-p256" \| "webauthn-p256")\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: (...) \| (...) \| (...) \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: (...)\[\]; supported: boolean \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:166 + +Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). + +- Docs: https://viem.sh/docs/actions/wallet/getCapabilities +- JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) + +#### Type Parameters + +| Type Parameter | +| ------ | +| `chainId` *extends* `number` \| `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters?` | [`GetCapabilitiesParameters`](https://viem.sh/docs/index.html)\<`chainId`\> | + +#### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "ready" \| "supported" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ("address" \| "p256" \| "webcrypto-p256" \| "webauthn-p256")\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: (...) \| (...) \| (...) \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: (...)\[\]; supported: boolean \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> + +The wallet's capabilities. [GetCapabilitiesReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const capabilities = await client.getCapabilities({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### Inherited from + +`ViemWalletClient.getCapabilities` + +*** + +### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:186 + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +#### Returns + +`Promise`\<`number`\> + +The current chain ID. [GetChainIdReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const chainId = await client.getChainId() +// 1 +``` + +#### Inherited from + +`ViemWalletClient.getChainId` + +*** + +### getPermissions() + +> **getPermissions**: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:205 + +Gets the wallets current permissions. + +- Docs: https://viem.sh/docs/actions/wallet/getPermissions +- JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) + +#### Returns + +`Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> + +The wallet permissions. [GetPermissionsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const permissions = await client.getPermissions() +``` + +#### Inherited from + +`ViemWalletClient.getPermissions` + +*** + +### key + +> **key**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:85 + +A key for the client. + +#### Inherited from + +`ViemWalletClient.key` + +*** + +### name + +> **name**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:87 + +A name for the client. + +#### Inherited from + +`ViemWalletClient.name` + +*** + +### pollingInterval + +> **pollingInterval**: `number` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:89 + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +#### Inherited from + +`ViemWalletClient.pollingInterval` + +*** + +### prepareAuthorization() + +> **prepareAuthorization**: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:247 + +Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. +This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). + +With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `parameters` | [`PrepareAuthorizationParameters`](https://viem.sh/docs/index.html)\<`TAccount`\> | [PrepareAuthorizationParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> + +The prepared Authorization object. [PrepareAuthorizationReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: http(), +}) + +const authorization = await client.prepareAuthorization({ + account: privateKeyToAccount('0x..'), + contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) + +const authorization = await client.prepareAuthorization({ + contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### Inherited from + +`ViemWalletClient.prepareAuthorization` + +*** + +### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:286 + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | +| `accountOverride` *extends* `` `0x${string}` `` \| [`Account`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`PrepareTransactionRequestParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `accountOverride`, `request`\> | [PrepareTransactionRequestParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\ extends Chain ? \{ chain: ... \} : \{ chain?: ... \}) & (DeriveAccount\<(...), (...)\> extends Account ? \{ account: ...; from: ... \} : \{ account?: ...; from?: ... \}), IsNever\<(...) \| (...) \| (...) \| (...) \| (...)\> extends true ? unknown : ExactPartial\<(...) \| (...) \| (...) \| (...) \| (...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "type" \| "chainId" \| "gas" \| "nonce" \| "blobVersionedHashes" \| "fees"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> + +The transaction request. [PrepareTransactionRequestReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +#### Inherited from + +`ViemWalletClient.prepareTransactionRequest` + +*** + +### request + +> **request**: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:91 + +Request function wrapped with friendly error handling + +#### Inherited from + +`ViemWalletClient.request` + +*** + +### requestAddresses() + +> **requestAddresses**: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:309 + +Requests a list of accounts managed by a wallet. + +- Docs: https://viem.sh/docs/actions/wallet/requestAddresses +- JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) + +Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). + +This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. + +#### Returns + +`Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> + +List of accounts managed by a wallet [RequestAddressesReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const accounts = await client.requestAddresses() +``` + +#### Inherited from + +`ViemWalletClient.requestAddresses` + +*** + +### requestPermissions() + +> **requestPermissions**: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:331 + +Requests permissions for a wallet. + +- Docs: https://viem.sh/docs/actions/wallet/requestPermissions +- JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{\[`key`: `string`\]: `Record`\<`string`, `any`\>; `eth_accounts`: `Record`\<`string`, `any`\>; \} | [RequestPermissionsParameters](https://viem.sh/docs/index.html) | +| `args.eth_accounts` | `Record`\<`string`, `any`\> | - | + +#### Returns + +`Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> + +The wallet permissions. [RequestPermissionsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const permissions = await client.requestPermissions({ + eth_accounts: {} +}) +``` + +#### Inherited from + +`ViemWalletClient.requestPermissions` + +*** + +### sendCalls() + +> **sendCalls**: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:364 + +Requests the connected wallet to send a batch of calls. + +- Docs: https://viem.sh/docs/actions/wallet/sendCalls +- JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `calls` *extends* readonly `unknown`[] | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`SendCallsParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `calls`\> | + +#### Returns + +`Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> + +Transaction identifier. [SendCallsReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const id = await client.sendCalls({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + calls: [ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: 69420n, + }, + ], +}) +``` + +#### Inherited from + +`ViemWalletClient.sendCalls` + +*** + +### sendCallsSync() + +> **sendCallsSync**: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:397 + +Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. + +- Docs: https://viem.sh/docs/actions/wallet/sendCallsSync +- JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `calls` *extends* readonly `unknown`[] | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`SendCallsSyncParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `calls`\> | + +#### Returns + +`Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> + +Calls status. [SendCallsSyncReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const status = await client.sendCallsSync({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + calls: [ + { + data: '0xdeadbeef', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + }, + { + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: 69420n, + }, + ], +}) +``` + +#### Inherited from + +`ViemWalletClient.sendCallsSync` + +*** + +### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:422 + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +The transaction hash. [SendRawTransactionReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### Inherited from + +`ViemWalletClient.sendRawTransaction` + +*** + +### sendRawTransactionSync() + +> **sendRawTransactionSync**: (`args`) => `Promise`\<[`ExtractChainFormatterReturnType`](https://viem.sh/docs/index.html)\<`TChain`, `"transactionReceipt"`, [`TransactionReceipt`](https://viem.sh/docs/index.html)\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:448 + +Sends a **signed** transaction to the network synchronously, +and waits for the transaction to be included in a block. + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync +- JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | [`SendRawTransactionSyncParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ExtractChainFormatterReturnType`](https://viem.sh/docs/index.html)\<`TChain`, `"transactionReceipt"`, [`TransactionReceipt`](https://viem.sh/docs/index.html)\>\> + +The transaction receipt. [SendRawTransactionSyncReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransactionSync } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const receipt = await client.sendRawTransactionSync({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +#### Inherited from + +`ViemWalletClient.sendRawTransactionSync` + +*** + +### sendTransaction() + +> **sendTransaction**: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:491 + +Creates, signs, and sends a new transaction to the network. + +- Docs: https://viem.sh/docs/actions/wallet/sendTransaction +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) + - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SendTransactionParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `request`\> | [SendTransactionParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. [SendTransactionReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const hash = await client.sendTransaction({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: 1000000000000000000n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) +const hash = await client.sendTransaction({ + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: 1000000000000000000n, +}) +``` + +#### Inherited from + +`ViemWalletClient.sendTransaction` + +*** + +### sendTransactionSync() + +> **sendTransactionSync**: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`ExtractChainFormatterReturnType`](https://viem.sh/docs/index.html)\<`TChain`, `"transactionReceipt"`, [`TransactionReceipt`](https://viem.sh/docs/index.html)\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:535 + +Creates, signs, and sends a new transaction to the network synchronously. +Returns the transaction receipt. + +- Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions +- JSON-RPC Methods: + - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) + - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> & `object` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SendTransactionSyncParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `request`\> | [SendTransactionParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ExtractChainFormatterReturnType`](https://viem.sh/docs/index.html)\<`TChain`, `"transactionReceipt"`, [`TransactionReceipt`](https://viem.sh/docs/index.html)\>\> + +The transaction receipt. [SendTransactionReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const receipt = await client.sendTransactionSync({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: 1000000000000000000n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) +const receipt = await client.sendTransactionSync({ + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: 1000000000000000000n, +}) +``` + +#### Inherited from + +`ViemWalletClient.sendTransactionSync` + +*** + +### showCallsStatus() + +> **showCallsStatus**: (`parameters`) => `Promise`\<`void`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:557 + +Requests for the wallet to show information about a call batch +that was sent via `sendCalls`. + +- Docs: https://viem.sh/docs/actions/wallet/showCallsStatus +- JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parameters` | [`ShowCallsStatusParameters`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`void`\> + +Displays status of the calls in wallet. [ShowCallsStatusReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +await client.showCallsStatus({ id: '0xdeadbeef' }) +``` + +#### Inherited from + +`ViemWalletClient.showCallsStatus` + +*** + +### signAuthorization() + +> **signAuthorization**: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:600 + +Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. + +With the calculated signature, you can: +- use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, +- use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `parameters` | [`SignAuthorizationParameters`](https://viem.sh/docs/index.html)\<`TAccount`\> | [SignAuthorizationParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> + +The signed Authorization object. [SignAuthorizationReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: http(), +}) + +const signature = await client.signAuthorization({ + account: privateKeyToAccount('0x..'), + contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) + +const signature = await client.signAuthorization({ + contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +#### Inherited from + +`ViemWalletClient.signAuthorization` + +*** + +### signMessage() + +> **signMessage**: (`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:644 + +Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. + +- Docs: https://viem.sh/docs/actions/wallet/signMessage +- JSON-RPC Methods: + - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) + - Local Accounts: Signs locally. No JSON-RPC request. + +With the calculated signature, you can: +- use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, +- use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SignMessageParameters`](https://viem.sh/docs/index.html)\<`TAccount`\> | [SignMessageParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +The signed message. [SignMessageReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const signature = await client.signMessage({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + message: 'hello world', +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) +const signature = await client.signMessage({ + message: 'hello world', +}) +``` + +#### Inherited from + +`ViemWalletClient.signMessage` + +*** + +### signTransaction() + +> **signTransaction**: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:688 + +Signs a transaction. + +- Docs: https://viem.sh/docs/actions/wallet/signTransaction +- JSON-RPC Methods: + - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + - Local Accounts: Signs locally. No JSON-RPC request. + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | - | +| `request` *extends* [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: `undefined`; `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"legacy"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `bigint`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `undefined`; `maxPriorityFeePerGas?`: `undefined`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip2930"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip1559"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs?`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: `undefined`; `blobs`: readonly `` `0x${string}` ``[] \| readonly `Uint8Array`[]; `blobVersionedHashes?`: readonly `` `0x${string}` ``[]; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: [`Kzg`](https://viem.sh/docs/index.html); `maxFeePerBlobGas?`: `bigint`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: readonly [`BlobSidecar`](https://viem.sh/docs/index.html)\<`` `0x${string}` ``\>[]; `to`: `` `0x${string}` `` \| `null`; `type?`: `"eip4844"`; `value?`: `bigint`; \}, `"from"`\> \| [`Omit`](https://viem.sh/docs/index.html)\<\{ `accessList?`: [`AccessList`](https://viem.sh/docs/index.html); `authorizationList?`: [`AuthorizationList`](https://viem.sh/docs/index.html)\<`number`, `boolean`\>; `blobs?`: `undefined`; `blobVersionedHashes?`: `undefined`; `data?`: `` `0x${string}` ``; `from?`: `` `0x${string}` ``; `gas?`: `bigint`; `gasPrice?`: `undefined`; `kzg?`: `undefined`; `maxFeePerBlobGas?`: `undefined`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `number`; `sidecars?`: `undefined`; `to?`: `` `0x${string}` `` \| `null`; `type?`: `"eip7702"`; `value?`: `bigint`; \}, `"from"`\> | [`UnionOmit`](https://viem.sh/docs/index.html)\<[`ExtractChainFormatterParameters`](https://viem.sh/docs/index.html)\<[`DeriveChain`](https://viem.sh/docs/index.html)\<`TChain`, `chainOverride`\>, `"transactionRequest"`, [`TransactionRequest`](https://viem.sh/docs/index.html)\>, `"from"`\> | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SignTransactionParameters`](https://viem.sh/docs/index.html)\<`TChain`, `TAccount`, `chainOverride`, `request`\> | [SignTransactionParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> + +The signed message. [SignTransactionReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +const signature = await client.signTransaction(request) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +const signature = await client.signTransaction(request) +``` + +#### Inherited from + +`ViemWalletClient.signTransaction` + +*** + +### signTypedData() + +> **signTypedData**: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:785 + +Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. + +- Docs: https://viem.sh/docs/actions/wallet/signTypedData +- JSON-RPC Methods: + - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) + - Local Accounts: Signs locally. No JSON-RPC request. + +#### Type Parameters + +| Type Parameter | +| ------ | +| `typedData` *extends* \{\[`key`: `string`\]: readonly `TypedDataParameter`[]; \[`key`: `` `string[${string}]` ``\]: `undefined`; \[`key`: `` `function[${string}]` ``\]: `undefined`; \[`key`: `` `address[${string}]` ``\]: `undefined`; \[`key`: `` `uint256[${string}]` ``\]: `undefined`; \[`key`: `` `bytes[${string}]` ``\]: `undefined`; \[`key`: `` `bytes32[${string}]` ``\]: `undefined`; \[`key`: `` `uint32[${string}]` ``\]: `undefined`; \[`key`: `` `uint16[${string}]` ``\]: `undefined`; \[`key`: `` `bool[${string}]` ``\]: `undefined`; \[`key`: `` `uint64[${string}]` ``\]: `undefined`; \[`key`: `` `uint8[${string}]` ``\]: `undefined`; \[`key`: `` `bytes1[${string}]` ``\]: `undefined`; \[`key`: `` `uint128[${string}]` ``\]: `undefined`; \[`key`: `` `uint48[${string}]` ``\]: `undefined`; \[`key`: `` `int256[${string}]` ``\]: `undefined`; \[`key`: `` `uint80[${string}]` ``\]: `undefined`; \[`key`: `` `bytes4[${string}]` ``\]: `undefined`; \[`key`: `` `uint208[${string}]` ``\]: `undefined`; \[`key`: `` `uint112[${string}]` ``\]: `undefined`; \[`key`: `` `uint192[${string}]` ``\]: `undefined`; \[`key`: `` `int128[${string}]` ``\]: `undefined`; \[`key`: `` `uint40[${string}]` ``\]: `undefined`; \[`key`: `` `bytes2[${string}]` ``\]: `undefined`; \[`key`: `` `bytes10[${string}]` ``\]: `undefined`; \[`key`: `` `bytes16[${string}]` ``\]: `undefined`; \[`key`: `` `bytes8[${string}]` ``\]: `undefined`; \[`key`: `` `bytes3[${string}]` ``\]: `undefined`; \[`key`: `` `bytes15[${string}]` ``\]: `undefined`; \[`key`: `` `bytes26[${string}]` ``\]: `undefined`; \[`key`: `` `bytes18[${string}]` ``\]: `undefined`; \[`key`: `` `bytes27[${string}]` ``\]: `undefined`; \[`key`: `` `bytes28[${string}]` ``\]: `undefined`; \[`key`: `` `bytes12[${string}]` ``\]: `undefined`; \[`key`: `` `bytes6[${string}]` ``\]: `undefined`; \[`key`: `` `bytes5[${string}]` ``\]: `undefined`; \[`key`: `` `bytes31[${string}]` ``\]: `undefined`; \[`key`: `` `bytes7[${string}]` ``\]: `undefined`; \[`key`: `` `bytes22[${string}]` ``\]: `undefined`; \[`key`: `` `bytes9[${string}]` ``\]: `undefined`; \[`key`: `` `bytes11[${string}]` ``\]: `undefined`; \[`key`: `` `bytes13[${string}]` ``\]: `undefined`; \[`key`: `` `bytes14[${string}]` ``\]: `undefined`; \[`key`: `` `bytes17[${string}]` ``\]: `undefined`; \[`key`: `` `bytes19[${string}]` ``\]: `undefined`; \[`key`: `` `bytes20[${string}]` ``\]: `undefined`; \[`key`: `` `bytes30[${string}]` ``\]: `undefined`; \[`key`: `` `bytes21[${string}]` ``\]: `undefined`; \[`key`: `` `bytes23[${string}]` ``\]: `undefined`; \[`key`: `` `bytes24[${string}]` ``\]: `undefined`; \[`key`: `` `bytes25[${string}]` ``\]: `undefined`; \[`key`: `` `bytes29[${string}]` ``\]: `undefined`; \[`key`: `` `int[${string}]` ``\]: `undefined`; \[`key`: `` `int48[${string}]` ``\]: `undefined`; \[`key`: `` `int32[${string}]` ``\]: `undefined`; \[`key`: `` `int16[${string}]` ``\]: `undefined`; \[`key`: `` `int8[${string}]` ``\]: `undefined`; \[`key`: `` `int64[${string}]` ``\]: `undefined`; \[`key`: `` `int40[${string}]` ``\]: `undefined`; \[`key`: `` `int88[${string}]` ``\]: `undefined`; \[`key`: `` `int160[${string}]` ``\]: `undefined`; \[`key`: `` `int96[${string}]` ``\]: `undefined`; \[`key`: `` `int192[${string}]` ``\]: `undefined`; \[`key`: `` `int200[${string}]` ``\]: `undefined`; \[`key`: `` `int24[${string}]` ``\]: `undefined`; \[`key`: `` `int56[${string}]` ``\]: `undefined`; \[`key`: `` `int72[${string}]` ``\]: `undefined`; \[`key`: `` `int80[${string}]` ``\]: `undefined`; \[`key`: `` `int104[${string}]` ``\]: `undefined`; \[`key`: `` `int112[${string}]` ``\]: `undefined`; \[`key`: `` `int120[${string}]` ``\]: `undefined`; \[`key`: `` `int136[${string}]` ``\]: `undefined`; \[`key`: `` `int144[${string}]` ``\]: `undefined`; \[`key`: `` `int152[${string}]` ``\]: `undefined`; \[`key`: `` `int168[${string}]` ``\]: `undefined`; \[`key`: `` `int176[${string}]` ``\]: `undefined`; \[`key`: `` `int184[${string}]` ``\]: `undefined`; \[`key`: `` `int208[${string}]` ``\]: `undefined`; \[`key`: `` `int216[${string}]` ``\]: `undefined`; \[`key`: `` `int224[${string}]` ``\]: `undefined`; \[`key`: `` `int232[${string}]` ``\]: `undefined`; \[`key`: `` `int240[${string}]` ``\]: `undefined`; \[`key`: `` `int248[${string}]` ``\]: `undefined`; \[`key`: `` `uint[${string}]` ``\]: `undefined`; \[`key`: `` `uint88[${string}]` ``\]: `undefined`; \[`key`: `` `uint160[${string}]` ``\]: `undefined`; \[`key`: `` `uint96[${string}]` ``\]: `undefined`; \[`key`: `` `uint200[${string}]` ``\]: `undefined`; \[`key`: `` `uint24[${string}]` ``\]: `undefined`; \[`key`: `` `uint56[${string}]` ``\]: `undefined`; \[`key`: `` `uint72[${string}]` ``\]: `undefined`; \[`key`: `` `uint104[${string}]` ``\]: `undefined`; \[`key`: `` `uint120[${string}]` ``\]: `undefined`; \[`key`: `` `uint136[${string}]` ``\]: `undefined`; \[`key`: `` `uint144[${string}]` ``\]: `undefined`; \[`key`: `` `uint152[${string}]` ``\]: `undefined`; \[`key`: `` `uint168[${string}]` ``\]: `undefined`; \[`key`: `` `uint176[${string}]` ``\]: `undefined`; \[`key`: `` `uint184[${string}]` ``\]: `undefined`; \[`key`: `` `uint216[${string}]` ``\]: `undefined`; \[`key`: `` `uint224[${string}]` ``\]: `undefined`; \[`key`: `` `uint232[${string}]` ``\]: `undefined`; \[`key`: `` `uint240[${string}]` ``\]: `undefined`; \[`key`: `` `uint248[${string}]` ``\]: `undefined`; `address?`: `undefined`; `bool?`: `undefined`; `bytes?`: `undefined`; `bytes1?`: `undefined`; `bytes10?`: `undefined`; `bytes11?`: `undefined`; `bytes12?`: `undefined`; `bytes13?`: `undefined`; `bytes14?`: `undefined`; `bytes15?`: `undefined`; `bytes16?`: `undefined`; `bytes17?`: `undefined`; `bytes18?`: `undefined`; `bytes19?`: `undefined`; `bytes2?`: `undefined`; `bytes20?`: `undefined`; `bytes21?`: `undefined`; `bytes22?`: `undefined`; `bytes23?`: `undefined`; `bytes24?`: `undefined`; `bytes25?`: `undefined`; `bytes26?`: `undefined`; `bytes27?`: `undefined`; `bytes28?`: `undefined`; `bytes29?`: `undefined`; `bytes3?`: `undefined`; `bytes30?`: `undefined`; `bytes31?`: `undefined`; `bytes32?`: `undefined`; `bytes4?`: `undefined`; `bytes5?`: `undefined`; `bytes6?`: `undefined`; `bytes7?`: `undefined`; `bytes8?`: `undefined`; `bytes9?`: `undefined`; `int104?`: `undefined`; `int112?`: `undefined`; `int120?`: `undefined`; `int128?`: `undefined`; `int136?`: `undefined`; `int144?`: `undefined`; `int152?`: `undefined`; `int16?`: `undefined`; `int160?`: `undefined`; `int168?`: `undefined`; `int176?`: `undefined`; `int184?`: `undefined`; `int192?`: `undefined`; `int200?`: `undefined`; `int208?`: `undefined`; `int216?`: `undefined`; `int224?`: `undefined`; `int232?`: `undefined`; `int24?`: `undefined`; `int240?`: `undefined`; `int248?`: `undefined`; `int256?`: `undefined`; `int32?`: `undefined`; `int40?`: `undefined`; `int48?`: `undefined`; `int56?`: `undefined`; `int64?`: `undefined`; `int72?`: `undefined`; `int8?`: `undefined`; `int80?`: `undefined`; `int88?`: `undefined`; `int96?`: `undefined`; `string?`: `undefined`; `uint104?`: `undefined`; `uint112?`: `undefined`; `uint120?`: `undefined`; `uint128?`: `undefined`; `uint136?`: `undefined`; `uint144?`: `undefined`; `uint152?`: `undefined`; `uint16?`: `undefined`; `uint160?`: `undefined`; `uint168?`: `undefined`; `uint176?`: `undefined`; `uint184?`: `undefined`; `uint192?`: `undefined`; `uint200?`: `undefined`; `uint208?`: `undefined`; `uint216?`: `undefined`; `uint224?`: `undefined`; `uint232?`: `undefined`; `uint24?`: `undefined`; `uint240?`: `undefined`; `uint248?`: `undefined`; `uint256?`: `undefined`; `uint32?`: `undefined`; `uint40?`: `undefined`; `uint48?`: `undefined`; `uint56?`: `undefined`; `uint64?`: `undefined`; `uint72?`: `undefined`; `uint8?`: `undefined`; `uint80?`: `undefined`; `uint88?`: `undefined`; `uint96?`: `undefined`; \} \| \{\[`key`: `string`\]: `unknown`; \} | +| `primaryType` *extends* `string` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SignTypedDataParameters`](https://viem.sh/docs/index.html)\<`typedData`, `primaryType`, `TAccount`\> | [SignTypedDataParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +The signed data. [SignTypedDataReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const signature = await client.signTypedData({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + domain: { + name: 'Ether Mail', + version: '1', + chainId: 1, + verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', + }, + types: { + Person: [ + { name: 'name', type: 'string' }, + { name: 'wallet', type: 'address' }, + ], + Mail: [ + { name: 'from', type: 'Person' }, + { name: 'to', type: 'Person' }, + { name: 'contents', type: 'string' }, + ], + }, + primaryType: 'Mail', + message: { + from: { + name: 'Cow', + wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', + }, + to: { + name: 'Bob', + wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', + }, + contents: 'Hello, Bob!', + }, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: http(), +}) +const signature = await client.signTypedData({ + domain: { + name: 'Ether Mail', + version: '1', + chainId: 1, + verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', + }, + types: { + Person: [ + { name: 'name', type: 'string' }, + { name: 'wallet', type: 'address' }, + ], + Mail: [ + { name: 'from', type: 'Person' }, + { name: 'to', type: 'Person' }, + { name: 'contents', type: 'string' }, + ], + }, + primaryType: 'Mail', + message: { + from: { + name: 'Cow', + wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', + }, + to: { + name: 'Bob', + wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', + }, + contents: 'Hello, Bob!', + }, +}) +``` + +#### Inherited from + +`ViemWalletClient.signTypedData` + +*** + +### switchChain() + +> **switchChain**: (`args`) => `Promise`\<`void`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:806 + +Switch the target chain in a wallet. + +- Docs: https://viem.sh/docs/actions/wallet/switchChain +- JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`SwitchChainParameters`](https://viem.sh/docs/index.html) | [SwitchChainParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`void`\> + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet, optimism } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +await client.switchChain({ id: optimism.id }) +``` + +#### Inherited from + +`ViemWalletClient.switchChain` + +*** + +### transport + +> **transport**: `ReturnType`\<`TTransport`\>\[`"config"`\] & `ReturnType`\<`TTransport`\>\[`"value"`\] + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:93 + +The RPC transport + +#### Inherited from + +`ViemWalletClient.transport` + +*** + +### type + +> **type**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:95 + +The type of client. + +#### Inherited from + +`ViemWalletClient.type` + +*** + +### uid + +> **uid**: `string` + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/createClient.d.ts:97 + +A unique ID for the client. + +#### Inherited from + +`ViemWalletClient.uid` + +*** + +### waitForCallsStatus() + +> **waitForCallsStatus**: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:828 + +Waits for the status & receipts of a call bundle that was sent via `sendCalls`. + +- Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus +- JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `parameters` | [`WaitForCallsStatusParameters`](https://viem.sh/docs/index.html) | [WaitForCallsStatusParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"pending"` \| `"success"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> + +Status & receipts of the call bundle. [WaitForCallsStatusReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' }) +``` + +#### Inherited from + +`ViemWalletClient.waitForCallsStatus` + +*** + +### watchAsset() + +> **watchAsset**: (`args`) => `Promise`\<`boolean`\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:855 + +Adds an EVM chain to the wallet. + +- Docs: https://viem.sh/docs/actions/wallet/watchAsset +- JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WatchAssetParams`](https://viem.sh/docs/index.html) | [WatchAssetParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +Boolean indicating if the token was successfully added. [WatchAssetReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const success = await client.watchAsset({ + type: 'ERC20', + options: { + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + decimals: 18, + symbol: 'WETH', + }, +}) +``` + +#### Inherited from + +`ViemWalletClient.watchAsset` + +*** + +### writeContract() + +> **writeContract**: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:903 + +Executes a write function on a contract. + +- Docs: https://viem.sh/docs/contract/writeContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts + +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. + +Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +__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.__ + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WriteContractParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `TChain`, `TAccount`, `chainOverride`\> | [WriteContractParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +A [Transaction Hash](https://viem.sh/docs/glossary/terms#hash). [WriteContractReturnType](https://viem.sh/docs/index.html) + +#### Examples + +```ts +import { createWalletClient, custom, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const hash = await client.writeContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), + functionName: 'mint', + args: [69420], +}) +``` + +```ts +// With Validation +import { createWalletClient, custom, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const { request } = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), + functionName: 'mint', + args: [69420], +} +const hash = await client.writeContract(request) +``` + +#### Inherited from + +`ViemWalletClient.writeContract` + +*** + +### writeContractSync() + +> **writeContractSync**: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +Defined in: node\_modules/.pnpm/viem@2.43.3\_typescript@5.7.2\_zod@3.25.76/node\_modules/viem/\_types/clients/decorators/wallet.d.ts:934 + +Executes a write function on a contract synchronously. +Returns the transaction receipt. + +- Docs: https://viem.sh/docs/contract/writeContract + +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. + +Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +__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.__ + +#### Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `abi` *extends* readonly `unknown`[] \| `Abi` | - | +| `functionName` *extends* `string` | - | +| `args` *extends* `unknown` | - | +| `chainOverride` *extends* [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | `undefined` | + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | [`WriteContractSyncParameters`](https://viem.sh/docs/index.html)\<`abi`, `functionName`, `args`, `TChain`, `TAccount`, `chainOverride`\> | [WriteContractSyncParameters](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> + +A [Transaction Receipt](https://viem.sh/docs/glossary/terms#receipt). [WriteContractSyncReturnType](https://viem.sh/docs/index.html) + +#### Example + +```ts +import { createWalletClient, custom, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const receipt = await client.writeContractSync({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), + functionName: 'mint', + args: [69420], +}) +``` + +#### Inherited from + +`ViemWalletClient.writeContractSync` diff --git a/api/@aastar/sdk/namespaces/KMS/classes/AirAccountClient.md b/api/@aastar/sdk/namespaces/KMS/classes/AirAccountClient.md new file mode 100644 index 000000000..0211b190c --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/classes/AirAccountClient.md @@ -0,0 +1,35 @@ +Defined in: [packages/airaccount/src/client.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L29) + +## Constructors + +### Constructor + +> **new AirAccountClient**(`config`): `AirAccountClient` + +Defined in: [packages/airaccount/src/client.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L33) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`AirAccountConfig`](../interfaces/AirAccountConfig.md) | + +#### Returns + +`AirAccountClient` + +## Properties + +### bls + +> `readonly` **bls**: [`BLSManager`](BLSManager.md) + +Defined in: [packages/airaccount/src/client.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L31) + +*** + +### passkey + +> `readonly` **passkey**: [`PasskeyManager`](PasskeyManager.md) + +Defined in: [packages/airaccount/src/client.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L30) diff --git a/api/@aastar/sdk/namespaces/KMS/classes/BLSManager.md b/api/@aastar/sdk/namespaces/KMS/classes/BLSManager.md new file mode 100644 index 000000000..fa06dfeda --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/classes/BLSManager.md @@ -0,0 +1,168 @@ +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L16) + +## Constructors + +### Constructor + +> **new BLSManager**(`config`): `BLSManager` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`BLSConfig`](../interfaces/BLSConfig.md) | + +#### Returns + +`BLSManager` + +## Methods + +### aggregateSignatures() + +> **aggregateSignatures**(`node`, `signatures`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L131) + +Request aggregation from a node + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `node` | [`BLSNode`](../interfaces/BLSNode.md) | +| `signatures` | `string`[] | + +#### Returns + +`Promise`\<`string`\> + +*** + +### generateMessagePoint() + +> **generateMessagePoint**(`message`): `Promise`\<`string`\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L74) + +Calculate the MessagePoint G2 point for a given message (UserOpHash) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` \| `Uint8Array` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### getAvailableNodes() + +> **getAvailableNodes**(): `Promise`\<[`BLSNode`](../interfaces/BLSNode.md)[]\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L26) + +Discover available BLS nodes from seed nodes (Gossip network) + +#### Returns + +`Promise`\<[`BLSNode`](../interfaces/BLSNode.md)[]\> + +*** + +### packCumulativeT2Signature() + +> **packCumulativeT2Signature**(`data`): `string` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L88) + +Pack cumulative Tier 2 signature (algId 0x04): P256 + BLS. + +Format: + [algId=0x04 (1)] [P256 r (32)] [P256 s (32)] + [nodeIdsLength (32)] [nodeIds (N×32)] + [blsAggregateSig (256)] [messagePoint (256)] + [messagePointECDSA (65)] + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | [`CumulativeT2SignatureData`](../interfaces/CumulativeT2SignatureData.md) | + +#### Returns + +`string` + +*** + +### packCumulativeT3Signature() + +> **packCumulativeT3Signature**(`data`): `string` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L102) + +Pack cumulative Tier 3 signature (algId 0x05): P256 + BLS + Guardian. + +Format: + [algId=0x05 (1)] [P256 r (32)] [P256 s (32)] + [nodeIdsLength (32)] [nodeIds (N×32)] + [blsAggregateSig (256)] [messagePoint (256)] + [messagePointECDSA (65)] [guardianECDSA (65)] + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | [`CumulativeT3SignatureData`](../interfaces/CumulativeT3SignatureData.md) | + +#### Returns + +`string` + +*** + +### packSignature() + +> **packSignature**(`data`): `string` + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L66) + +Helper to pack the full signature for ERC-4337 UserOp +Format: [nodeIdsLength][nodeIds...][blsSignature][messagePoint][aaSignature][messagePointSignature] + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | [`BLSSignatureData`](../interfaces/BLSSignatureData.md) | + +#### Returns + +`string` + +*** + +### requestNodeSignature() + +> **requestNodeSignature**(`node`, `message`): `Promise`\<\{ `publicKey`: `string`; `signature`: `string`; \}\> + +Defined in: [packages/airaccount/src/core/bls/bls.manager.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/bls.manager.ts#L110) + +Request signature from a single node + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `node` | [`BLSNode`](../interfaces/BLSNode.md) | +| `message` | `string` | + +#### Returns + +`Promise`\<\{ `publicKey`: `string`; `signature`: `string`; \}\> diff --git a/api/@aastar/sdk/namespaces/KMS/classes/CryptoUtil.md b/api/@aastar/sdk/namespaces/KMS/classes/CryptoUtil.md new file mode 100644 index 000000000..c37ce0613 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/classes/CryptoUtil.md @@ -0,0 +1,61 @@ +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L3) + +## Constructors + +### Constructor + +> **new CryptoUtil**(): `CryptoUtil` + +#### Returns + +`CryptoUtil` + +## Methods + +### decrypt() + +> `static` **decrypt**(`encryptedData`, `secretKey`): `string` + +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L28) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `encryptedData` | `string` | +| `secretKey` | `string` | + +#### Returns + +`string` + +*** + +### encrypt() + +> `static` **encrypt**(`text`, `secretKey`): `string` + +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `text` | `string` | +| `secretKey` | `string` | + +#### Returns + +`string` + +*** + +### generateSecretKey() + +> `static` **generateSecretKey**(): `string` + +Defined in: [packages/airaccount/src/core/crypto/crypto.util.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/crypto/crypto.util.ts#L53) + +#### Returns + +`string` diff --git a/api/@aastar/sdk/namespaces/KMS/classes/ERC4337Utils.md b/api/@aastar/sdk/namespaces/KMS/classes/ERC4337Utils.md new file mode 100644 index 000000000..140fd6bbe --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/classes/ERC4337Utils.md @@ -0,0 +1,137 @@ +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L3) + +## Constructors + +### Constructor + +> **new ERC4337Utils**(): `ERC4337Utils` + +#### Returns + +`ERC4337Utils` + +## Methods + +### packAccountGasLimits() + +> `static` **packAccountGasLimits**(`verificationGasLimit`, `callGasLimit`): `string` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L4) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `verificationGasLimit` | `string` \| `bigint` | +| `callGasLimit` | `string` \| `bigint` | + +#### Returns + +`string` + +*** + +### packGasFees() + +> `static` **packGasFees**(`maxPriorityFeePerGas`, `maxFeePerGas`): `string` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `maxPriorityFeePerGas` | `string` \| `bigint` | +| `maxFeePerGas` | `string` \| `bigint` | + +#### Returns + +`string` + +*** + +### packUserOperation() + +> `static` **packUserOperation**(`userOp`): [`PackedUserOperation`](../interfaces/PackedUserOperation.md) + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `any` | + +#### Returns + +[`PackedUserOperation`](../interfaces/PackedUserOperation.md) + +*** + +### unpackAccountGasLimits() + +> `static` **unpackAccountGasLimits**(`accountGasLimits`): `object` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountGasLimits` | `string` | + +#### Returns + +`object` + +##### callGasLimit + +> **callGasLimit**: `bigint` + +##### verificationGasLimit + +> **verificationGasLimit**: `bigint` + +*** + +### unpackGasFees() + +> `static` **unpackGasFees**(`gasFees`): `object` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `gasFees` | `string` | + +#### Returns + +`object` + +##### maxFeePerGas + +> **maxFeePerGas**: `bigint` + +##### maxPriorityFeePerGas + +> **maxPriorityFeePerGas**: `bigint` + +*** + +### unpackUserOperation() + +> `static` **unpackUserOperation**(`packedOp`): `any` + +Defined in: [packages/airaccount/src/core/erc4337/utils.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/utils.ts#L60) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `packedOp` | [`PackedUserOperation`](../interfaces/PackedUserOperation.md) | + +#### Returns + +`any` diff --git a/api/@aastar/sdk/namespaces/KMS/classes/PasskeyManager.md b/api/@aastar/sdk/namespaces/KMS/classes/PasskeyManager.md new file mode 100644 index 000000000..7fa8c4d2f --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/classes/PasskeyManager.md @@ -0,0 +1,104 @@ +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L51) + +## Constructors + +### Constructor + +> **new PasskeyManager**(`baseURL`, `tokenProvider?`, `routes?`): `PasskeyManager` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `baseURL` | `string` | +| `tokenProvider?` | () => `string` \| `null` | +| `routes?` | `Partial`\<[`PasskeyRoutes`](../interfaces/PasskeyRoutes.md)\> | + +#### Returns + +`PasskeyManager` + +## Methods + +### addDevice() + +> **addDevice**(`params`): `Promise`\<[`PasskeyInfo`](../interfaces/PasskeyInfo.md)\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L161) + +Add a new device (Passkey) to existing account + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `email`: `string`; `password?`: `string`; \} | +| `params.email` | `string` | +| `params.password?` | `string` | + +#### Returns + +`Promise`\<[`PasskeyInfo`](../interfaces/PasskeyInfo.md)\> + +*** + +### authenticate() + +> **authenticate**(`params?`): `Promise`\<\{ `token`: `string`; `user`: `any`; \}\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L113) + +Complete Passkey Login/Authentication Flow + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params?` | [`PasskeyAuthenticationParams`](../interfaces/PasskeyAuthenticationParams.md) | + +#### Returns + +`Promise`\<\{ `token`: `string`; `user`: `any`; \}\> + +*** + +### register() + +> **register**(`params`): `Promise`\<\{ `passkey`: [`PasskeyInfo`](../interfaces/PasskeyInfo.md); `token`: `string`; `user`: `any`; \}\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L86) + +Complete Passkey Registration Flow + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`PasskeyRegistrationParams`](../interfaces/PasskeyRegistrationParams.md) | + +#### Returns + +`Promise`\<\{ `passkey`: [`PasskeyInfo`](../interfaces/PasskeyInfo.md); `token`: `string`; `user`: `any`; \}\> + +*** + +### verifyTransaction() + +> **verifyTransaction**(`params`): `Promise`\<`any`\> + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L133) + +Verify a transaction (Sign UserOpHash) with Passkey +Returns the verification credential needed for the transaction + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`TransactionVerificationParams`](../interfaces/TransactionVerificationParams.md) | + +#### Returns + +`Promise`\<`any`\> diff --git a/api/@aastar/sdk/namespaces/KMS/classes/UserOpBuilder.md b/api/@aastar/sdk/namespaces/KMS/classes/UserOpBuilder.md new file mode 100644 index 000000000..72f7f263c --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/classes/UserOpBuilder.md @@ -0,0 +1,69 @@ +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L6) + +## Constructors + +### Constructor + +> **new UserOpBuilder**(): `UserOpBuilder` + +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L13) + +#### Returns + +`UserOpBuilder` + +## Methods + +### buildUserOp() + +> **buildUserOp**(`params`): `Promise`\<[`UserOperation`](../interfaces/UserOperation.md)\> + +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L21) + +Build specific parts of a UserOperation +Note: Full construction often requires chain interaction (nonce, gas price), +which typically happens in the application layer or via a Provider wrapper. +This builder focuses on formatting and structure. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `callData`: `string`; `callGasLimit?`: `bigint`; `initCode?`: `string`; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `nonce?`: `bigint`; `paymasterAndData?`: `string`; `preVerificationGas?`: `bigint`; `sender`: `string`; `signature?`: `string`; `verificationGasLimit?`: `bigint`; \} | +| `params.callData` | `string` | +| `params.callGasLimit?` | `bigint` | +| `params.initCode?` | `string` | +| `params.maxFeePerGas?` | `bigint` | +| `params.maxPriorityFeePerGas?` | `bigint` | +| `params.nonce?` | `bigint` | +| `params.paymasterAndData?` | `string` | +| `params.preVerificationGas?` | `bigint` | +| `params.sender` | `string` | +| `params.signature?` | `string` | +| `params.verificationGasLimit?` | `bigint` | + +#### Returns + +`Promise`\<[`UserOperation`](../interfaces/UserOperation.md)\> + +*** + +### getUserOpHash() + +> **getUserOpHash**(`userOp`, `entryPoint`, `chainId`): `string` + +Defined in: [packages/airaccount/src/core/erc4337/userop.builder.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/erc4337/userop.builder.ts#L54) + +Hash the UserOperation for signing (ERC-4337 v0.7) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | [`PackedUserOperation`](../interfaces/PackedUserOperation.md) | +| `entryPoint` | `string` | +| `chainId` | `number` | + +#### Returns + +`string` diff --git a/api/@aastar/sdk/namespaces/KMS/functions/algIdForTier.md b/api/@aastar/sdk/namespaces/KMS/functions/algIdForTier.md new file mode 100644 index 000000000..906f4a4df --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/functions/algIdForTier.md @@ -0,0 +1,19 @@ +> **algIdForTier**(`tier`): [`AlgId`](../type-aliases/AlgId.md) + +Defined in: [packages/airaccount/src/core/tier/tier-router.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/tier-router.ts#L33) + +Get the algorithm ID to use for a given tier. + +- Tier 1: ALG_ECDSA (0x02) — raw 65-byte ECDSA, no prefix needed +- Tier 2: ALG_CUMULATIVE_T2 (0x04) — P256 + BLS +- Tier 3: ALG_CUMULATIVE_T3 (0x05) — P256 + BLS + Guardian + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `tier` | [`TierLevel`](../type-aliases/TierLevel.md) | + +## Returns + +[`AlgId`](../type-aliases/AlgId.md) diff --git a/api/@aastar/sdk/namespaces/KMS/functions/resolveTier.md b/api/@aastar/sdk/namespaces/KMS/functions/resolveTier.md new file mode 100644 index 000000000..25d61f31b --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/functions/resolveTier.md @@ -0,0 +1,22 @@ +> **resolveTier**(`value`, `config`): [`TierLevel`](../type-aliases/TierLevel.md) + +Defined in: [packages/airaccount/src/core/tier/tier-router.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/tier-router.ts#L19) + +Determine the required tier for a given transaction value. + +- Tier 1: value <= tier1Limit — single ECDSA or P256 passkey +- Tier 2: tier1Limit < value <= tier2Limit — P256 + BLS aggregate +- Tier 3: value > tier2Limit — P256 + BLS + Guardian ECDSA + +If both limits are 0 (no enforcement), always returns Tier 1. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `value` | `bigint` | +| `config` | [`TierConfig`](../interfaces/TierConfig.md) | + +## Returns + +[`TierLevel`](../type-aliases/TierLevel.md) diff --git a/api/@aastar/sdk/namespaces/KMS/index.md b/api/@aastar/sdk/namespaces/KMS/index.md new file mode 100644 index 000000000..66f469e5f --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/index.md @@ -0,0 +1,52 @@ +## Classes + +- [AirAccountClient](classes/AirAccountClient.md) +- [BLSManager](classes/BLSManager.md) +- [CryptoUtil](classes/CryptoUtil.md) +- [ERC4337Utils](classes/ERC4337Utils.md) +- [PasskeyManager](classes/PasskeyManager.md) +- [UserOpBuilder](classes/UserOpBuilder.md) + +## Interfaces + +- [AirAccountConfig](interfaces/AirAccountConfig.md) +- [BeginAuthenticationResponse](interfaces/BeginAuthenticationResponse.md) +- [BeginRegistrationResponse](interfaces/BeginRegistrationResponse.md) +- [BeginTransactionVerificationResponse](interfaces/BeginTransactionVerificationResponse.md) +- [BLSConfig](interfaces/BLSConfig.md) +- [BLSNode](interfaces/BLSNode.md) +- [BLSSignatureData](interfaces/BLSSignatureData.md) +- [CumulativeT2SignatureData](interfaces/CumulativeT2SignatureData.md) +- [CumulativeT3SignatureData](interfaces/CumulativeT3SignatureData.md) +- [GasEstimate](interfaces/GasEstimate.md) +- [GuardStatus](interfaces/GuardStatus.md) +- [PackedUserOperation](interfaces/PackedUserOperation.md) +- [PasskeyAuthenticationParams](interfaces/PasskeyAuthenticationParams.md) +- [PasskeyInfo](interfaces/PasskeyInfo.md) +- [PasskeyRegistrationParams](interfaces/PasskeyRegistrationParams.md) +- [PasskeyRoutes](interfaces/PasskeyRoutes.md) +- [PreCheckResult](interfaces/PreCheckResult.md) +- [TierConfig](interfaces/TierConfig.md) +- [TransactionVerificationParams](interfaces/TransactionVerificationParams.md) +- [UserOperation](interfaces/UserOperation.md) + +## Type Aliases + +- [AlgId](type-aliases/AlgId.md) +- [TierLevel](type-aliases/TierLevel.md) +- [~~YAAAConfig~~](type-aliases/YAAAConfig.md) + +## Variables + +- [ALG\_BLS](variables/ALG_BLS.md) +- [ALG\_CUMULATIVE\_T2](variables/ALG_CUMULATIVE_T2.md) +- [ALG\_CUMULATIVE\_T3](variables/ALG_CUMULATIVE_T3.md) +- [ALG\_ECDSA](variables/ALG_ECDSA.md) +- [ALG\_P256](variables/ALG_P256.md) +- [DEFAULT\_PASSKEY\_ROUTES](variables/DEFAULT_PASSKEY_ROUTES.md) +- [~~YAAAClient~~](variables/YAAAClient.md) + +## Functions + +- [algIdForTier](functions/algIdForTier.md) +- [resolveTier](functions/resolveTier.md) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/AirAccountConfig.md b/api/@aastar/sdk/namespaces/KMS/interfaces/AirAccountConfig.md new file mode 100644 index 000000000..9b8f20dd1 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/AirAccountConfig.md @@ -0,0 +1,54 @@ +Defined in: [packages/airaccount/src/client.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L5) + +## Properties + +### apiURL + +> **apiURL**: `string` + +Defined in: [packages/airaccount/src/client.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L14) + +Backend RP (relying party) API URL — required, no default. + +AAStar's official hosted RP will be `https://auth.aastar.io` (served by +aNode, see AAStarCommunity/YetAnotherAA-Validator#81). You can also point +this at your own backend implementing the standardized passkey contract +(see `@aastar/passkey-server` / [PasskeyRoutes](PasskeyRoutes.md)). + +*** + +### bls + +> **bls**: [`BLSConfig`](BLSConfig.md) + +Defined in: [packages/airaccount/src/client.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L26) + +BLS Configuration + +*** + +### passkeyRoutes? + +> `optional` **passkeyRoutes**: `Partial`\<[`PasskeyRoutes`](PasskeyRoutes.md)\> + +Defined in: [packages/airaccount/src/client.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L24) + +Optional overrides for the passkey backend route paths. + +Defaults to the standardized `@aastar/passkey-server` contract +(`/auth/passkey/*`). Override individual paths to point at a backend that +exposes different routes without changing SDK code. + +*** + +### tokenProvider()? + +> `optional` **tokenProvider**: () => `string` \| `null` + +Defined in: [packages/airaccount/src/client.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L16) + +Function to get the current auth token (JWT) + +#### Returns + +`string` \| `null` diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/BLSConfig.md b/api/@aastar/sdk/namespaces/KMS/interfaces/BLSConfig.md new file mode 100644 index 000000000..32c3ed3d6 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/BLSConfig.md @@ -0,0 +1,17 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L23) + +## Properties + +### discoveryTimeout? + +> `optional` **discoveryTimeout**: `number` + +Defined in: [packages/airaccount/src/core/bls/types.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L25) + +*** + +### seedNodes + +> **seedNodes**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L24) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/BLSNode.md b/api/@aastar/sdk/namespaces/KMS/interfaces/BLSNode.md new file mode 100644 index 000000000..fdd830ce8 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/BLSNode.md @@ -0,0 +1,57 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:1](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L1) + +## Properties + +### apiEndpoint + +> **apiEndpoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L5) + +*** + +### index? + +> `optional` **index**: `number` + +Defined in: [packages/airaccount/src/core/bls/types.ts:2](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L2) + +*** + +### lastSeen? + +> `optional` **lastSeen**: `Date` + +Defined in: [packages/airaccount/src/core/bls/types.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L8) + +*** + +### nodeId + +> **nodeId**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L3) + +*** + +### nodeName + +> **nodeName**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L4) + +*** + +### publicKey? + +> `optional` **publicKey**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L7) + +*** + +### status + +> **status**: `"active"` \| `"inactive"` + +Defined in: [packages/airaccount/src/core/bls/types.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L6) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/BLSSignatureData.md b/api/@aastar/sdk/namespaces/KMS/interfaces/BLSSignatureData.md new file mode 100644 index 000000000..36b1ae867 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/BLSSignatureData.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L11) + +## Properties + +### aaAddress + +> **aaAddress**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L17) + +*** + +### aaSignature + +> **aaSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L18) + +*** + +### aggregatedSignature? + +> `optional` **aggregatedSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L20) + +*** + +### messagePoint + +> **messagePoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L16) + +*** + +### messagePointSignature + +> **messagePointSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L19) + +*** + +### nodeIds + +> **nodeIds**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L12) + +*** + +### publicKeys? + +> `optional` **publicKeys**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L14) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L15) + +*** + +### signatures? + +> `optional` **signatures**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L13) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/BeginAuthenticationResponse.md b/api/@aastar/sdk/namespaces/KMS/interfaces/BeginAuthenticationResponse.md new file mode 100644 index 000000000..5d4040151 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/BeginAuthenticationResponse.md @@ -0,0 +1,45 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L36) + +## Extended by + +- [`BeginTransactionVerificationResponse`](BeginTransactionVerificationResponse.md) + +## Properties + +### allowCredentials? + +> `optional` **allowCredentials**: `any`[] + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L40) + +*** + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L37) + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L39) + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L38) + +*** + +### userVerification? + +> `optional` **userVerification**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L41) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/BeginRegistrationResponse.md b/api/@aastar/sdk/namespaces/KMS/interfaces/BeginRegistrationResponse.md new file mode 100644 index 000000000..f17447bda --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/BeginRegistrationResponse.md @@ -0,0 +1,77 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L26) + +## Properties + +### attestation? + +> `optional` **attestation**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L33) + +*** + +### authenticatorSelection? + +> `optional` **authenticatorSelection**: `any` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L32) + +*** + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L27) + +*** + +### pubKeyCredParams + +> **pubKeyCredParams**: `any`[] + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L30) + +*** + +### rp + +> **rp**: `object` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L28) + +#### id + +> **id**: `string` + +#### name + +> **name**: `string` + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L31) + +*** + +### user + +> **user**: `object` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L29) + +#### displayName + +> **displayName**: `string` + +#### id + +> **id**: `string` + +#### name + +> **name**: `string` diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/BeginTransactionVerificationResponse.md b/api/@aastar/sdk/namespaces/KMS/interfaces/BeginTransactionVerificationResponse.md new file mode 100644 index 000000000..bba20d87f --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/BeginTransactionVerificationResponse.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L44) + +## Extends + +- [`BeginAuthenticationResponse`](BeginAuthenticationResponse.md) + +## Properties + +### allowCredentials? + +> `optional` **allowCredentials**: `any`[] + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L40) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`allowCredentials`](BeginAuthenticationResponse.md#allowcredentials) + +*** + +### challenge + +> **challenge**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L37) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`challenge`](BeginAuthenticationResponse.md#challenge) + +*** + +### rpId? + +> `optional` **rpId**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L39) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`rpId`](BeginAuthenticationResponse.md#rpid) + +*** + +### timeout? + +> `optional` **timeout**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L38) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`timeout`](BeginAuthenticationResponse.md#timeout) + +*** + +### userOpHash + +> **userOpHash**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L45) + +*** + +### userVerification? + +> `optional` **userVerification**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L41) + +#### Inherited from + +[`BeginAuthenticationResponse`](BeginAuthenticationResponse.md).[`userVerification`](BeginAuthenticationResponse.md#userverification) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT2SignatureData.md b/api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT2SignatureData.md new file mode 100644 index 000000000..d661b0057 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT2SignatureData.md @@ -0,0 +1,47 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L33) + +Data for cumulative Tier 2 signature (algId 0x04): P256 + BLS. + +## Extended by + +- [`CumulativeT3SignatureData`](CumulativeT3SignatureData.md) + +## Properties + +### blsSignature + +> **blsSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L36) + +*** + +### messagePoint + +> **messagePoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L37) + +*** + +### messagePointSignature + +> **messagePointSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L38) + +*** + +### nodeIds + +> **nodeIds**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L35) + +*** + +### p256Signature + +> **p256Signature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L34) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT3SignatureData.md b/api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT3SignatureData.md new file mode 100644 index 000000000..9f3827316 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/CumulativeT3SignatureData.md @@ -0,0 +1,75 @@ +Defined in: [packages/airaccount/src/core/bls/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L44) + +Data for cumulative Tier 3 signature (algId 0x05): P256 + BLS + Guardian. + +## Extends + +- [`CumulativeT2SignatureData`](CumulativeT2SignatureData.md) + +## Properties + +### blsSignature + +> **blsSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L36) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`blsSignature`](CumulativeT2SignatureData.md#blssignature) + +*** + +### guardianSignature + +> **guardianSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L45) + +*** + +### messagePoint + +> **messagePoint**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L37) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`messagePoint`](CumulativeT2SignatureData.md#messagepoint) + +*** + +### messagePointSignature + +> **messagePointSignature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L38) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`messagePointSignature`](CumulativeT2SignatureData.md#messagepointsignature) + +*** + +### nodeIds + +> **nodeIds**: `string`[] + +Defined in: [packages/airaccount/src/core/bls/types.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L35) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`nodeIds`](CumulativeT2SignatureData.md#nodeids) + +*** + +### p256Signature + +> **p256Signature**: `string` + +Defined in: [packages/airaccount/src/core/bls/types.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/bls/types.ts#L34) + +#### Inherited from + +[`CumulativeT2SignatureData`](CumulativeT2SignatureData.md).[`p256Signature`](CumulativeT2SignatureData.md#p256signature) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/GasEstimate.md b/api/@aastar/sdk/namespaces/KMS/interfaces/GasEstimate.md new file mode 100644 index 000000000..bcdaf0079 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/GasEstimate.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/core/types/index.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L27) + +## Properties + +### callGasLimit + +> **callGasLimit**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L28) + +*** + +### preVerificationGas + +> **preVerificationGas**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L30) + +*** + +### verificationGasLimit + +> **verificationGasLimit**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L29) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/GuardStatus.md b/api/@aastar/sdk/namespaces/KMS/interfaces/GuardStatus.md new file mode 100644 index 000000000..8deef62af --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/GuardStatus.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/core/tier/types.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L29) + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L32) + +*** + +### dailyRemaining + +> **dailyRemaining**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L33) + +*** + +### guardAddress + +> **guardAddress**: `string` + +Defined in: [packages/airaccount/src/core/tier/types.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L31) + +*** + +### hasGuard + +> **hasGuard**: `boolean` + +Defined in: [packages/airaccount/src/core/tier/types.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L30) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/PackedUserOperation.md b/api/@aastar/sdk/namespaces/KMS/interfaces/PackedUserOperation.md new file mode 100644 index 000000000..0545b07f2 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/PackedUserOperation.md @@ -0,0 +1,73 @@ +Defined in: [packages/airaccount/src/core/types/index.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L15) + +## Properties + +### accountGasLimits + +> **accountGasLimits**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L20) + +*** + +### callData + +> **callData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L19) + +*** + +### gasFees + +> **gasFees**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L22) + +*** + +### initCode + +> **initCode**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L18) + +*** + +### nonce + +> **nonce**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L17) + +*** + +### paymasterAndData + +> **paymasterAndData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L23) + +*** + +### preVerificationGas + +> **preVerificationGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L21) + +*** + +### sender + +> **sender**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L16) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L24) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyAuthenticationParams.md b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyAuthenticationParams.md new file mode 100644 index 000000000..fd097e810 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyAuthenticationParams.md @@ -0,0 +1,9 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L7) + +## Properties + +### email? + +> `optional` **email**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L8) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyInfo.md b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyInfo.md new file mode 100644 index 000000000..f0dc5f552 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyInfo.md @@ -0,0 +1,41 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L17) + +## Properties + +### counter + +> **counter**: `number` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L20) + +*** + +### createdAt + +> **createdAt**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L22) + +*** + +### credentialId + +> **credentialId**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L18) + +*** + +### deviceType + +> **deviceType**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L21) + +*** + +### publicKey + +> **publicKey**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L19) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRegistrationParams.md b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRegistrationParams.md new file mode 100644 index 000000000..7ddde475c --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRegistrationParams.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:1](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L1) + +## Properties + +### email + +> **email**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:2](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L2) + +*** + +### password? + +> `optional` **password**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L4) + +*** + +### username + +> **username**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L3) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRoutes.md b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRoutes.md new file mode 100644 index 000000000..43b41892a --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/PasskeyRoutes.md @@ -0,0 +1,78 @@ +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L21) + +Configurable backend routes for the passkey (WebAuthn) flows. + +These default paths are the standardized contract served by AAStar's +`@aastar/passkey-server` (any compatible RP exposing the same endpoints). +They are NOT specific to any single backend. Consumers pointing at a +different backend can override individual paths without changing code. + +## Properties + +### deviceBegin + +> **deviceBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L31) + +POST — begin adding a new device (passkey). Default: `/auth/device/passkey/begin` + +*** + +### deviceComplete + +> **deviceComplete**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L33) + +POST — complete adding a new device (passkey). Default: `/auth/device/passkey/complete` + +*** + +### loginBegin + +> **loginBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L27) + +POST — begin passkey login/authentication. Default: `/auth/passkey/login/begin` + +*** + +### loginComplete + +> **loginComplete**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L29) + +POST — complete passkey login/authentication. Default: `/auth/passkey/login/complete` + +*** + +### registerBegin + +> **registerBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L23) + +POST — begin passkey registration. Default: `/auth/passkey/register/begin` + +*** + +### registerComplete + +> **registerComplete**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L25) + +POST — complete passkey registration. Default: `/auth/passkey/register/complete` + +*** + +### transactionVerifyBegin + +> **transactionVerifyBegin**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L35) + +POST — begin transaction verification. Default: `/auth/transaction/verify/begin` diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/PreCheckResult.md b/api/@aastar/sdk/namespaces/KMS/interfaces/PreCheckResult.md new file mode 100644 index 000000000..ae80bc10c --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/PreCheckResult.md @@ -0,0 +1,33 @@ +Defined in: [packages/airaccount/src/core/tier/types.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L38) + +## Properties + +### algId + +> **algId**: [`AlgId`](../type-aliases/AlgId.md) + +Defined in: [packages/airaccount/src/core/tier/types.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L42) + +*** + +### errors + +> **errors**: `string`[] + +Defined in: [packages/airaccount/src/core/tier/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L40) + +*** + +### ok + +> **ok**: `boolean` + +Defined in: [packages/airaccount/src/core/tier/types.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L39) + +*** + +### tier + +> **tier**: [`TierLevel`](../type-aliases/TierLevel.md) + +Defined in: [packages/airaccount/src/core/tier/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L41) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/TierConfig.md b/api/@aastar/sdk/namespaces/KMS/interfaces/TierConfig.md new file mode 100644 index 000000000..12dacfca5 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/TierConfig.md @@ -0,0 +1,21 @@ +Defined in: [packages/airaccount/src/core/tier/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L20) + +## Properties + +### tier1Limit + +> **tier1Limit**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L22) + +Max value for Tier 1 (single ECDSA/Passkey). 0 = no enforcement. + +*** + +### tier2Limit + +> **tier2Limit**: `bigint` + +Defined in: [packages/airaccount/src/core/tier/types.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L24) + +Max value for Tier 2 (P256 + BLS). 0 = no enforcement. diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/TransactionVerificationParams.md b/api/@aastar/sdk/namespaces/KMS/interfaces/TransactionVerificationParams.md new file mode 100644 index 000000000..c6e425a27 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/TransactionVerificationParams.md @@ -0,0 +1,25 @@ +Defined in: [packages/airaccount/src/auth/passkey/types.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L11) + +## Properties + +### data? + +> `optional` **data**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L14) + +*** + +### to + +> **to**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L12) + +*** + +### value? + +> `optional` **value**: `string` + +Defined in: [packages/airaccount/src/auth/passkey/types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/types.ts#L13) diff --git a/api/@aastar/sdk/namespaces/KMS/interfaces/UserOperation.md b/api/@aastar/sdk/namespaces/KMS/interfaces/UserOperation.md new file mode 100644 index 000000000..60ea9cd64 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/interfaces/UserOperation.md @@ -0,0 +1,89 @@ +Defined in: [packages/airaccount/src/core/types/index.ts:1](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L1) + +## Properties + +### callData + +> **callData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L5) + +*** + +### callGasLimit + +> **callGasLimit**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L6) + +*** + +### initCode + +> **initCode**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L4) + +*** + +### maxFeePerGas + +> **maxFeePerGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L9) + +*** + +### maxPriorityFeePerGas + +> **maxPriorityFeePerGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L10) + +*** + +### nonce + +> **nonce**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L3) + +*** + +### paymasterAndData + +> **paymasterAndData**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L11) + +*** + +### preVerificationGas + +> **preVerificationGas**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L8) + +*** + +### sender + +> **sender**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:2](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L2) + +*** + +### signature + +> **signature**: `string` + +Defined in: [packages/airaccount/src/core/types/index.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L12) + +*** + +### verificationGasLimit + +> **verificationGasLimit**: `string` \| `bigint` + +Defined in: [packages/airaccount/src/core/types/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/types/index.ts#L7) diff --git a/api/@aastar/sdk/namespaces/KMS/type-aliases/AlgId.md b/api/@aastar/sdk/namespaces/KMS/type-aliases/AlgId.md new file mode 100644 index 000000000..b4fd66c4c --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/type-aliases/AlgId.md @@ -0,0 +1,3 @@ +> **AlgId** = *typeof* [`ALG_BLS`](../variables/ALG_BLS.md) \| *typeof* [`ALG_ECDSA`](../variables/ALG_ECDSA.md) \| *typeof* [`ALG_P256`](../variables/ALG_P256.md) \| *typeof* [`ALG_CUMULATIVE_T2`](../variables/ALG_CUMULATIVE_T2.md) \| *typeof* [`ALG_CUMULATIVE_T3`](../variables/ALG_CUMULATIVE_T3.md) + +Defined in: [packages/airaccount/src/core/tier/types.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L9) diff --git a/api/@aastar/sdk/namespaces/KMS/type-aliases/TierLevel.md b/api/@aastar/sdk/namespaces/KMS/type-aliases/TierLevel.md new file mode 100644 index 000000000..caae47623 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/type-aliases/TierLevel.md @@ -0,0 +1,3 @@ +> **TierLevel** = `1` \| `2` \| `3` + +Defined in: [packages/airaccount/src/core/tier/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L18) diff --git a/api/@aastar/sdk/namespaces/KMS/type-aliases/YAAAConfig.md b/api/@aastar/sdk/namespaces/KMS/type-aliases/YAAAConfig.md new file mode 100644 index 000000000..35e9da496 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/type-aliases/YAAAConfig.md @@ -0,0 +1,8 @@ +> **YAAAConfig** = [`AirAccountConfig`](../interfaces/AirAccountConfig.md) + +Defined in: [packages/airaccount/src/client.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L48) + +## Deprecated + +Renamed to [AirAccountConfig](../interfaces/AirAccountConfig.md). This alias is kept for +backward compatibility and will be removed in a future major version. diff --git a/api/@aastar/sdk/namespaces/KMS/variables/ALG_BLS.md b/api/@aastar/sdk/namespaces/KMS/variables/ALG_BLS.md new file mode 100644 index 000000000..8bfb445c8 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/ALG_BLS.md @@ -0,0 +1,3 @@ +> `const` **ALG\_BLS**: `1` = `0x01` + +Defined in: [packages/airaccount/src/core/tier/types.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L3) diff --git a/api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T2.md b/api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T2.md new file mode 100644 index 000000000..c3d012bc5 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T2.md @@ -0,0 +1,3 @@ +> `const` **ALG\_CUMULATIVE\_T2**: `4` = `0x04` + +Defined in: [packages/airaccount/src/core/tier/types.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L6) diff --git a/api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T3.md b/api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T3.md new file mode 100644 index 000000000..1d748d91f --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/ALG_CUMULATIVE_T3.md @@ -0,0 +1,3 @@ +> `const` **ALG\_CUMULATIVE\_T3**: `5` = `0x05` + +Defined in: [packages/airaccount/src/core/tier/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L7) diff --git a/api/@aastar/sdk/namespaces/KMS/variables/ALG_ECDSA.md b/api/@aastar/sdk/namespaces/KMS/variables/ALG_ECDSA.md new file mode 100644 index 000000000..15cc94d6a --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/ALG_ECDSA.md @@ -0,0 +1,3 @@ +> `const` **ALG\_ECDSA**: `2` = `0x02` + +Defined in: [packages/airaccount/src/core/tier/types.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L4) diff --git a/api/@aastar/sdk/namespaces/KMS/variables/ALG_P256.md b/api/@aastar/sdk/namespaces/KMS/variables/ALG_P256.md new file mode 100644 index 000000000..791b4a910 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/ALG_P256.md @@ -0,0 +1,3 @@ +> `const` **ALG\_P256**: `3` = `0x03` + +Defined in: [packages/airaccount/src/core/tier/types.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/core/tier/types.ts#L5) diff --git a/api/@aastar/sdk/namespaces/KMS/variables/DEFAULT_PASSKEY_ROUTES.md b/api/@aastar/sdk/namespaces/KMS/variables/DEFAULT_PASSKEY_ROUTES.md new file mode 100644 index 000000000..392388865 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/DEFAULT_PASSKEY_ROUTES.md @@ -0,0 +1,5 @@ +> `const` **DEFAULT\_PASSKEY\_ROUTES**: [`PasskeyRoutes`](../interfaces/PasskeyRoutes.md) + +Defined in: [packages/airaccount/src/auth/passkey/passkey.manager.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/auth/passkey/passkey.manager.ts#L41) + +Default passkey routes — the standardized `@aastar/passkey-server` contract. diff --git a/api/@aastar/sdk/namespaces/KMS/variables/YAAAClient.md b/api/@aastar/sdk/namespaces/KMS/variables/YAAAClient.md new file mode 100644 index 000000000..8ad2efcb1 --- /dev/null +++ b/api/@aastar/sdk/namespaces/KMS/variables/YAAAClient.md @@ -0,0 +1,8 @@ +> `const` **YAAAClient**: *typeof* [`AirAccountClient`](../classes/AirAccountClient.md) = `AirAccountClient` + +Defined in: [packages/airaccount/src/client.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/airaccount/src/client.ts#L54) + +## Deprecated + +Renamed to [AirAccountClient](../classes/AirAccountClient.md). This alias is kept for +backward compatibility and will be removed in a future major version. diff --git a/api/@aastar/sdk/type-aliases/AccountActions.md b/api/@aastar/sdk/type-aliases/AccountActions.md new file mode 100644 index 000000000..509b5047e --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AccountActions.md @@ -0,0 +1,135 @@ +> **AccountActions** = `object` + +Defined in: [packages/core/src/actions/account.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L7) + +## Properties + +### addDeposit() + +> **addDeposit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/account.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### entryPoint() + +> **entryPoint**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/account.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L11) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### execute() + +> **execute**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/account.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L8) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `dest`: `Address`; `func`: [`Hex`](https://viem.sh/docs/index.html); `value`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.dest` | `Address` | +| `args.func` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.value` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeBatch() + +> **executeBatch**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/account.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `dest`: `Address`[]; `func`: [`Hex`](https://viem.sh/docs/index.html)[]; `value`: `bigint`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.dest` | `Address`[] | +| `args.func` | [`Hex`](https://viem.sh/docs/index.html)[] | +| `args.value` | `bigint`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getDeposit() + +> **getDeposit**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/account.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L14) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getNonce() + +> **getNonce**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/account.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L10) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/account.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L15) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### withdrawDepositTo() + +> **withdrawDepositTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/account.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `withdrawAddress`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.withdrawAddress` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/AccountFactoryActions.md b/api/@aastar/sdk/type-aliases/AccountFactoryActions.md new file mode 100644 index 000000000..53ffed702 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AccountFactoryActions.md @@ -0,0 +1,45 @@ +> **AccountFactoryActions** = `object` + +Defined in: [packages/core/src/actions/account.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L19) + +## Properties + +### createAccount() + +> **createAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/account.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L20) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `gas?`: `bigint`; `owner`: `Address`; `salt`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.gas?` | `bigint` | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getAddress() + +> **getAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/account.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/account.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; `salt`: `bigint`; \} | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> diff --git a/api/@aastar/sdk/type-aliases/AdminClient.md b/api/@aastar/sdk/type-aliases/AdminClient.md new file mode 100644 index 000000000..9814ffb61 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AdminClient.md @@ -0,0 +1,3 @@ +> **AdminClient** = [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`RegistryActions`](RegistryActions.md) & [`SuperPaymasterActions`](SuperPaymasterActions.md) & [`PaymasterActions`](PaymasterActions.md) & [`StakingActions`](StakingActions.md) & [`SBTActions`](SBTActions.md) & [`DVTActions`](DVTActions.md) & [`XPNTsFactoryActions`](XPNTsFactoryActions.md) & [`AggregatorActions`](AggregatorActions.md) + +Defined in: [packages/sdk/src/clients/admin.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/admin.ts#L27) diff --git a/api/@aastar/sdk/type-aliases/AgentActions.md b/api/@aastar/sdk/type-aliases/AgentActions.md new file mode 100644 index 000000000..6ee6fa2ff --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AgentActions.md @@ -0,0 +1,158 @@ +> **AgentActions** = `object` + +Defined in: [packages/core/src/actions/agent.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L12) + +## Properties + +### agentIdentityRegistry() + +> **agentIdentityRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agent.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L18) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~agentPolicies()~~ + +> **agentPolicies**: (`args`) => `Promise`\<[`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)\> + +Defined in: [packages/core/src/actions/agent.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `operator`: `Address`; \} | +| `args.index` | `bigint` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)\> + +#### Deprecated + +Removed in the v5.x contract refactor — per-operator agent policies are no longer stored on-chain (no `agentPolicies` in the SuperPaymaster ABI). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### agentReputationRegistry() + +> **agentReputationRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agent.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L19) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~getAgentSponsorshipRate()~~ + +> **getAgentSponsorshipRate**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/agent.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agent`: `Address`; `operator`: `Address`; \} | +| `args.agent` | `Address` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — the SuperPaymaster ABI has no per-agent sponsorship-rate getter; sponsorship is now a boolean eligibility check. Throws ErrorCode.NOT\_IMPLEMENTED; use [isEligibleForSponsorship](#iseligibleforsponsorship). + +*** + +### isEligibleForSponsorship() + +> **isEligibleForSponsorship**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agent.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isRegisteredAgent() + +> **isRegisteredAgent**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agent.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ~~setAgentPolicies()~~ + +> **setAgentPolicies**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agent.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `policies`: [`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.policies` | [`AgentSponsorshipPolicy`](AgentSponsorshipPolicy.md)[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — per-operator sponsorship policies are no longer configurable on-chain (no `setAgentPolicies`). Throws ErrorCode.NOT\_IMPLEMENTED; to wire up the agent identity/reputation registries use [setAgentRegistries](#setagentregistries). + +*** + +### setAgentRegistries() + +> **setAgentRegistries**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agent.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `identity`: `Address`; `reputation`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.identity` | `Address` | +| `args.reputation` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/AgentRegistryActions.md b/api/@aastar/sdk/type-aliases/AgentRegistryActions.md new file mode 100644 index 000000000..d3c867dec --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AgentRegistryActions.md @@ -0,0 +1,303 @@ +> **AgentRegistryActions** = `object` + +Defined in: [packages/core/src/actions/agentRegistry.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L6) + +## Properties + +### agentWalletOwner() + +> **agentWalletOwner**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentWallet`: `Address`; \} | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### bindFactory() + +> **bindFactory**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `factory`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.factory` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### deployer() + +> **deployer**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L8) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### deregisterAgent() + +> **deregisterAgent**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L47) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentWallet`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### factory() + +> **factory**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L9) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAgentByIndex() + +> **getAgentByIndex**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `owner`: `Address`; \} | +| `args.index` | `bigint` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAgentCount() + +> **getAgentCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getAgents() + +> **getAgents**: (`args`) => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `humanOwner`: `Address`; \} | +| `args.humanOwner` | `Address` | + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getAgentsPage() + +> **getAgentsPage**: (`args`) => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `count`: `bigint`; `owner`: `Address`; `start`: `bigint`; \} | +| `args.count` | `bigint` | +| `args.owner` | `Address` | +| `args.start` | `bigint` | + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getHumanOwner() + +> **getHumanOwner**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentWallet`: `Address`; \} | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### isRegisteredAgent() + +> **isRegisteredAgent**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentWallet`: `Address`; \} | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isValidAccount() + +> **isValidAccount**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### markValid() + +> **markValid**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `signer?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account` | `Address` | +| `args.signer?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ownerAgents() + +> **ownerAgents**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L27) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `owner`: `Address`; \} | +| `args.index` | `bigint` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### registerAgent() + +> **registerAgent**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentWallet`: `Address`; `agentWalletSig`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentWallet` | `Address` | +| `args.agentWalletSig` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### revokeAgent() + +> **revokeAgent**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/agentRegistry.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agentRegistry.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentWallet`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentWallet` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/AgentSponsorshipPolicy.md b/api/@aastar/sdk/type-aliases/AgentSponsorshipPolicy.md new file mode 100644 index 000000000..364085dbf --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AgentSponsorshipPolicy.md @@ -0,0 +1,27 @@ +> **AgentSponsorshipPolicy** = `object` + +Defined in: [packages/core/src/actions/agent.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L6) + +## Properties + +### maxDailyUSD + +> **maxDailyUSD**: `bigint` + +Defined in: [packages/core/src/actions/agent.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L9) + +*** + +### minReputationScore + +> **minReputationScore**: `bigint` + +Defined in: [packages/core/src/actions/agent.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L7) + +*** + +### sponsorshipBPS + +> **sponsorshipBPS**: `bigint` + +Defined in: [packages/core/src/actions/agent.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/agent.ts#L8) diff --git a/api/@aastar/sdk/type-aliases/AggregatorActions.md b/api/@aastar/sdk/type-aliases/AggregatorActions.md new file mode 100644 index 000000000..a90b94704 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AggregatorActions.md @@ -0,0 +1,517 @@ +> **AggregatorActions** = `object` + +Defined in: [packages/core/src/actions/aggregator.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L10) + +## Properties + +### aggregatedSignatures() + +> **aggregatedSignatures**: (`args`) => `Promise`\<\{ `aggregatedSig`: [`Hex`](https://viem.sh/docs/index.html); `messageHash`: [`Hex`](https://viem.sh/docs/index.html); `timestamp`: `bigint`; `verified`: `boolean`; \}\> + +Defined in: [packages/core/src/actions/aggregator.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L51) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; \} | +| `args.index` | `bigint` | + +#### Returns + +`Promise`\<\{ `aggregatedSig`: [`Hex`](https://viem.sh/docs/index.html); `messageHash`: [`Hex`](https://viem.sh/docs/index.html); `timestamp`: `bigint`; `verified`: `boolean`; \}\> + +*** + +### ~~blsPublicKeys()~~ + +> **blsPublicKeys**: (`args`) => `Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +Defined in: [packages/core/src/actions/aggregator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `validator`: `Address`; \} | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +#### Deprecated + +The deployed BLSAggregator ABI has no `blsPublicKeys` mapping getter — this wrapper now reads the ABI-confirmed `getBLSPublicKey` and projects out the slot. Prefer [getBLSPublicKey](#getblspublickey). + +*** + +### buildSignerMask() + +> **buildSignerMask**: (`args`) => `Promise`\<\{ `signerMask`: `bigint`; `slots`: `number`[]; \}\> + +Defined in: [packages/core/src/actions/aggregator.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L33) + +Build the DVT `signerMask` for a set of signer addresses by reading each +signer's on-chain registration slot. bit `s-1` is set for a validator at slot +`s` (see [BLSHelpers.slotsToSignerMask](../variables/BLSHelpers.md#slotstosignermask)). Throws if any signer is not a +registered, active validator, or if two signers map to the same slot. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `signers`: `Address`[]; \} | +| `args.signers` | `Address`[] | + +#### Returns + +`Promise`\<\{ `signerMask`: `bigint`; `slots`: `number`[]; \}\> + +*** + +### defaultThreshold() + +> **defaultThreshold**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/aggregator.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L41) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### DVT\_VALIDATOR() + +> **DVT\_VALIDATOR**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/aggregator.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L56) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### executedProposals() + +> **executedProposals**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/aggregator.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L47) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `proposalId`: `bigint`; \} | +| `args.proposalId` | `bigint` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### executeProposal() + +> **executeProposal**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `callData`: [`Hex`](https://viem.sh/docs/index.html); `proof`: [`Hex`](https://viem.sh/docs/index.html); `proposalId`: `bigint`; `requiredThreshold`: `bigint`; `target`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.callData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.proposalId` | `bigint` | +| `args.requiredThreshold` | `bigint` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getBLSPublicKey() + +> **getBLSPublicKey**: (`args`) => `Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`BLSG1Point`](BLSG1Point.md); `slot`: `number`; \}\> + +Defined in: [packages/core/src/actions/aggregator.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L16) + +Read a validator's registered G1 key + its registration SLOT (1-indexed) + active flag. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `validator`: `Address`; \} | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<\{ `isActive`: `boolean`; `publicKey`: [`BLSG1Point`](BLSG1Point.md); `slot`: `number`; \}\> + +*** + +### MAX\_VALIDATORS() + +> **MAX\_VALIDATORS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/aggregator.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L61) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### minThreshold() + +> **minThreshold**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/aggregator.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L42) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/aggregator.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L64) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### permissionlessBLSRegistration() + +> **permissionlessBLSRegistration**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/aggregator.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L24) + +Whether permissionless BLS key registration is currently enabled (view). + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### proposalNonces() + +> **proposalNonces**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/aggregator.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `proposalId`: `bigint`; \} | +| `args.proposalId` | `bigint` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### registerBLSPublicKey() + +> **registerBLSPublicKey**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `publicKey`: [`Hex`](https://viem.sh/docs/index.html); `validator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.publicKey` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/aggregator.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L58) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L66) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### revokeBLSPublicKey() + +> **revokeBLSPublicKey**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L20) + +Revoke a validator's registered BLS public key (owner-gated). ABI: revokeBLSPublicKey(address validator). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `validator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setDefaultThreshold() + +> **setDefaultThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L39) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newThreshold`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newThreshold` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setDVTValidator() + +> **setDVTValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `dv`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.dv` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setMinThreshold() + +> **setMinThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L40) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newThreshold`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newThreshold` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setPermissionlessBLSRegistration() + +> **setPermissionlessBLSRegistration**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L22) + +Toggle permissionless (self-service) BLS key registration. ABI: setPermissionlessBLSRegistration(bool enabled). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `enabled`: `boolean`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.enabled` | `boolean` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setSuperPaymaster() + +> **setSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `paymaster`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.paymaster` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### SUPERPAYMASTER() + +> **SUPERPAYMASTER**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/aggregator.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L57) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### validatorAtSlot() + +> **validatorAtSlot**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/aggregator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L18) + +Reverse of [getBLSPublicKey](#getblspublickey): the validator address registered at a given slot. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `slot`: `number`; \} | +| `args.slot` | `number` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### verify() + +> **verify**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/aggregator.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L35) + +On-chain aggregate-signature verification (view). `sigBytes` = aggregated sigG2. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `expectedMessageHash`: [`Hex`](https://viem.sh/docs/index.html); `requiredThreshold`: `bigint`; `sigBytes`: [`Hex`](https://viem.sh/docs/index.html); `signerMask`: `bigint`; \} | +| `args.expectedMessageHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.requiredThreshold` | `bigint` | +| `args.sigBytes` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.signerMask` | `bigint` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### verifyAndExecute() + +> **verifyAndExecute**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/aggregator.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L46) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `epoch`: `bigint`; `newScores`: `bigint`[]; `operator`: `Address`; `proof`: [`Hex`](https://viem.sh/docs/index.html); `proposalId`: `bigint`; `repUsers`: `Address`[]; `slashLevel`: `number`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.epoch` | `bigint` | +| `args.newScores` | `bigint`[] | +| `args.operator` | `Address` | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.proposalId` | `bigint` | +| `args.repUsers` | `Address`[] | +| `args.slashLevel` | `number` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/aggregator.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L69) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/AirAccountActions.md b/api/@aastar/sdk/type-aliases/AirAccountActions.md new file mode 100644 index 000000000..0131e1bee --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AirAccountActions.md @@ -0,0 +1,525 @@ +> **AirAccountActions** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L37) + +## Properties + +### accountId() + +> **accountId**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/airAccount.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L42) + +#### Returns + +`Promise`\<`string`\> + +*** + +### cancelModuleInstall() + +> **cancelModuleInstall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L81) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeFromExecutor() + +> **executeFromExecutor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L66) + +Execute calls via an installed executor module (ERC-7579 `executeFromExecutor`). +NOTE: this is a state-changing tx, so it resolves to the transaction `Hash` — the +on-chain `bytes[] returnData` is NOT recoverable from a write. If you need the +decoded return data, `simulateContract`/`call` the same function separately. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `executionCalldata`: [`Hex`](https://viem.sh/docs/index.html); `mode`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.executionCalldata` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.mode` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeModuleInstall() + +> **executeModuleInstall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L80) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `moduleInitData`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.moduleInitData` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardAddTokenConfig() + +> **guardAddTokenConfig**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L71) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`TokenConfig`](TokenConfig.md); `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`TokenConfig`](TokenConfig.md) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardApproveAlgorithm() + +> **guardApproveAlgorithm**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L72) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `algId`: `number`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.algId` | `number` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardDecreaseDailyLimit() + +> **guardDecreaseDailyLimit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L73) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newLimit`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newLimit` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardDecreaseTokenDailyLimit() + +> **guardDecreaseTokenDailyLimit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L74) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newLimit`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newLimit` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### guardianCount() + +> **guardianCount**: () => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/airAccount.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L40) + +#### Returns + +`Promise`\<`number`\> + +*** + +### guardians() + +> **guardians**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccount.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L41) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint` \| `number`; \} | +| `args.index` | `bigint` \| `number` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### guardSetStrictMode() + +> **guardSetStrictMode**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `enabled`: `boolean`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.enabled` | `boolean` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### initializeAgentAccount() + +> **initializeAgentAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`InitConfig`](InitConfig.md); `entryPoint`: `Address`; `guardAddr`: `Address`; `owner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.entryPoint` | `Address` | +| `args.guardAddr` | `Address` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### isValidSignature() + +> **isValidSignature**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `hash`: [`Hex`](https://viem.sh/docs/index.html); `sig`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.hash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sig` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### moduleInstallTimelock() + +> **moduleInstallTimelock**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/airAccount.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L50) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### moduleManagementNonce() + +> **moduleManagementNonce**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/airAccount.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L49) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccount.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L39) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### p256KeyX() + +> **p256KeyX**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L46) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### p256KeyY() + +> **p256KeyY**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L47) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### parserRegistry() + +> **parserRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccount.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L48) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pendingModuleInstall() + +> **pendingModuleInstall**: () => `Promise`\<[`PendingModuleInstall`](PendingModuleInstall.md)\> + +Defined in: [packages/core/src/actions/airAccount.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L51) + +#### Returns + +`Promise`\<[`PendingModuleInstall`](PendingModuleInstall.md)\> + +*** + +### proposeModuleInstall() + +> **proposeModuleInstall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L79) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `initData`: [`Hex`](https://viem.sh/docs/index.html); `module`: `Address`; `moduleTypeId`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.initData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.module` | `Address` | +| `args.moduleTypeId` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### requiredTier() + +> **requiredTier**: (`args`) => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/airAccount.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L44) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `txValue`: `bigint`; \} | +| `args.txValue` | `bigint` | + +#### Returns + +`Promise`\<`number`\> + +*** + +### setModuleInstallTimelock() + +> **setModuleInstallTimelock**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L82) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `guardianSigs`: [`Hex`](https://viem.sh/docs/index.html); `newTimelock`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.guardianSigs` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.newTimelock` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setP256Key() + +> **setP256Key**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `x`: [`Hex`](https://viem.sh/docs/index.html); `y`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.x` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.y` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setParserRegistry() + +> **setParserRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L57) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setTierLimits() + +> **setTierLimits**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `tier1`: `bigint`; `tier2`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.tier1` | `bigint` | +| `args.tier2` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setValidator() + +> **setValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L56) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `validator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### supportsModule() + +> **supportsModule**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/airAccount.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `moduleTypeId`: `bigint`; \} | +| `args.moduleTypeId` | `bigint` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### validateUserOp() + +> **validateUserOp**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccount.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `missingAccountFunds`: `bigint`; `userOp`: [`PackedUserOperation`](../../core/type-aliases/PackedUserOperation.md); `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.missingAccountFunds` | `bigint` | +| `args.userOp` | [`PackedUserOperation`](../../core/type-aliases/PackedUserOperation.md) | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/AirAccountFactoryActions.md b/api/@aastar/sdk/type-aliases/AirAccountFactoryActions.md new file mode 100644 index 000000000..91a8c006d --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AirAccountFactoryActions.md @@ -0,0 +1,228 @@ +> **AirAccountFactoryActions** = `object` + +Defined in: [packages/core/src/actions/airAccountFactory.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L7) + +## Properties + +### agentRegistry() + +> **agentRegistry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L28) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### createAccount() + +> **createAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`InitConfig`](InitConfig.md); `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `owner`: `Address`; `salt`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.maxFeePerGas?` | `bigint` | +| `args.maxPriorityFeePerGas?` | `bigint` | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### createAgentAccount() + +> **createAgentAccount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L36) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentId`: [`Hex`](https://viem.sh/docs/index.html); `agentKey`: `Address`; `agentKeySig`: [`Hex`](https://viem.sh/docs/index.html); `dailyLimit`: `bigint`; `deadline`: `bigint` \| `number`; `guardian2`: `Address`; `guardian2Sig`: [`Hex`](https://viem.sh/docs/index.html); `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.agentKey` | `Address` | +| `args.agentKeySig` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.dailyLimit` | `bigint` | +| `args.deadline` | `bigint` \| `number` | +| `args.guardian2` | `Address` | +| `args.guardian2Sig` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.maxFeePerGas?` | `bigint` | +| `args.maxPriorityFeePerGas?` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### defaultCommunityGuardian() + +> **defaultCommunityGuardian**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L24) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### factoryAdmin() + +> **factoryAdmin**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L22) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAddress() + +> **getAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `config`: [`InitConfig`](InitConfig.md); `owner`: `Address`; `salt`: `bigint`; \} | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAddressWithChainId() + +> **getAddressWithChainId**: (`args`) => `Promise`\<\{ `account`: `Address`; `chainQualified`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `config`: [`InitConfig`](InitConfig.md); `owner`: `Address`; `salt`: `bigint`; \} | +| `args.config` | [`InitConfig`](InitConfig.md) | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | + +#### Returns + +`Promise`\<\{ `account`: `Address`; `chainQualified`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +*** + +### getAddressWithDefaults() + +> **getAddressWithDefaults**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `dailyLimit`: `bigint`; `guard`: `Address`; `owner`: `Address`; `salt`: `bigint`; `validator`: `Address`; \} | +| `args.dailyLimit` | `bigint` | +| `args.guard` | `Address` | +| `args.owner` | `Address` | +| `args.salt` | `bigint` | +| `args.validator` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getAgentAddress() + +> **getAgentAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `agentId`: [`Hex`](https://viem.sh/docs/index.html); `agentKey`: `Address`; `humanOwner`: `Address`; \} | +| `args.agentId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.agentKey` | `Address` | +| `args.humanOwner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getChainQualifiedAddress() + +> **getChainQualifiedAddress**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### implementation() + +> **implementation**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L20) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### setAgentRegistry() + +> **setAgentRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/airAccountFactory.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccountFactory.ts#L49) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `agentRegistry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.agentRegistry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/AssetPolicy.md b/api/@aastar/sdk/type-aliases/AssetPolicy.md new file mode 100644 index 000000000..d6b759830 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AssetPolicy.md @@ -0,0 +1,55 @@ +> **AssetPolicy** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L21) + +Per-(sender, asset) amount policy. Native-unit amounts (no USD oracle). + +## Properties + +### configured + +> **configured**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L31) + +false => no policy for this (sender, asset) => UNRESTRICTED (opt-in). + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L27) + +Cumulative spend over `windowSeconds` => REJECT when exceeded. + +*** + +### dvtTriggerAmount + +> **dvtTriggerAmount**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L23) + +Single-tx amount >= this => REQUIRE_DVT; 0 => amount-based trigger DISABLED. + +*** + +### perTxHardCap + +> **perTxHardCap**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L25) + +Single-tx amount > this => REJECT (enforced only when configured). + +*** + +### windowSeconds + +> **windowSeconds**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L29) + +Daily-limit window length in seconds; 0 => DEFAULT_WINDOW (1 day). diff --git a/api/@aastar/sdk/type-aliases/AssetPolicyInput.md b/api/@aastar/sdk/type-aliases/AssetPolicyInput.md new file mode 100644 index 000000000..a308e0e0b --- /dev/null +++ b/api/@aastar/sdk/type-aliases/AssetPolicyInput.md @@ -0,0 +1,39 @@ +> **AssetPolicyInput** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L35) + +Input form of [AssetPolicy](AssetPolicy.md) for governance setters (no `configured` flag). + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L38) + +*** + +### dvtTriggerAmount + +> **dvtTriggerAmount**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L36) + +*** + +### perTxHardCap + +> **perTxHardCap**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L37) + +*** + +### windowSeconds + +> **windowSeconds**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L40) + +0 => DEFAULT_WINDOW (1 day). diff --git a/api/@aastar/sdk/type-aliases/BLSAlgorithmActions.md b/api/@aastar/sdk/type-aliases/BLSAlgorithmActions.md new file mode 100644 index 000000000..ae3c0d37f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/BLSAlgorithmActions.md @@ -0,0 +1,23 @@ +> **BLSAlgorithmActions** = `object` + +Defined in: [packages/core/src/actions/blsAlgorithm.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/blsAlgorithm.ts#L6) + +## Properties + +### validate() + +> **validate**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/blsAlgorithm.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/blsAlgorithm.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `proof`: [`Hex`](https://viem.sh/docs/index.html); `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> diff --git a/api/@aastar/sdk/type-aliases/BLSG1Point.md b/api/@aastar/sdk/type-aliases/BLSG1Point.md new file mode 100644 index 000000000..21f99605c --- /dev/null +++ b/api/@aastar/sdk/type-aliases/BLSG1Point.md @@ -0,0 +1,37 @@ +> **BLSG1Point** = `object` + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +A registered validator's on-chain BLS G1 public key point. + +## Properties + +### x\_a + +> **x\_a**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +*** + +### x\_b + +> **x\_b**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +*** + +### y\_a + +> **y\_a**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) + +*** + +### y\_b + +> **y\_b**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/aggregator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/aggregator.ts#L8) diff --git a/api/@aastar/sdk/type-aliases/BatchMintResult.md b/api/@aastar/sdk/type-aliases/BatchMintResult.md new file mode 100644 index 000000000..cb970ee72 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/BatchMintResult.md @@ -0,0 +1,37 @@ +> **BatchMintResult** = `object` + +Defined in: [packages/core/src/actions/sbt.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L22) + +Per-item outcome of a sequential batch mint. + +## Properties + +### error? + +> `optional` **error**: `string` + +Defined in: [packages/core/src/actions/sbt.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L26) + +*** + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/actions/sbt.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L24) + +*** + +### txHash? + +> `optional` **txHash**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/sbt.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L25) + +*** + +### user + +> **user**: `Address` + +Defined in: [packages/core/src/actions/sbt.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L23) diff --git a/api/@aastar/sdk/type-aliases/BusinessResult.md b/api/@aastar/sdk/type-aliases/BusinessResult.md new file mode 100644 index 000000000..523bab794 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/BusinessResult.md @@ -0,0 +1,12 @@ +> **BusinessResult**\<`T`\> = `Promise`\<`T`\> + +Defined in: [packages/core/src/clients/types.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/clients/types.ts#L70) + +Generic result wrapper for business operations +Currently just returns the type directly, but can be expanded for metadata. + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | diff --git a/api/@aastar/sdk/type-aliases/CanonicalAddresses.md b/api/@aastar/sdk/type-aliases/CanonicalAddresses.md new file mode 100644 index 000000000..3cf307381 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/CanonicalAddresses.md @@ -0,0 +1,3 @@ +> **CanonicalAddresses** = *typeof* [`CANONICAL_ADDRESSES`](../variables/CANONICAL_ADDRESSES.md)\[keyof *typeof* [`CANONICAL_ADDRESSES`](../variables/CANONICAL_ADDRESSES.md)\] + +Defined in: [packages/core/src/addresses.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L184) diff --git a/api/@aastar/sdk/type-aliases/ChannelActions.md b/api/@aastar/sdk/type-aliases/ChannelActions.md new file mode 100644 index 000000000..34bf78826 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ChannelActions.md @@ -0,0 +1,279 @@ +> **ChannelActions** = `object` + +Defined in: [packages/core/src/actions/channel.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L17) + +## Properties + +### ~~CLOSE\_TIMEOUT()~~ + +> **CLOSE\_TIMEOUT**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L49) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +The deployed MicroPaymentChannel ABI no longer exposes a `CLOSE_TIMEOUT` +constant — it was replaced by the configurable [closeTimeout](#closetimeout) getter plus the +[MIN\_CLOSE\_TIMEOUT](#min_close_timeout)/[MAX\_CLOSE\_TIMEOUT](#max_close_timeout) bounds. This wrapper now delegates +to the on-chain `closeTimeout()` getter so it no longer reverts; use [closeTimeout](#closetimeout). + +*** + +### closeChannel() + +> **closeChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L27) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); `cumulativeAmount`: `bigint`; `signature`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.cumulativeAmount` | `bigint` | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### closedChannels() + +> **closedChannels**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/channel.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L55) + +Whether a given channelId has already been closed (view). ABI: closedChannels(bytes32) -> bool. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### closeTimeout() + +> **closeTimeout**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L51) + +Current configurable close-timeout (seconds, view). ABI: closeTimeout() -> uint64. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getChannel() + +> **getChannel**: (`args`) => `Promise`\<[`ChannelState`](ChannelState.md)\> + +Defined in: [packages/core/src/actions/channel.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L42) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ChannelState`](ChannelState.md)\> + +*** + +### MAX\_CLOSE\_TIMEOUT() + +> **MAX\_CLOSE\_TIMEOUT**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L57) + +Upper bound for [setCloseTimeout](#setclosetimeout) (view). ABI: MAX_CLOSE_TIMEOUT() -> uint64. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MIN\_CLOSE\_TIMEOUT() + +> **MIN\_CLOSE\_TIMEOUT**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/channel.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L59) + +Lower bound for [setCloseTimeout](#setclosetimeout) (view). ABI: MIN_CLOSE_TIMEOUT() -> uint64. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### openChannel() + +> **openChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorizedSigner`: `Address`; `deposit`: `bigint`; `payee`: `Address`; `salt`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorizedSigner` | `Address` | +| `args.deposit` | `bigint` | +| `args.payee` | `Address` | +| `args.salt` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### requestCloseChannel() + +> **requestCloseChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L34) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setCloseTimeout() + +> **setCloseTimeout**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L53) + +Set the configurable close-timeout window (owner-gated). ABI: setCloseTimeout(uint64 _timeout). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `timeout`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.timeout` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### settleChannel() + +> **settleChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); `cumulativeAmount`: `bigint`; `signature`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.cumulativeAmount` | `bigint` | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### topUpChannel() + +> **topUpChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/channel.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L61) + +#### Returns + +`Promise`\<`string`\> + +*** + +### VOUCHER\_TYPEHASH() + +> **VOUCHER\_TYPEHASH**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L60) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawChannel() + +> **withdrawChannel**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/channel.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L37) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `channelId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.channelId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/ChannelClientConfig.md b/api/@aastar/sdk/type-aliases/ChannelClientConfig.md new file mode 100644 index 000000000..431a98864 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ChannelClientConfig.md @@ -0,0 +1,35 @@ +> **ChannelClientConfig** = `object` + +Defined in: [packages/channel/src/ChannelClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L6) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/channel/src/ChannelClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L10) + +*** + +### channelAddress + +> **channelAddress**: `Address` + +Defined in: [packages/channel/src/ChannelClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L9) + +*** + +### publicClient + +> **publicClient**: [`PublicClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/ChannelClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L7) + +*** + +### walletClient + +> **walletClient**: [`WalletClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/ChannelClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/ChannelClient.ts#L8) diff --git a/api/@aastar/sdk/type-aliases/ChannelConfig.md b/api/@aastar/sdk/type-aliases/ChannelConfig.md new file mode 100644 index 000000000..3e5b08d3d --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ChannelConfig.md @@ -0,0 +1,43 @@ +> **ChannelConfig** = `object` + +Defined in: [packages/channel/src/types.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L15) + +## Properties + +### authorizedSigner + +> **authorizedSigner**: `` `0x${string}` `` + +Defined in: [packages/channel/src/types.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L20) + +*** + +### deposit + +> **deposit**: `bigint` + +Defined in: [packages/channel/src/types.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L18) + +*** + +### payee + +> **payee**: `` `0x${string}` `` + +Defined in: [packages/channel/src/types.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L16) + +*** + +### salt + +> **salt**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/types.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L19) + +*** + +### token + +> **token**: `` `0x${string}` `` + +Defined in: [packages/channel/src/types.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L17) diff --git a/api/@aastar/sdk/type-aliases/ChannelState.md b/api/@aastar/sdk/type-aliases/ChannelState.md new file mode 100644 index 000000000..0314d1a2c --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ChannelState.md @@ -0,0 +1,67 @@ +> **ChannelState** = `object` + +Defined in: [packages/core/src/actions/channel.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L6) + +## Properties + +### authorizedSigner + +> **authorizedSigner**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L10) + +*** + +### closeRequestedAt + +> **closeRequestedAt**: `bigint` + +Defined in: [packages/core/src/actions/channel.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L13) + +*** + +### deposit + +> **deposit**: `bigint` + +Defined in: [packages/core/src/actions/channel.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L11) + +*** + +### finalized + +> **finalized**: `boolean` + +Defined in: [packages/core/src/actions/channel.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L14) + +*** + +### payee + +> **payee**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L8) + +*** + +### payer + +> **payer**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L7) + +*** + +### settled + +> **settled**: `bigint` + +Defined in: [packages/core/src/actions/channel.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L12) + +*** + +### token + +> **token**: `Address` + +Defined in: [packages/core/src/actions/channel.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/channel.ts#L9) diff --git a/api/@aastar/sdk/type-aliases/CommunityProfile.md b/api/@aastar/sdk/type-aliases/CommunityProfile.md new file mode 100644 index 000000000..020fa5f29 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/CommunityProfile.md @@ -0,0 +1,99 @@ +> **CommunityProfile** = `object` + +Defined in: [packages/core/src/actions/registry.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L123) + +Rich community metadata reconstructed from on-chain data. + +The deployed v5 Registry stores community `roleData` only in an internal mapping +with NO public getter, so this profile is recovered via the event->calldata +back-trace pattern: locate the `RoleRegistered(ROLE_COMMUNITY, community)` log, +fetch the originating transaction, then decode its `registerRole` calldata to +extract the submitted `roleData` struct. + +## Properties + +### burnAmount + +> **burnAmount**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L131) + +burnAmount from the RoleRegistered event. + +*** + +### description + +> **description**: `string` + +Defined in: [packages/core/src/actions/registry.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L127) + +*** + +### ensName + +> **ensName**: `string` + +Defined in: [packages/core/src/actions/registry.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L125) + +*** + +### logoURI + +> **logoURI**: `string` + +Defined in: [packages/core/src/actions/registry.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L128) + +*** + +### name + +> **name**: `string` + +Defined in: [packages/core/src/actions/registry.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L124) + +*** + +### rawRoleData + +> **rawRoleData**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/registry.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L137) + +Raw ABI-encoded roleData bytes from the registration calldata. + +*** + +### registeredAt + +> **registeredAt**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L133) + +Block timestamp recorded in the RoleRegistered event. + +*** + +### stakeAmount + +> **stakeAmount**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L129) + +*** + +### txHash + +> **txHash**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/registry.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L135) + +Transaction hash that registered the community (calldata source). + +*** + +### website + +> **website**: `string` + +Defined in: [packages/core/src/actions/registry.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L126) diff --git a/api/@aastar/sdk/type-aliases/ContractCategory.md b/api/@aastar/sdk/type-aliases/ContractCategory.md new file mode 100644 index 000000000..2ff416108 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ContractCategory.md @@ -0,0 +1,5 @@ +> **ContractCategory** = `"core"` \| `"tokens"` \| `"testTokens"` \| `"testAccounts"` \| `"paymaster"` \| `"monitoring"` \| `"official"` \| `"communities"` + +Defined in: [packages/core/src/contracts.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L25) + +Contract category types diff --git a/api/@aastar/sdk/type-aliases/ContractNetwork.md b/api/@aastar/sdk/type-aliases/ContractNetwork.md new file mode 100644 index 000000000..e9855001b --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ContractNetwork.md @@ -0,0 +1,5 @@ +> **ContractNetwork** = keyof *typeof* [`CONTRACTS`](../variables/CONTRACTS.md) + +Defined in: [packages/core/src/contracts.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L111) + +Supported network types for contracts diff --git a/api/@aastar/sdk/type-aliases/ContractScope.md b/api/@aastar/sdk/type-aliases/ContractScope.md new file mode 100644 index 000000000..30438c094 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ContractScope.md @@ -0,0 +1,55 @@ +> **ContractScope** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L44) + +Per-(sender, target) scope. Selectors are queried via isSelectorAllowed. + +## Properties + +### allowed + +> **allowed**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L46) + +target on this sender's call-target allowlist. + +*** + +### configured + +> **configured**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L54) + +false => no scope set for this (sender, target). + +*** + +### requireDVTAlways + +> **requireDVTAlways**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L48) + +this target always requires DVT co-sign regardless of amount. + +*** + +### velocityLimit + +> **velocityLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L50) + +max cumulative amount routed to this target per window. + +*** + +### velocityWindow + +> **velocityWindow**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L52) + +velocity window length, seconds (0 => no velocity limit). diff --git a/api/@aastar/sdk/type-aliases/ContractScopeInput.md b/api/@aastar/sdk/type-aliases/ContractScopeInput.md new file mode 100644 index 000000000..9887b3c1c --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ContractScopeInput.md @@ -0,0 +1,47 @@ +> **ContractScopeInput** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L58) + +Input form of [ContractScope](ContractScope.md) for governance setters; selectors set as a batch. + +## Properties + +### allowed + +> **allowed**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L59) + +*** + +### requireDVTAlways + +> **requireDVTAlways**: `boolean` + +Defined in: [packages/core/src/actions/policyRegistry.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L60) + +*** + +### selectorAllowlist + +> **selectorAllowlist**: [`Hex`](https://viem.sh/docs/index.html)[] + +Defined in: [packages/core/src/actions/policyRegistry.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L64) + +selectors to mark allowed for this target (ADDITIVE on `setContractScope`). + +*** + +### velocityLimit + +> **velocityLimit**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L61) + +*** + +### velocityWindow + +> **velocityWindow**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L62) diff --git a/api/@aastar/sdk/type-aliases/DVTActions.md b/api/@aastar/sdk/type-aliases/DVTActions.md new file mode 100644 index 000000000..2a512fd4c --- /dev/null +++ b/api/@aastar/sdk/type-aliases/DVTActions.md @@ -0,0 +1,315 @@ +> **DVTActions** = `object` + +Defined in: [packages/core/src/actions/dvt.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L6) + +## Properties + +### addValidator() + +> **addValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `v`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.v` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### BLS\_AGGREGATOR() + +> **BLS\_AGGREGATOR**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/dvt.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L26) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### createSlashProposal() + +> **createSlashProposal**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L8) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `level`: `number`; `operator`: `Address`; `reason`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.level` | `number` | +| `args.operator` | `Address` | +| `args.reason` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeSlashWithProof() + +> **executeSlashWithProof**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `epoch`: `bigint`; `newScores`: `bigint`[]; `proof`: [`Hex`](https://viem.sh/docs/index.html); `proposalId`: `bigint`; `repUsers`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.epoch` | `bigint` | +| `args.newScores` | `bigint`[] | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.proposalId` | `bigint` | +| `args.repUsers` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### isValidator() + +> **isValidator**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/dvt.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### markProposalExecuted() + +> **markProposalExecuted**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `id`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.id` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### nextProposalId() + +> **nextProposalId**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/dvt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L14) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/dvt.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L30) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### proposals() + +> **proposals**: (`args`) => `Promise`\<\{ `executed`: `boolean`; `operator`: `Address`; `reason`: `string`; `slashLevel`: `number`; \}\> + +Defined in: [packages/core/src/actions/dvt.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `proposalId`: `bigint`; \} | +| `args.proposalId` | `bigint` | + +#### Returns + +`Promise`\<\{ `executed`: `boolean`; `operator`: `Address`; `reason`: `string`; `slashLevel`: `number`; \}\> + +*** + +### pruneValidator() + +> **pruneValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L22) + +Prune a validator entry (cleanup of a removed/stale validator). ABI: pruneValidator(address v). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `v`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.v` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/dvt.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L27) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### removeValidator() + +> **removeValidator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L20) + +Remove a validator from the active set (owner-gated). ABI: removeValidator(address v). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `v`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.v` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setBLSAggregator() + +> **setBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `aggregator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.aggregator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~signSlashProposal()~~ + +> **signSlashProposal**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L10) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `proposalId`: `bigint`; `signature`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.proposalId` | `bigint` | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — DVT slash signing is off-chain (BLS), there is no `signSlashProposal` in the DVTValidator ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/dvt.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/dvt.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/dvt.ts#L35) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/DVTTier.md b/api/@aastar/sdk/type-aliases/DVTTier.md new file mode 100644 index 000000000..8110e569f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/DVTTier.md @@ -0,0 +1,5 @@ +> **DVTTier** = *typeof* [`DVT_TIER_T2`](../variables/DVT_TIER_T2.md) \| *typeof* [`DVT_TIER_T3`](../variables/DVT_TIER_T3.md) + +Defined in: [packages/core/src/crypto/dvtWire.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L47) + +A DVT account-signature tier byte. diff --git a/api/@aastar/sdk/type-aliases/DirectPaymentPayload.md b/api/@aastar/sdk/type-aliases/DirectPaymentPayload.md new file mode 100644 index 000000000..f2735ff3c --- /dev/null +++ b/api/@aastar/sdk/type-aliases/DirectPaymentPayload.md @@ -0,0 +1,61 @@ +> **DirectPaymentPayload** = `object` + +Defined in: [packages/x402/src/types.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L115) + +Direct settlement (for xPNTs and pre-approved tokens, bypasses EIP-3009) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/x402/src/types.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L121) + +*** + +### asset + +> **asset**: `Address` + +Defined in: [packages/x402/src/types.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L120) + +*** + +### from + +> **from**: `Address` + +Defined in: [packages/x402/src/types.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L118) + +*** + +### nonce + +> **nonce**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/types.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L122) + +*** + +### scheme + +> **scheme**: `"direct"` + +Defined in: [packages/x402/src/types.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L117) + +*** + +### to + +> **to**: `Address` + +Defined in: [packages/x402/src/types.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L119) + +*** + +### x402Version + +> **x402Version**: `2` + +Defined in: [packages/x402/src/types.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L116) diff --git a/api/@aastar/sdk/type-aliases/DryRunValidationResult.md b/api/@aastar/sdk/type-aliases/DryRunValidationResult.md new file mode 100644 index 000000000..b64a6fc15 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/DryRunValidationResult.md @@ -0,0 +1,23 @@ +> **DryRunValidationResult** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L28) + +Result of an off-chain `dryRunValidation` pre-flight check. +`ok` mirrors whether the paymaster would accept the UserOp; `reasonCode` is a +bytes32 machine-readable rejection code (zero when `ok` is true). + +## Properties + +### ok + +> **ok**: `boolean` + +Defined in: [packages/core/src/actions/superPaymaster.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L29) + +*** + +### reasonCode + +> **reasonCode**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/superPaymaster.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L30) diff --git a/api/@aastar/sdk/type-aliases/EIP3009Authorization.md b/api/@aastar/sdk/type-aliases/EIP3009Authorization.md new file mode 100644 index 000000000..58e730d5e --- /dev/null +++ b/api/@aastar/sdk/type-aliases/EIP3009Authorization.md @@ -0,0 +1,53 @@ +> **EIP3009Authorization** = `object` + +Defined in: [packages/x402/src/types.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L51) + +EIP-3009 TransferWithAuthorization parameters. + +## Properties + +### from + +> **from**: `Address` + +Defined in: [packages/x402/src/types.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L52) + +*** + +### nonce + +> **nonce**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/types.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L57) + +*** + +### to + +> **to**: `Address` + +Defined in: [packages/x402/src/types.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L53) + +*** + +### validAfter + +> **validAfter**: `string` + +Defined in: [packages/x402/src/types.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L55) + +*** + +### validBefore + +> **validBefore**: `string` + +Defined in: [packages/x402/src/types.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L56) + +*** + +### value + +> **value**: `string` + +Defined in: [packages/x402/src/types.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L54) diff --git a/api/@aastar/sdk/type-aliases/EOAWalletClient.md b/api/@aastar/sdk/type-aliases/EOAWalletClient.md new file mode 100644 index 000000000..ee31fa105 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/EOAWalletClient.md @@ -0,0 +1,30 @@ +> **EOAWalletClient** = [`WalletClient`](https://viem.sh/docs/index.html) & `object` + +Defined in: [packages/account/src/eoa.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/eoa.ts#L4) + +## Type Declaration + +### getAddress() + +> **getAddress**: () => `Address` + +#### Returns + +`Address` + +### sendTransaction() + +> **sendTransaction**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `data?`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `value?`: `bigint`; \} | +| `args.data?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.to` | `Address` | +| `args.value?` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/ERC20Actions.md b/api/@aastar/sdk/type-aliases/ERC20Actions.md new file mode 100644 index 000000000..3d23c6356 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ERC20Actions.md @@ -0,0 +1,187 @@ +> **ERC20Actions** = `object` + +Defined in: [packages/core/src/actions/tokens.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L7) + +## Properties + +### allowance() + +> **allowance**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/tokens.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; `spender`: `Address`; `token`: `Address`; \} | +| `args.owner` | `Address` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### approve() + +> **approve**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/tokens.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `spender`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### balanceOf() + +> **balanceOf**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/tokens.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `token`: `Address`; \} | +| `args.account` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### decimals() + +> **decimals**: (`args`) => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/tokens.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`number`\> + +*** + +### name() + +> **name**: (`args`) => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/tokens.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### symbol() + +> **symbol**: (`args`) => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/tokens.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### totalSupply() + +> **totalSupply**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/tokens.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L8) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### transfer() + +> **transfer**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/tokens.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L10) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `to`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.to` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### transferFrom() + +> **transferFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/tokens.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `from`: `Address`; `to`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.from` | `Address` | +| `args.to` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/EndUserClient.md b/api/@aastar/sdk/type-aliases/EndUserClient.md new file mode 100644 index 000000000..fcc33fdb0 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/EndUserClient.md @@ -0,0 +1,118 @@ +> **EndUserClient** = [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`RegistryActions`](RegistryActions.md) & [`SBTActions`](SBTActions.md) & [`SuperPaymasterActions`](SuperPaymasterActions.md) & [`PaymasterActions`](PaymasterActions.md) & `object` + +Defined in: [packages/sdk/src/clients/endUser.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/endUser.ts#L19) + +## Type Declaration + +### checkJoinRequirements() + +> **checkJoinRequirements**: (`address?`) => `Promise`\<\{ `hasEnoughGToken`: `boolean`; `hasSBT`: `boolean`; `missingRequirements`: `string`[]; \}\> + +Check if the user meets the requirements to join a community (stake, sbt, etc.) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `address?` | `Address` | + +#### Returns + +`Promise`\<\{ `hasEnoughGToken`: `boolean`; `hasSBT`: `boolean`; `missingRequirements`: `string`[]; \}\> + +### createSmartAccount() + +> **createSmartAccount**: (`params`) => `Promise`\<\{ `accountAddress`: `Address`; `initCode`: [`Hex`](https://viem.sh/docs/index.html); `isDeployed`: `boolean`; \}\> + +Predict the address of a SimpleAccount without deploying + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `owner`: `Address`; `salt?`: `bigint`; \} | +| `params.owner` | `Address` | +| `params.salt?` | `bigint` | + +#### Returns + +`Promise`\<\{ `accountAddress`: `Address`; `initCode`: [`Hex`](https://viem.sh/docs/index.html); `isDeployed`: `boolean`; \}\> + +### deploySmartAccount() + +> **deploySmartAccount**: (`params`) => `Promise`\<\{ `accountAddress`: `Address`; `deployTxHash`: [`Hash`](https://viem.sh/docs/index.html); `isDeployed`: `boolean`; \}\> + +Predict or deploy a SimpleAccount (ERC-4337) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `fundWithETH?`: `bigint`; `owner`: `Address`; `salt?`: `bigint`; \} | +| `params.fundWithETH?` | `bigint` | +| `params.owner` | `Address` | +| `params.salt?` | `bigint` | + +#### Returns + +`Promise`\<\{ `accountAddress`: `Address`; `deployTxHash`: [`Hash`](https://viem.sh/docs/index.html); `isDeployed`: `boolean`; \}\> + +### executeGasless() + +> **executeGasless**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Executes a gasless transaction via SuperPaymaster. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `data`: [`Hex`](https://viem.sh/docs/index.html); `operator`: `Address`; `target`: `Address`; `value?`: `bigint`; \} | +| `args.data` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.operator` | `Address` | +| `args.target` | `Address` | +| `args.value?` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### joinAndActivate() + +> **joinAndActivate**: (`args`) => `Promise`\<\{ `initialCredit`: `bigint`; `sbtId`: `bigint`; `tx`: [`Hash`](https://viem.sh/docs/index.html); \}\> + +Orchestrates the user joining a community and activating gas credit flow: +1. Mint SBT for the community (Register ENDUSER role) +2. Verify Credit is active (Reputation check) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `roleData?`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.community` | `Address` | +| `args.roleData?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `initialCredit`: `bigint`; `sbtId`: `bigint`; `tx`: [`Hash`](https://viem.sh/docs/index.html); \}\> + +### onboard() + +> **onboard**: (`args`) => `Promise`\<\{ `sbtId`: `bigint`; `tx`: [`Hash`](https://viem.sh/docs/index.html); \}\> + +High-level API: Onboard user to community with automatic funding + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `roleData`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.community` | `Address` | +| `args.roleData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `sbtId`: `bigint`; `tx`: [`Hash`](https://viem.sh/docs/index.html); \}\> diff --git a/api/@aastar/sdk/type-aliases/EntryPointActions.md b/api/@aastar/sdk/type-aliases/EntryPointActions.md new file mode 100644 index 000000000..d24caadf6 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/EntryPointActions.md @@ -0,0 +1,90 @@ +> **EntryPointActions** = `object` + +Defined in: [packages/core/src/actions/entryPoint.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L11) + +## Properties + +### balanceOf() + +> **balanceOf**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/entryPoint.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### depositTo() + +> **depositTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/entryPoint.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `amount`: `bigint`; `txAccount?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account` | `Address` | +| `args.amount` | `bigint` | +| `args.txAccount?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### entryPointAddress + +> **entryPointAddress**: `Address` + +Defined in: [packages/core/src/actions/entryPoint.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L16) + +*** + +### getDepositInfo() + +> **getDepositInfo**: (`args`) => `Promise`\<\{ `deposit`: `bigint`; `stake`: `bigint`; `staked`: `boolean`; `unstakeDelaySec`: `number`; `withdrawTime`: `number`; \}\> + +Defined in: [packages/core/src/actions/entryPoint.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<\{ `deposit`: `bigint`; `stake`: `bigint`; `staked`: `boolean`; `unstakeDelaySec`: `number`; `withdrawTime`: `number`; \}\> + +*** + +### getNonce() + +> **getNonce**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/entryPoint.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/entryPoint.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `key`: `bigint`; `sender`: `Address`; \} | +| `args.key` | `bigint` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> diff --git a/api/@aastar/sdk/type-aliases/FacilitatorConfig.md b/api/@aastar/sdk/type-aliases/FacilitatorConfig.md new file mode 100644 index 000000000..b2b4b2fa7 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/FacilitatorConfig.md @@ -0,0 +1,25 @@ +> **FacilitatorConfig** = `object` + +Defined in: [packages/x402/src/types.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L137) + +Facilitator client configuration + +## Properties + +### createAuthHeaders()? + +> `optional` **createAuthHeaders**: () => `Promise`\<\{ `settle?`: `Record`\<`string`, `string`\>; `supported?`: `Record`\<`string`, `string`\>; `verify?`: `Record`\<`string`, `string`\>; \}\> + +Defined in: [packages/x402/src/types.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L139) + +#### Returns + +`Promise`\<\{ `settle?`: `Record`\<`string`, `string`\>; `supported?`: `Record`\<`string`, `string`\>; `verify?`: `Record`\<`string`, `string`\>; \}\> + +*** + +### url + +> **url**: `string` + +Defined in: [packages/x402/src/types.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L138) diff --git a/api/@aastar/sdk/type-aliases/FacilitatorSupported.md b/api/@aastar/sdk/type-aliases/FacilitatorSupported.md new file mode 100644 index 000000000..9736b109a --- /dev/null +++ b/api/@aastar/sdk/type-aliases/FacilitatorSupported.md @@ -0,0 +1,37 @@ +> **FacilitatorSupported** = `object` + +Defined in: [packages/x402/src/types.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L100) + +Facilitator supported kinds response. + +## Properties + +### extensions + +> **extensions**: `string`[] + +Defined in: [packages/x402/src/types.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L107) + +*** + +### kinds + +> **kinds**: `object`[] + +Defined in: [packages/x402/src/types.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L101) + +#### extra? + +> `optional` **extra**: `Record`\<`string`, `unknown`\> + +#### network + +> **network**: `string` + +#### scheme + +> **scheme**: `string` + +#### x402Version + +> **x402Version**: `number` diff --git a/api/@aastar/sdk/type-aliases/FaucetConfig.md b/api/@aastar/sdk/type-aliases/FaucetConfig.md new file mode 100644 index 000000000..5988c320a --- /dev/null +++ b/api/@aastar/sdk/type-aliases/FaucetConfig.md @@ -0,0 +1,51 @@ +> **FaucetConfig** = `object` + +Defined in: [packages/core/src/actions/faucet.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L24) + +## Properties + +### ethAmount? + +> `optional` **ethAmount**: `bigint` + +Defined in: [packages/core/src/actions/faucet.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L29) + +*** + +### paymasterV4? + +> `optional` **paymasterV4**: `Address` + +Defined in: [packages/core/src/actions/faucet.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L28) + +*** + +### registry + +> **registry**: `Address` + +Defined in: [packages/core/src/actions/faucet.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L27) + +*** + +### targetAA + +> **targetAA**: `Address` + +Defined in: [packages/core/src/actions/faucet.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L25) + +*** + +### token + +> **token**: `Address` + +Defined in: [packages/core/src/actions/faucet.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L26) + +*** + +### tokenAmount? + +> `optional` **tokenAmount**: `bigint` + +Defined in: [packages/core/src/actions/faucet.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L30) diff --git a/api/@aastar/sdk/type-aliases/FaucetPreparationResult.md b/api/@aastar/sdk/type-aliases/FaucetPreparationResult.md new file mode 100644 index 000000000..63121b346 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/FaucetPreparationResult.md @@ -0,0 +1,35 @@ +> **FaucetPreparationResult** = `object` + +Defined in: [packages/core/src/actions/faucet.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L17) + +## Properties + +### ethFunded + +> **ethFunded**: `boolean` + +Defined in: [packages/core/src/actions/faucet.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L18) + +*** + +### paymasterDeposited + +> **paymasterDeposited**: `boolean` + +Defined in: [packages/core/src/actions/faucet.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L21) + +*** + +### roleRegistered + +> **roleRegistered**: `boolean` + +Defined in: [packages/core/src/actions/faucet.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L19) + +*** + +### tokenMinted + +> **tokenMinted**: `boolean` + +Defined in: [packages/core/src/actions/faucet.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/faucet.ts#L20) diff --git a/api/@aastar/sdk/type-aliases/ForceExitActions.md b/api/@aastar/sdk/type-aliases/ForceExitActions.md new file mode 100644 index 000000000..9e1971e18 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ForceExitActions.md @@ -0,0 +1,22 @@ +> **ForceExitActions** = `object` + +Defined in: [packages/core/src/actions/forceExit.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L15) + +## Properties + +### pendingExit() + +> **pendingExit**: (`args`) => `Promise`\<[`PendingExit`](PendingExit.md)\> + +Defined in: [packages/core/src/actions/forceExit.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<[`PendingExit`](PendingExit.md)\> diff --git a/api/@aastar/sdk/type-aliases/GTokenActions.md b/api/@aastar/sdk/type-aliases/GTokenActions.md new file mode 100644 index 000000000..0d290bf75 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/GTokenActions.md @@ -0,0 +1,151 @@ +> **GTokenActions** = [`ERC20Actions`](ERC20Actions.md) & `object` + +Defined in: [packages/core/src/actions/tokens.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L20) + +## Type Declaration + +### burn() + +> **burn**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### burnFrom() + +> **burnFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `from`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.from` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### cap() + +> **cap**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### mint() + +> **mint**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `to`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.to` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### owner() + +> **owner**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### remainingMintableSupply() + +> **remainingMintableSupply**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### version() + +> **version**: (`args`) => `Promise`\<`string`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/GTokenAuthorizationActions.md b/api/@aastar/sdk/type-aliases/GTokenAuthorizationActions.md new file mode 100644 index 000000000..0508eda3d --- /dev/null +++ b/api/@aastar/sdk/type-aliases/GTokenAuthorizationActions.md @@ -0,0 +1,211 @@ +> **GTokenAuthorizationActions** = [`GTokenActions`](GTokenActions.md) & `object` + +Defined in: [packages/core/src/actions/gTokenAuthorization.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/gTokenAuthorization.ts#L12) + +## Type Declaration + +### authorizationState() + +> **authorizationState**: (`args`) => `Promise`\<[`AuthorizationState`](../enumerations/AuthorizationState.md)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `authorizer`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.authorizer` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`AuthorizationState`](../enumerations/AuthorizationState.md)\> + +### CANCEL\_AUTHORIZATION\_TYPEHASH() + +> **CANCEL\_AUTHORIZATION\_TYPEHASH**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### cancelAuthorization() + +> **cancelAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorizer`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorizer` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### DOMAIN\_SEPARATOR() + +> **DOMAIN\_SEPARATOR**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### factory() + +> **factory**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### MAX\_AUTH\_VALIDITY() + +> **MAX\_AUTH\_VALIDITY**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### mySBT() + +> **mySBT**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### RECEIVE\_WITH\_AUTHORIZATION\_TYPEHASH() + +> **RECEIVE\_WITH\_AUTHORIZATION\_TYPEHASH**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### receiveWithAuthorization() + +> **receiveWithAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `token`: `Address`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `xPNTsToken`: `Address`; \} | - | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | - | +| `args.from` | `Address` | - | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.to` | `Address` | - | +| `args.token` | `Address` | - | +| `args.validAfter` | `bigint` | - | +| `args.validBefore` | `bigint` | - | +| `args.value` | `bigint` | - | +| `args.xPNTsToken` | `Address` | RC-2 access hint — NOT signed; pass address(0) to use SBT path only. See trust model above. | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setMySBT() + +> **setMySBT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `mySBT`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.mySBT` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### TRANSFER\_WITH\_AUTHORIZATION\_TYPEHASH() + +> **TRANSFER\_WITH\_AUTHORIZATION\_TYPEHASH**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### transferWithAuthorization() + +> **transferWithAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `token`: `Address`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `xPNTsToken`: `Address`; \} | - | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | - | +| `args.from` | `Address` | - | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | - | +| `args.to` | `Address` | - | +| `args.token` | `Address` | - | +| `args.validAfter` | `bigint` | - | +| `args.validBefore` | `bigint` | - | +| `args.value` | `bigint` | - | +| `args.xPNTsToken` | `Address` | RC-2 access hint — NOT signed; pass address(0) to use SBT path only. See trust model above. | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/GaslessReadinessReport.md b/api/@aastar/sdk/type-aliases/GaslessReadinessReport.md new file mode 100644 index 000000000..e1f4cf680 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/GaslessReadinessReport.md @@ -0,0 +1,55 @@ +> **GaslessReadinessReport** = `object` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L10) + +## Properties + +### details + +> **details**: `object` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L13) + +#### ethUsdPrice + +> **ethUsdPrice**: `bigint` + +#### paymasterDeposit + +> **paymasterDeposit**: `bigint` + +#### paymasterStake + +> **paymasterStake**: `bigint` + +#### tokenPrice + +> **tokenPrice**: `bigint` + +#### tokenSupported + +> **tokenSupported**: `boolean` + +#### userPaymasterDeposit + +> **userPaymasterDeposit**: `bigint` + +#### userTokenBalance + +> **userTokenBalance**: `bigint` + +*** + +### isReady + +> **isReady**: `boolean` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L11) + +*** + +### issues + +> **issues**: `string`[] + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L12) diff --git a/api/@aastar/sdk/type-aliases/GaslessTransactionConfig.md b/api/@aastar/sdk/type-aliases/GaslessTransactionConfig.md new file mode 100644 index 000000000..25353d2a1 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/GaslessTransactionConfig.md @@ -0,0 +1,59 @@ +> **GaslessTransactionConfig** = `object` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L6) + +## Properties + +### amount + +> **amount**: `bigint` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L9) + +*** + +### factory? + +> `optional` **factory**: `Address` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L12) + +*** + +### factoryData? + +> `optional` **factoryData**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L13) + +*** + +### operator + +> **operator**: `Address` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L10) + +*** + +### paymasterAddress + +> **paymasterAddress**: `Address` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L11) + +*** + +### recipient + +> **recipient**: `Address` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L8) + +*** + +### token + +> **token**: `Address` + +Defined in: [packages/paymaster/src/V4/SuperPaymasterClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/SuperPaymasterClient.ts#L7) diff --git a/api/@aastar/sdk/type-aliases/InitConfig.md b/api/@aastar/sdk/type-aliases/InitConfig.md new file mode 100644 index 000000000..253a0a26d --- /dev/null +++ b/api/@aastar/sdk/type-aliases/InitConfig.md @@ -0,0 +1,51 @@ +> **InitConfig** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L19) + +## Properties + +### approvedAlgIds + +> **approvedAlgIds**: readonly `number`[] + +Defined in: [packages/core/src/actions/airAccount.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L22) + +*** + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L21) + +*** + +### guardians + +> **guardians**: readonly \[`Address`, `Address`, `Address`\] + +Defined in: [packages/core/src/actions/airAccount.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L20) + +*** + +### initialTokenConfigs + +> **initialTokenConfigs**: readonly [`TokenConfig`](TokenConfig.md)[] + +Defined in: [packages/core/src/actions/airAccount.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L25) + +*** + +### initialTokens + +> **initialTokens**: readonly `Address`[] + +Defined in: [packages/core/src/actions/airAccount.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L24) + +*** + +### minDailyLimit + +> **minDailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L23) diff --git a/api/@aastar/sdk/type-aliases/LegacyCommunityClient.md b/api/@aastar/sdk/type-aliases/LegacyCommunityClient.md new file mode 100644 index 000000000..44b291c65 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/LegacyCommunityClient.md @@ -0,0 +1,44 @@ +> **LegacyCommunityClient** = [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`RegistryActions`](RegistryActions.md) & [`SBTActions`](SBTActions.md) & `object` + +Defined in: [packages/sdk/src/clients/community.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/community.ts#L32) + +## Type Declaration + +### getCommunityInfo() + +> **getCommunityInfo**: (`accountAddress`) => `Promise`\<\{ `communityData`: \{ `description`: `string`; `ensName`: `string`; `name`: `string`; `website`: `string`; \} \| `null`; `hasRole`: `boolean`; `tokenAddress`: `Address` \| `null`; \}\> + +Query community registration status and token information +Returns null if not registered, otherwise returns community details + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `Address` | + +#### Returns + +`Promise`\<\{ `communityData`: \{ `description`: `string`; `ensName`: `string`; `name`: `string`; `website`: `string`; \} \| `null`; `hasRole`: `boolean`; `tokenAddress`: `Address` \| `null`; \}\> + +### launch() + +> **launch**: (`args`) => `Promise`\<\{ `tokenAddress`: `Address`; `txs`: [`Hex`](https://viem.sh/docs/index.html)[]; \}\> + +High-level API to launch a community with automatic roleData generation + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `description?`: `string`; `logoURI?`: `string`; `name`: `string`; `tokenName`: `string`; `tokenSymbol`: `string`; `website?`: `string`; \} | +| `args.description?` | `string` | +| `args.logoURI?` | `string` | +| `args.name` | `string` | +| `args.tokenName` | `string` | +| `args.tokenSymbol` | `string` | +| `args.website?` | `string` | + +#### Returns + +`Promise`\<\{ `tokenAddress`: `Address`; `txs`: [`Hex`](https://viem.sh/docs/index.html)[]; \}\> diff --git a/api/@aastar/sdk/type-aliases/NetworkContracts.md b/api/@aastar/sdk/type-aliases/NetworkContracts.md new file mode 100644 index 000000000..a6b930a03 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/NetworkContracts.md @@ -0,0 +1,5 @@ +> **NetworkContracts** = *typeof* [`SEPOLIA_CONTRACTS`](../variables/SEPOLIA_CONTRACTS.md) + +Defined in: [packages/core/src/contracts.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L116) + +Contract addresses for a specific network diff --git a/api/@aastar/sdk/type-aliases/NetworkId.md b/api/@aastar/sdk/type-aliases/NetworkId.md new file mode 100644 index 000000000..c864a1e90 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/NetworkId.md @@ -0,0 +1,5 @@ +> **NetworkId** = `` `eip155:${number}` `` \| `` `solana:${string}` `` + +Defined in: [packages/x402/src/types.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L10) + +CAIP-2 network identifier (e.g. "eip155:11155111" for Sepolia) diff --git a/api/@aastar/sdk/type-aliases/OperatorClient.md b/api/@aastar/sdk/type-aliases/OperatorClient.md new file mode 100644 index 000000000..ea5330719 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/OperatorClient.md @@ -0,0 +1,117 @@ +> **OperatorClient** = [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`PublicActions`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html), [`Account`](https://viem.sh/docs/index.html) \| `undefined`\> & [`RegistryActions`](RegistryActions.md) & [`SuperPaymasterActions`](SuperPaymasterActions.md) & [`PaymasterActions`](PaymasterActions.md) & [`StakingActions`](StakingActions.md) & `object` + +Defined in: [packages/sdk/src/clients/operator.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/clients/operator.ts#L25) + +## Type Declaration + +### configureOperator() + +> **configureOperator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `treasury`: `Address`; `xPNTsToken`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.treasury` | `Address` | +| `args.xPNTsToken` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### deployPaymasterV4() + +> **deployPaymasterV4**: (`args?`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `initData?`: [`Hex`](https://viem.sh/docs/index.html); `version?`: `string`; \} | +| `args.initData?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.version?` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### getOperatorStatus() + +> **getOperatorStatus**: (`accountAddress`) => `Promise`\<\{ `paymasterV4`: \{ `address`: `Address`; `balance`: `bigint`; \} \| `null`; `superPaymaster`: \{ `balance`: `bigint`; `exchangeRate`: `bigint`; `hasRole`: `boolean`; `isConfigured`: `boolean`; `treasury`: `Address`; \} \| `null`; `type`: `"super"` \| `"v4"` \| `null`; \}\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `accountAddress` | `Address` | + +#### Returns + +`Promise`\<\{ `paymasterV4`: \{ `address`: `Address`; `balance`: `bigint`; \} \| `null`; `superPaymaster`: \{ `balance`: `bigint`; `exchangeRate`: `bigint`; `hasRole`: `boolean`; `isConfigured`: `boolean`; `treasury`: `Address`; \} \| `null`; `type`: `"super"` \| `"v4"` \| `null`; \}\> + +### onboardOperator() + +> **onboardOperator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)[]\> + +Orchestrates the full onboarding flow: +1. Approve GToken (Stake) +2. Register Role (Stake Lock) +3. Approve aPNTs (Deposit) +4. Deposit aPNTs (SuperPaymaster) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `depositAmount`: `bigint`; `roleData?`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; \} | +| `args.depositAmount` | `bigint` | +| `args.roleData?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)[]\> + +### ~~onboardToSuperPaymaster()~~ + +> **onboardToSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)[]\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `depositAmount`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; \} | +| `args.depositAmount` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)[]\> + +#### Deprecated + +Use onboardOperator + +### setup() + +> **setup**: (`args`) => `Promise`\<\{ `txs`: [`Hash`](https://viem.sh/docs/index.html)[]; \}\> + +High-level API: Setup operator with automatic funding and onboarding + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `depositAmount`: `bigint`; `roleData?`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; \} | +| `args.depositAmount` | `bigint` | +| `args.roleData?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | + +#### Returns + +`Promise`\<\{ `txs`: [`Hash`](https://viem.sh/docs/index.html)[]; \}\> diff --git a/api/@aastar/sdk/type-aliases/OperatorConfig.md b/api/@aastar/sdk/type-aliases/OperatorConfig.md new file mode 100644 index 000000000..af48b5d7e --- /dev/null +++ b/api/@aastar/sdk/type-aliases/OperatorConfig.md @@ -0,0 +1,75 @@ +> **OperatorConfig** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L41) + +## Properties + +### aPNTsBalance + +> **aPNTsBalance**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L42) + +*** + +### isConfigured + +> **isConfigured**: `boolean` + +Defined in: [packages/core/src/actions/superPaymaster.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L44) + +*** + +### isPaused + +> **isPaused**: `boolean` + +Defined in: [packages/core/src/actions/superPaymaster.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L45) + +*** + +### minTxInterval + +> **minTxInterval**: `number` + +Defined in: [packages/core/src/actions/superPaymaster.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L48) + +*** + +### reputation + +> **reputation**: `number` + +Defined in: [packages/core/src/actions/superPaymaster.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L47) + +*** + +### totalSpent + +> **totalSpent**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L50) + +*** + +### totalTxSponsored + +> **totalTxSponsored**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L51) + +*** + +### treasury + +> **treasury**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L49) + +*** + +### xPNTsToken + +> **xPNTsToken**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L46) diff --git a/api/@aastar/sdk/type-aliases/OperatorMode.md b/api/@aastar/sdk/type-aliases/OperatorMode.md new file mode 100644 index 000000000..0ab8d1a90 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/OperatorMode.md @@ -0,0 +1,12 @@ +> **OperatorMode** = `"AOA"` \| `"AOA+"` + +Defined in: [packages/core/src/requirementChecker.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/requirementChecker.ts#L20) + +Operator onboarding mode (matches the codebase's paymaster model). +- `AOA` — an INDEPENDENT paymaster operator running their own PaymasterV4 + (role `ROLE_PAYMASTER_AOA`). Readiness = that role + a GToken role stake. +- `AOA+` — a SHARED SuperPaymaster operator (role `ROLE_PAYMASTER_SUPER`). + Readiness = that role + a GToken role stake + a community-issued SBT. + +In both modes the "stake" is the on-chain `getRoleStake(roleId, operator)` +recorded by the Registry — NOT the operator's plain GToken wallet balance. diff --git a/api/@aastar/sdk/type-aliases/P256SessionState.md b/api/@aastar/sdk/type-aliases/P256SessionState.md new file mode 100644 index 000000000..49910e1ed --- /dev/null +++ b/api/@aastar/sdk/type-aliases/P256SessionState.md @@ -0,0 +1,27 @@ +> **P256SessionState** = `object` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L7) + +## Properties + +### callCount + +> **callCount**: `number` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L9) + +*** + +### prevCount + +> **prevCount**: `number` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L10) + +*** + +### windowStart + +> **windowStart**: `number` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L8) diff --git a/api/@aastar/sdk/type-aliases/PaymasterActions.md b/api/@aastar/sdk/type-aliases/PaymasterActions.md new file mode 100644 index 000000000..235948a6f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymasterActions.md @@ -0,0 +1,785 @@ +> **PaymasterActions** = `object` + +Defined in: [packages/core/src/actions/paymaster.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L6) + +## Properties + +### addDeposit() + +> **addDeposit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L63) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `value?`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.value?` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### addStake() + +> **addStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `unstakeDelaySec`: `number`; `value?`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.unstakeDelaySec` | `number` | +| `args.value?` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### balances() + +> **balances**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L10) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; `user`: `Address`; \} | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### cachedPrice() + +> **cachedPrice**: () => `Promise`\<\{ `price`: `bigint`; `updatedAt`: `number`; \}\> + +Defined in: [packages/core/src/actions/paymaster.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L34) + +#### Returns + +`Promise`\<\{ `price`: `bigint`; `updatedAt`: `number`; \}\> + +*** + +### calculateCost() + +> **calculateCost**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L38) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `gasCost`: `bigint`; `token`: `Address`; `useRealtime`: `boolean`; \} | +| `args.gasCost` | `bigint` | +| `args.token` | `Address` | +| `args.useRealtime` | `boolean` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### deactivateFromRegistry() + +> **deactivateFromRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### depositFor() + +> **depositFor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L8) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### entryPoint() + +> **entryPoint**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/paymaster.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L70) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ethUsdPriceFeed() + +> **ethUsdPriceFeed**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/paymaster.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L47) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~getRealtimeTokenCost()~~ + +> **getRealtimeTokenCost**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L37) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `gasCost`: `bigint`; `token`: `Address`; \} | +| `args.gasCost` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +The deployed Paymaster ABI has no `getRealtimeTokenCost` — this wrapper now calls `calculateCost(gasCost, token, true)` (realtime mode). Prefer [calculateCost](#calculatecost). + +*** + +### initialize() + +> **initialize**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L22) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `_entryPoint`: `Address`; `_ethUsdPriceFeed`: `Address`; `_maxGasCostCap`: `bigint`; `_owner`: `Address`; `_priceStalenessThreshold`: `bigint`; `_serviceFeeRate`: `bigint`; `_treasury`: `Address`; `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args._entryPoint` | `Address` | +| `args._ethUsdPriceFeed` | `Address` | +| `args._maxGasCostCap` | `bigint` | +| `args._owner` | `Address` | +| `args._priceStalenessThreshold` | `bigint` | +| `args._serviceFeeRate` | `bigint` | +| `args._treasury` | `Address` | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### isActiveInRegistry() + +> **isActiveInRegistry**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/paymaster.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L41) + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isRegistrySet() + +> **isRegistrySet**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/paymaster.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L42) + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### MAX\_ETH\_USD\_PRICE() + +> **MAX\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L56) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MAX\_GAS\_TOKENS() + +> **MAX\_GAS\_TOKENS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L58) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MAX\_SBTS() + +> **MAX\_SBTS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L59) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MAX\_SERVICE\_FEE() + +> **MAX\_SERVICE\_FEE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L60) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### maxGasCostCap() + +> **maxGasCostCap**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L49) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MIN\_ETH\_USD\_PRICE() + +> **MIN\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L57) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### oracleDecimals() + +> **oracleDecimals**: () => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/paymaster.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L52) + +#### Returns + +`Promise`\<`number`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/paymaster.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L73) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pause() + +> **pause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L29) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### paused() + +> **paused**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/paymaster.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L31) + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### postOp() + +> **postOp**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `actualGasCost`: `bigint`; `actualUserOpFeePerGas`: `bigint`; `context`: [`Hex`](https://viem.sh/docs/index.html); `mode`: `number`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.actualGasCost` | `bigint` | +| `args.actualUserOpFeePerGas` | `bigint` | +| `args.context` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.mode` | `number` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### priceStalenessThreshold() + +> **priceStalenessThreshold**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L50) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### registry() + +> **registry**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/paymaster.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L44) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L75) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### serviceFeeRate() + +> **serviceFeeRate**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L48) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### setCachedPrice() + +> **setCachedPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L14) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `price`: `bigint`; `timestamp`: `number`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.price` | `bigint` | +| `args.timestamp` | `number` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setMaxGasCostCap() + +> **setMaxGasCostCap**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `_maxGasCostCap`: `bigint`; `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args._maxGasCostCap` | `bigint` | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setPriceStalenessThreshold() + +> **setPriceStalenessThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `_priceStalenessThreshold`: `bigint`; `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args._priceStalenessThreshold` | `bigint` | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setServiceFeeRate() + +> **setServiceFeeRate**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L24) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `_serviceFeeRate`: `bigint`; `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args._serviceFeeRate` | `bigint` | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setTokenPrice() + +> **setTokenPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L13) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `price`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.price` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setTreasury() + +> **setTreasury**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `treasury`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.treasury` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### tokenDecimals() + +> **tokenDecimals**: (`args`) => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/paymaster.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L53) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`number`\> + +*** + +### tokenPrices() + +> **tokenPrices**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/paymaster.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L74) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### treasury() + +> **treasury**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/paymaster.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L51) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### unlockStake() + +> **unlockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L66) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### unpause() + +> **unpause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updatePrice() + +> **updatePrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L35) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### validatePaymasterUserOp() + +> **validatePaymasterUserOp**: (`args`) => `Promise`\<\{ `context`: [`Hex`](https://viem.sh/docs/index.html); `validationData`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/paymaster.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `maxCost`: `bigint`; `userOp`: `any`; `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.maxCost` | `bigint` | +| `args.userOp` | `any` | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `context`: [`Hex`](https://viem.sh/docs/index.html); `validationData`: `bigint`; \}\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/paymaster.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L76) + +#### Returns + +`Promise`\<`string`\> + +*** + +### withdraw() + +> **withdraw**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawStake() + +> **withdrawStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawTo() + +> **withdrawTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/paymaster.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/paymaster.ts#L64) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/PaymasterConfig.md b/api/@aastar/sdk/type-aliases/PaymasterConfig.md new file mode 100644 index 000000000..73c047b9d --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymasterConfig.md @@ -0,0 +1,43 @@ +> **PaymasterConfig** = `object` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L4) + +## Properties + +### maxRate? + +> `optional` **maxRate**: `bigint` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L7) + +*** + +### operator + +> **operator**: `Address` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L6) + +*** + +### paymasterAddress + +> **paymasterAddress**: `Address` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L5) + +*** + +### postOpGasLimit? + +> `optional` **postOpGasLimit**: `bigint` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L9) + +*** + +### verificationGasLimit? + +> `optional` **verificationGasLimit**: `bigint` + +Defined in: [packages/paymaster/src/SuperPaymaster/index.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/SuperPaymaster/index.ts#L8) diff --git a/api/@aastar/sdk/type-aliases/PaymasterFactoryActions.md b/api/@aastar/sdk/type-aliases/PaymasterFactoryActions.md new file mode 100644 index 000000000..f20608821 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymasterFactoryActions.md @@ -0,0 +1,413 @@ +> **PaymasterFactoryActions** = `object` + +Defined in: [packages/core/src/actions/factory.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L55) + +## Properties + +### addImplementation() + +> **addImplementation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L71) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `impl`: `Address`; `version`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.impl` | `Address` | +| `args.version` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### calculateAddress() + +> **calculateAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L61) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### defaultVersion() + +> **defaultVersion**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/factory.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L89) + +#### Returns + +`Promise`\<`string`\> + +*** + +### deployPaymaster() + +> **deployPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L57) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `initData?`: [`Hex`](https://viem.sh/docs/index.html); `version?`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.initData?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.version?` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### deployPaymasterDeterministic() + +> **deployPaymasterDeterministic**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L58) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `initData`: [`Hex`](https://viem.sh/docs/index.html); `salt`: [`Hex`](https://viem.sh/docs/index.html); `version`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.initData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.salt` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.version` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~ENTRY\_POINT()~~ + +> **ENTRY\_POINT**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L82) + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +Removed in the v5.x contract refactor — PaymasterFactory has no `ENTRY_POINT` constant. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### getAllPaymasters() + +> **getAllPaymasters**: () => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/factory.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L66) + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getImplementation() + +> **getImplementation**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L75) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `version`: `string`; \} | +| `args.version` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getImplementationV4() + +> **getImplementationV4**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L76) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getOperatorByPaymaster() + +> **getOperatorByPaymaster**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L64) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `paymaster`: `Address`; \} | +| `args.paymaster` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getPaymaster() + +> **getPaymaster**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L62) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getPaymasterByOperator() + +> **getPaymasterByOperator**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L63) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getPaymasterCount() + +> **getPaymasterCount**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/factory.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L65) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### hasPaymaster() + +> **hasPaymaster**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/factory.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isPaymasterDeployed() + +> **isPaymasterDeployed**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/factory.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L85) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L80) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### setDefaultVersion() + +> **setDefaultVersion**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L73) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `version`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.version` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setImplementationV4() + +> **setImplementationV4**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:74](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L74) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `impl`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.impl` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setRegistry() + +> **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L77) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### totalDeployed() + +> **totalDeployed**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/factory.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L90) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L86) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### upgradeImplementation() + +> **upgradeImplementation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L72) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `impl`: `Address`; `version`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.impl` | `Address` | +| `args.version` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/factory.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L91) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/PaymasterType.md b/api/@aastar/sdk/type-aliases/PaymasterType.md new file mode 100644 index 000000000..7400cd96e --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymasterType.md @@ -0,0 +1,7 @@ +> **PaymasterType** = `"v4"` \| `"super"` + +Defined in: [packages/paymaster/src/PaymasterManager.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/PaymasterManager.ts#L12) + +Supported paymaster types. +- 'v4' → PaymasterV4 layout (84 bytes): [paymaster(20)][verGas(16)][postGas(16)][token(20)][validUntil(6)][validAfter(6)] +- 'super' → SuperPaymaster layout (104 bytes): [paymaster(20)][verGas(16)][postGas(16)][operator(20)][maxRate(32)] diff --git a/api/@aastar/sdk/type-aliases/PaymasterV4MiddlewareConfig.md b/api/@aastar/sdk/type-aliases/PaymasterV4MiddlewareConfig.md new file mode 100644 index 000000000..84947f996 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymasterV4MiddlewareConfig.md @@ -0,0 +1,35 @@ +> **PaymasterV4MiddlewareConfig** = `object` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L3) + +## Properties + +### gasToken + +> **gasToken**: `Address` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L5) + +*** + +### paymasterAddress + +> **paymasterAddress**: `Address` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L4) + +*** + +### postOpGasLimit? + +> `optional` **postOpGasLimit**: `bigint` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L7) + +*** + +### verificationGasLimit? + +> `optional` **verificationGasLimit**: `bigint` + +Defined in: [packages/paymaster/src/V4/PaymasterUtils.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/paymaster/src/V4/PaymasterUtils.ts#L6) diff --git a/api/@aastar/sdk/type-aliases/PaymentPayload.md b/api/@aastar/sdk/type-aliases/PaymentPayload.md new file mode 100644 index 000000000..1cb99a841 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymentPayload.md @@ -0,0 +1,54 @@ +> **PaymentPayload** = `object` + +Defined in: [packages/x402/src/types.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L64) + +Client payment payload — PAYMENT-SIGNATURE header. +Client sends this on retry request. + +## Properties + +### accepted + +> **accepted**: [`PaymentRequirements`](PaymentRequirements.md) + +Defined in: [packages/x402/src/types.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L67) + +*** + +### extensions? + +> `optional` **extensions**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/x402/src/types.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L72) + +*** + +### payload + +> **payload**: `object` + +Defined in: [packages/x402/src/types.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L68) + +#### authorization + +> **authorization**: [`EIP3009Authorization`](EIP3009Authorization.md) + +#### signature + +> **signature**: [`Hex`](https://viem.sh/docs/index.html) + +*** + +### resource? + +> `optional` **resource**: [`ResourceInfo`](ResourceInfo.md) + +Defined in: [packages/x402/src/types.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L66) + +*** + +### x402Version + +> **x402Version**: `2` + +Defined in: [packages/x402/src/types.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L65) diff --git a/api/@aastar/sdk/type-aliases/PaymentRequired.md b/api/@aastar/sdk/type-aliases/PaymentRequired.md new file mode 100644 index 000000000..576df78f8 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymentRequired.md @@ -0,0 +1,46 @@ +> **PaymentRequired** = `object` + +Defined in: [packages/x402/src/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L40) + +402 response body / PAYMENT-REQUIRED header. +Server sends this to indicate payment is needed. + +## Properties + +### accepts + +> **accepts**: [`PaymentRequirements`](PaymentRequirements.md)[] + +Defined in: [packages/x402/src/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L44) + +*** + +### error? + +> `optional` **error**: `string` + +Defined in: [packages/x402/src/types.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L42) + +*** + +### extensions? + +> `optional` **extensions**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/x402/src/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L45) + +*** + +### resource + +> **resource**: [`ResourceInfo`](ResourceInfo.md) + +Defined in: [packages/x402/src/types.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L43) + +*** + +### x402Version + +> **x402Version**: `2` + +Defined in: [packages/x402/src/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L41) diff --git a/api/@aastar/sdk/type-aliases/PaymentRequirements.md b/api/@aastar/sdk/type-aliases/PaymentRequirements.md new file mode 100644 index 000000000..030fcabe1 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PaymentRequirements.md @@ -0,0 +1,70 @@ +> **PaymentRequirements** = `object` + +Defined in: [packages/x402/src/types.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L23) + +Payment requirements — one option in the `accepts` array. +Matches @x402/core PaymentRequirements. + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/x402/src/types.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L27) + +*** + +### asset + +> **asset**: `Address` + +Defined in: [packages/x402/src/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L26) + +*** + +### extra + +> **extra**: `object` + +Defined in: [packages/x402/src/types.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L30) + +#### name + +> **name**: `string` + +#### version + +> **version**: `string` + +*** + +### maxTimeoutSeconds + +> **maxTimeoutSeconds**: `number` + +Defined in: [packages/x402/src/types.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L29) + +*** + +### network + +> **network**: [`NetworkId`](NetworkId.md) + +Defined in: [packages/x402/src/types.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L25) + +*** + +### payTo + +> **payTo**: `Address` + +Defined in: [packages/x402/src/types.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L28) + +*** + +### scheme + +> **scheme**: `"exact"` \| `"upto"` + +Defined in: [packages/x402/src/types.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L24) diff --git a/api/@aastar/sdk/type-aliases/PendingExit.md b/api/@aastar/sdk/type-aliases/PendingExit.md new file mode 100644 index 000000000..fa592cf85 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PendingExit.md @@ -0,0 +1,43 @@ +> **PendingExit** = `object` + +Defined in: [packages/core/src/actions/forceExit.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L7) + +## Properties + +### approvalBitmap + +> **approvalBitmap**: `bigint` + +Defined in: [packages/core/src/actions/forceExit.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L12) + +*** + +### data + +> **data**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/forceExit.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L10) + +*** + +### proposedAt + +> **proposedAt**: `bigint` + +Defined in: [packages/core/src/actions/forceExit.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L11) + +*** + +### target + +> **target**: `Address` + +Defined in: [packages/core/src/actions/forceExit.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L8) + +*** + +### value + +> **value**: `bigint` + +Defined in: [packages/core/src/actions/forceExit.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/forceExit.ts#L9) diff --git a/api/@aastar/sdk/type-aliases/PendingModuleInstall.md b/api/@aastar/sdk/type-aliases/PendingModuleInstall.md new file mode 100644 index 000000000..6b8a88e56 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PendingModuleInstall.md @@ -0,0 +1,43 @@ +> **PendingModuleInstall** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L29) + +## Properties + +### executeAfter + +> **executeAfter**: `number` + +Defined in: [packages/core/src/actions/airAccount.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L33) + +*** + +### initDataHash + +> **initDataHash**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/actions/airAccount.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L34) + +*** + +### module + +> **module**: `Address` + +Defined in: [packages/core/src/actions/airAccount.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L30) + +*** + +### moduleTypeId + +> **moduleTypeId**: `number` + +Defined in: [packages/core/src/actions/airAccount.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L31) + +*** + +### proposedAt + +> **proposedAt**: `number` + +Defined in: [packages/core/src/actions/airAccount.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L32) diff --git a/api/@aastar/sdk/type-aliases/PolicyRegistryActions.md b/api/@aastar/sdk/type-aliases/PolicyRegistryActions.md new file mode 100644 index 000000000..7e46c8ccd --- /dev/null +++ b/api/@aastar/sdk/type-aliases/PolicyRegistryActions.md @@ -0,0 +1,428 @@ +> **PolicyRegistryActions** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L75) + +## Properties + +### checkPolicy() + +> **checkPolicy**: (`args`) => `Promise`\<\{ `decision`: [`PolicyDecision`](../enumerations/PolicyDecision.md); `remainingDaily`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L83) + +Validation-time policy decision for one intended action. OPT-IN, default-ALLOW: +a sender with nothing configured for (asset, target) is UNRESTRICTED. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `amount`: `bigint`; `asset`: `Address`; `selector`: [`Hex`](https://viem.sh/docs/index.html); `sender`: `Address`; `target`: `Address`; \} | +| `args.amount` | `bigint` | +| `args.asset` | `Address` | +| `args.selector` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<\{ `decision`: [`PolicyDecision`](../enumerations/PolicyDecision.md); `remainingDaily`: `bigint`; \}\> + +decision (see [PolicyDecision](../enumerations/PolicyDecision.md)) + `remainingDaily` headroom in the + current window AFTER `amount` would post (`type(uint256).max` when unrestricted). + +*** + +### DEFAULT\_WINDOW() + +> **DEFAULT\_WINDOW**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L106) + +Default daily-limit window length (seconds) used when `windowSeconds == 0`. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### ETH\_SENTINEL() + +> **ETH\_SENTINEL**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L108) + +The ETH sentinel address used as `asset` for native ETH (address(0) is invalid). + +#### Returns + +`Promise`\<`Address`\> + +*** + +### freezeSender() + +> **freezeSender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L129) + +Immediately freeze `sender`: [checkPolicy](#checkpolicy) returns REJECT for all ops. +`onlyGuardianOrTimelock` (guardian = AirAccount 2-of-3 RecoveryService). Lifting +the freeze is a loosening → [unfreezeSender](#unfreezesender) (timelocked). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getAssetPolicy() + +> **getAssetPolicy**: (`args`) => `Promise`\<[`AssetPolicy`](AssetPolicy.md)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L86) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `asset`: `Address`; `sender`: `Address`; \} | +| `args.asset` | `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`AssetPolicy`](AssetPolicy.md)\> + +*** + +### getAssetSpend() + +> **getAssetSpend**: (`args`) => `Promise`\<[`SpendCounter`](SpendCounter.md)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L90) + +Cumulative native-unit spend + window start for this (sender, asset). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `asset`: `Address`; `sender`: `Address`; \} | +| `args.asset` | `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`SpendCounter`](SpendCounter.md)\> + +*** + +### getContractScope() + +> **getContractScope**: (`args`) => `Promise`\<[`ContractScope`](ContractScope.md)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L87) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `sender`: `Address`; `target`: `Address`; \} | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`ContractScope`](ContractScope.md)\> + +*** + +### guardian() + +> **guardian**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L96) + +AirAccount 2-of-3 RecoveryService allowed to freeze/tighten immediately. + +#### Returns + +`Promise`\<`Address`\> + +*** + +### isAuthorizedConsumer() + +> **isAuthorizedConsumer**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L92) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `consumer`: `Address`; \} | +| `args.consumer` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isFrozen() + +> **isFrozen**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L91) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `sender`: `Address`; \} | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isSelectorAllowed() + +> **isSelectorAllowed**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L88) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `selector`: [`Hex`](https://viem.sh/docs/index.html); `sender`: `Address`; `target`: `Address`; \} | +| `args.selector` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### setAssetPolicy() + +> **setAssetPolicy**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:141](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L141) + +Set a (sender, asset) policy. `onlyTimelock` — reverts unless `msg.sender ==` +[timelock](#timelock)`()`. There is NO registry-level pending store: the 2-day delay is +the EXTERNAL OZ {TimelockController}'s own `minDelay`. To loosen, governance must +`schedule()` this call on the timelock, wait out the delay, then `execute()` it +(which makes the timelock call back here). Calling this directly with an EOA/owner +key will revert `NotTimelock`. Read [timelock](#timelock) for the controller address and +surface its scheduled-operation ETA (TimelockController.getTimestamp) to callers. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `asset`: `Address`; `params`: [`AssetPolicyInput`](AssetPolicyInput.md); `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.asset` | `Address` | +| `args.params` | [`AssetPolicyInput`](AssetPolicyInput.md) | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setConsumerAuthorization() + +> **setConsumerAuthorization**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:161](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L161) + +Authorize / revoke a staked consumer permitted to call `recordSpend`. +`onlyTimelock` — route through [timelock](#timelock). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorized`: `boolean`; `consumer`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorized` | `boolean` | +| `args.consumer` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setContractScope() + +> **setContractScope**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L148) + +Set a (sender, target) scope and ADD the listed selectors (additive union, NOT +replace; remove via [tightenContractScope](#tightencontractscope)). `onlyTimelock` — same external +TimelockController gating as [setAssetPolicy](#setassetpolicy); calling directly reverts +`NotTimelock`. Schedule + execute through [timelock](#timelock). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `params`: [`ContractScopeInput`](ContractScopeInput.md); `sender`: `Address`; `target`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.params` | [`ContractScopeInput`](ContractScopeInput.md) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setGuardian() + +> **setGuardian**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:156](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L156) + +Set the guardian. `onlyTimelock` — route through [timelock](#timelock). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newGuardian`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newGuardian` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### tightenAssetPolicy() + +> **tightenAssetPolicy**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L117) + +Immediately tighten a (sender, asset) policy. Reverts `NotStrictlyTighter` +unless the new params are <= current on every dimension. Callable by the +guardian or the timelock (`onlyGuardianOrTimelock`) — NO timelock delay. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `asset`: `Address`; `params`: [`AssetPolicyInput`](AssetPolicyInput.md); `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.asset` | `Address` | +| `args.params` | [`AssetPolicyInput`](AssetPolicyInput.md) | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### tightenContractScope() + +> **tightenContractScope**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L123) + +Immediately tighten a (sender, target) scope (disallow target, remove selectors, +lower velocity, set requireDVTAlways). Reverts unless strictly tighter. +`onlyGuardianOrTimelock` — NO timelock delay. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `params`: [`ContractScopeInput`](ContractScopeInput.md); `sender`: `Address`; `target`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.params` | [`ContractScopeInput`](ContractScopeInput.md) | +| `args.sender` | `Address` | +| `args.target` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### timelock() + +> **timelock**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L104) + +The OZ {TimelockController} whose `minDelay` (2 days) gates every loosening. +It is the ONLY address allowed to call the `onlyTimelock` loosen/admin setters +([setAssetPolicy](#setassetpolicy) / [setContractScope](#setcontractscope) / [unfreezeSender](#unfreezesender) / +[setGuardian](#setguardian) / [setConsumerAuthorization](#setconsumerauthorization)). Read this to find the +controller through which loosen calls must be scheduled + executed. + +#### Returns + +`Promise`\<`Address`\> + +*** + +### unfreezeSender() + +> **unfreezeSender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L154) + +Lift a freeze on `sender`. Unfreeze is a loosening → `onlyTimelock`; must be +scheduled + executed through the external [timelock](#timelock) controller (2-day delay). +Calling directly reverts `NotTimelock`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `sender`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.sender` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/policyRegistry.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L109) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/RegistryActions.md b/api/@aastar/sdk/type-aliases/RegistryActions.md new file mode 100644 index 000000000..98287eaf5 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/RegistryActions.md @@ -0,0 +1,1300 @@ +> **RegistryActions** = `object` + +Defined in: [packages/core/src/actions/registry.ts:140](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L140) + +## Properties + +### ~~addLevelThreshold()~~ + +> **addLevelThreshold**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:178](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L178) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `threshold`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.threshold` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — there is no append-one `addLevelThreshold` (only the replace-all [setLevelThresholds](#setlevelthresholds)). Throws ErrorCode.NOT\_IMPLEMENTED; read [levelThresholds](#levelthresholds), append, and call [setLevelThresholds](#setlevelthresholds). + +*** + +### batchUpdateGlobalReputation() + +> **batchUpdateGlobalReputation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L179) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `epoch`: `bigint`; `newScores`: `bigint`[]; `proof`: [`Hex`](https://viem.sh/docs/index.html); `proposalId`: `bigint`; `users`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.epoch` | `bigint` | +| `args.newScores` | `bigint`[] | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.proposalId` | `bigint` | +| `args.users` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### blacklistNonce() + +> **blacklistNonce**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:192](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L192) + +Monotonic nonce bumped on each operator-blacklist update (view). ABI: blacklistNonce() -> uint256. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### blsAggregator() + +> **blsAggregator**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L201) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~calculateExitFee()~~ + +> **calculateExitFee**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:254](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L254) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `amount`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.amount` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — Registry has no exit-fee calculator. Throws ErrorCode.NOT\_IMPLEMENTED; use the GTokenStaking `previewExitFee({ user, roleId })` action instead. + +*** + +### ~~communityByENS()~~ + +> **communityByENS**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:164](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L164) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `ensName`: `string`; \} | +| `args.ensName` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +The deployed v5 Registry ABI has no `communityByENS` function — use [getCommunityByENS](#getcommunitybyens). This wrapper now delegates to `getCommunityByENS` so it no longer reverts on-chain. + +*** + +### ~~communityByName()~~ + +> **communityByName**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L162) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `name`: `string`; \} | +| `args.name` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +The deployed v5 Registry ABI has no `communityByName` function — use [getCommunityByName](#getcommunitybyname). This wrapper now delegates to `getCommunityByName` so it no longer reverts on-chain. + +*** + +### configureRole() + +> **configureRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L142) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`RoleConfigDetailed`](RoleConfigDetailed.md); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`RoleConfigDetailed`](RoleConfigDetailed.md) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~createNewRole()~~ + +> **createNewRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:145](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L145) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `config`: [`RoleConfigDetailed`](RoleConfigDetailed.md); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `roleOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.config` | [`RoleConfigDetailed`](RoleConfigDetailed.md) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +The deployed Registry ABI has no `createNewRole` — this wrapper now calls `configureRole(roleId, config)` with `roleOwner` merged into `config.owner`. Prefer [configureRole](#configurerole). + +*** + +### creditTierConfig() + +> **creditTierConfig**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:251](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L251) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tierIndex`: `bigint`; \} | +| `args.tierIndex` | `bigint` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### exitRole() + +> **exitRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:156](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L156) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getCommunityByENS() + +> **getCommunityByENS**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L167) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `ensName`: `string`; \} | +| `args.ensName` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getCommunityByName() + +> **getCommunityByName**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:166](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L166) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `name`: `string`; \} | +| `args.name` | `string` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getCommunityProfile() + +> **getCommunityProfile**: (`args`) => `Promise`\<[`CommunityProfile`](CommunityProfile.md) \| `null`\> + +Defined in: [packages/core/src/actions/registry.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L172) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `fromBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); `toBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); \} | +| `args.community` | `Address` | +| `args.fromBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | +| `args.toBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`CommunityProfile`](CommunityProfile.md) \| `null`\> + +*** + +### getCreditLimit() + +> **getCreditLimit**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L175) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getEffectiveStake() + +> **getEffectiveStake**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L170) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getRoleConfig() + +> **getRoleConfig**: (`args`) => `Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> + +Defined in: [packages/core/src/actions/registry.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L151) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> + +*** + +### getRoleMemberCount() + +> **getRoleMemberCount**: (`args`) => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/registry.ts:243](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L243) + +Count of active members for a role, derived from the same event indexing as +[getRoleMembers](#getrolemembers) (i.e. `getRoleMembers(...).length`). + +NOTE: this differs from [getRoleUserCount](#getroleusercount), which reads the on-chain +`roleMembers[roleId].length` counter directly. Prefer `getRoleUserCount` when you +only need a count and an authoritative on-chain value is acceptable; use this when +you also need the member addresses or want a count consistent with `getRoleMembers` +over a specific block range. Subject to the same `getLogs` truncation caveat as +[getRoleMembers](#getrolemembers) — prefer `getRoleUserCount` for an authoritative count. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `fromBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `toBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); \} | +| `args.fromBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.toBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`number`\> + +*** + +### getRoleMembers() + +> **getRoleMembers**: (`args`) => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/registry.ts:231](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L231) + +Active members of a role, derived by event indexing. + +The deployed v5 Registry slimmed its storage: there is NO `getRoleMembers` +getter in the ABI (members are not enumerable on-chain), so this is reconstructed +from the membership-lifecycle events — `RoleRegistered` (join, emitted by both +`registerRole` and `safeMintForRole`) minus `RoleExited` (exit). For each user we +keep their LATEST lifecycle event (by block number, then log index) so a user who +exited and later re-registered is correctly counted as active. + +⚠️ The result is only as complete as the underlying `getLogs` response. Many RPC +providers cap the block range or the number of logs returned and may SILENTLY +truncate — in which case the member list will be incomplete with no error. This +helper does NOT paginate. For large histories, pass a bounded `fromBlock`/`toBlock` +window (and page yourself), or use an indexed data source (subgraph/indexer). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `fromBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `toBlock?`: [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html); \} | +| `args.fromBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.toBlock?` | [`BlockNumber`](https://viem.sh/docs/index.html) \| [`BlockTag`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getRoleStake() + +> **getRoleStake**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L169) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getRoleUserCount() + +> **getRoleUserCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L214) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getUserRoles() + +> **getUserRoles**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)[]\> + +Defined in: [packages/core/src/actions/registry.ts:244](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L244) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)[]\> + +*** + +### globalReputation() + +> **globalReputation**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L176) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### ~~grantRole()~~ + +> **grantRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:274](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L274) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — the Registry dropped the OZ AccessControl surface (no `grantRole`). Throws ErrorCode.NOT\_IMPLEMENTED; use [registerRole](#registerrole) to add a user to a role. + +*** + +### GTOKEN\_STAKING() + +> **GTOKEN\_STAKING**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:204](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L204) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### hasRole() + +> **hasRole**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/registry.ts:150](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L150) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isReputationSource() + +> **isReputationSource**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/registry.ts:207](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L207) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `source`: `Address`; \} | +| `args.source` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ~~lastReputationEpoch()~~ + +> **lastReputationEpoch**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:209](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L209) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed Registry ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### levelThresholds() + +> **levelThresholds**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:252](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L252) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `levelIndex`: `bigint`; \} | +| `args.levelIndex` | `bigint` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### MYSBT() + +> **MYSBT**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L202) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:268](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L268) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### registerRole() + +> **registerRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:146](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L146) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `data`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.data` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~registerRoleSelf()~~ + +> **registerRoleSelf**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L148) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `data`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.data` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +The deployed Registry ABI has no `registerRoleSelf` — this wrapper now calls `registerRole(roleId, , data)` deriving the caller from `account`. Prefer [registerRole](#registerrole). + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:270](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L270) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~reputationSource()~~ + +> **reputationSource**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L206) + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +Removed in the v5.x contract refactor — there is no single-address `reputationSource` getter (sources are now a set). Throws ErrorCode.NOT\_IMPLEMENTED; use [isReputationSource](#isreputationsource)({ source }) to test membership. + +*** + +### ~~revokeRole()~~ + +> **revokeRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:276](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L276) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — the Registry has no admin `revokeRole` (only the caller can self-exit). Throws ErrorCode.NOT\_IMPLEMENTED; a user removes their own role via [exitRole](#exitrole). + +*** + +### ROLE\_ANODE() + +> **ROLE\_ANODE**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:265](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L265) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ROLE\_COMMUNITY() + +> **ROLE\_COMMUNITY**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:259](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L259) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ROLE\_DVT() + +> **ROLE\_DVT**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:263](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L263) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ROLE\_ENDUSER() + +> **ROLE\_ENDUSER**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:260](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L260) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ROLE\_KMS() + +> **ROLE\_KMS**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:264](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L264) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ROLE\_PAYMASTER\_AOA() + +> **ROLE\_PAYMASTER\_AOA**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:262](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L262) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ROLE\_PAYMASTER\_SUPER() + +> **ROLE\_PAYMASTER\_SUPER**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:261](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L261) + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### ~~roleConfigs()~~ + +> **roleConfigs**: (`args`) => `Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> + +Defined in: [packages/core/src/actions/registry.ts:213](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L213) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`RoleConfigDetailed`](RoleConfigDetailed.md)\> + +#### Deprecated + +The deployed Registry ABI has no `roleConfigs` mapping getter — this wrapper now reads the ABI-confirmed `getRoleConfig(roleId)`. Prefer [getRoleConfig](#getroleconfig). + +*** + +### ~~roleMembers()~~ + +> **roleMembers**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:246](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L246) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.index` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +Removed in the v5.x contract refactor — Registry storage was slimmed and members are not enumerable by index (no `roleMembers(roleId,index)` getter). Throws ErrorCode.NOT\_IMPLEMENTED; use [getRoleMembers](#getrolemembers) (event-derived) instead. + +*** + +### ~~roleMetadata()~~ + +> **roleMetadata**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:158](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L158) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — there is no per-user role-metadata getter. Throws ErrorCode.NOT\_IMPLEMENTED; use [getCommunityProfile](#getcommunityprofile) (event back-trace) for a community's roleData or [getRoleConfig](#getroleconfig) for role config. + +*** + +### ~~roleStakes()~~ + +> **roleStakes**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:256](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L256) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +The deployed Registry ABI has no `roleStakes` mapping getter — this wrapper now reads the ABI-confirmed `getRoleStake(roleId, user)`. Prefer [getRoleStake](#getrolestake). + +*** + +### safeMintForRole() + +> **safeMintForRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L149) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `data`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.data` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setBLSAggregator() + +> **setBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L195) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `aggregator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.aggregator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setCreditTier() + +> **setCreditTier**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L181) + +Set the credit limit for a reputation level/tier (owner-gated). ABI: setCreditTier(uint256 level, uint256 limit). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `level`: `bigint`; `limit`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.level` | `bigint` | +| `args.limit` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setLevelThresholds() + +> **setLevelThresholds**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L183) + +Replace the full reputation level-threshold array (owner-gated). ABI: setLevelThresholds(uint256[] thresholds). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `thresholds`: `bigint`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.thresholds` | `bigint`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setMySBT() + +> **setMySBT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L196) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `sbt`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.sbt` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setReputationSource() + +> **setReputationSource**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:199](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L199) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `source`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.source` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~setRoleLockDuration()~~ + +> **setRoleLockDuration**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:153](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L153) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `duration`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.duration` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — `roleLockDuration` is now a field of the role config. Throws ErrorCode.NOT\_IMPLEMENTED; set it via [configureRole](#configurerole) (config.roleLockDuration). + +*** + +### ~~setRoleOwner()~~ + +> **setRoleOwner**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:155](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L155) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — the role owner is now a field of the role config. Throws ErrorCode.NOT\_IMPLEMENTED; set it via [configureRole](#configurerole) (config.owner). + +*** + +### setStaking() + +> **setStaking**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L198) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `staking`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.staking` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setSuperPaymaster() + +> **setSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L197) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `paymaster`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.paymaster` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### SUPER\_PAYMASTER() + +> **SUPER\_PAYMASTER**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/registry.ts:203](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L203) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### syncExitFees() + +> **syncExitFees**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L143) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roles`: [`Hex`](https://viem.sh/docs/index.html)[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roles` | [`Hex`](https://viem.sh/docs/index.html)[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### syncStakeFromStaking() + +> **syncStakeFromStaking**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:190](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L190) + +Sync a user's role stake from the GTokenStaking contract (staking-gated). ABI: syncStakeFromStaking(address user, bytes32 roleId, uint256 newAmount). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newAmount`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newAmount` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:269](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L269) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updateOperatorBlacklist() + +> **updateOperatorBlacklist**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:188](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L188) + +Update an operator's per-user blacklist in batch with a proof. +ABI: updateOperatorBlacklist(address operator, address[] users, bool[] statuses, bytes proof). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `operator`: `Address`; `proof`: [`Hex`](https://viem.sh/docs/index.html); `statuses`: `boolean`[]; `users`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.operator` | `Address` | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.statuses` | `boolean`[] | +| `args.users` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~userRoleCount()~~ + +> **userRoleCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/registry.ts:250](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L250) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +The deployed Registry ABI has no `userRoleCount` — this wrapper now returns `getUserRoles(user).length`. Prefer [getUserRoles](#getuserroles). (NOTE: distinct from [getRoleUserCount](#getroleusercount), which counts users of a role.) + +*** + +### ~~userRoles()~~ + +> **userRoles**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/registry.ts:248](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L248) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `user`: `Address`; \} | +| `args.index` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +The deployed Registry ABI has no `userRoles(user,index)` indexed getter — this wrapper now reads `getUserRoles(user)` and returns the entry at `index`. Prefer [getUserRoles](#getuserroles). + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/registry.ts:279](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L279) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/ReputationActions.md b/api/@aastar/sdk/type-aliases/ReputationActions.md new file mode 100644 index 000000000..b871e6435 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ReputationActions.md @@ -0,0 +1,735 @@ +> **ReputationActions** = `object` + +Defined in: [packages/core/src/actions/reputation.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L20) + +## Properties + +### ~~batchSyncToRegistry()~~ + +> **batchSyncToRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L75) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `users`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.users` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — no batch sync variant. Throws ErrorCode.NOT\_IMPLEMENTED; use [syncToRegistry](#synctoregistry) (per-user, with proof). + +*** + +### ~~batchUpdateScores()~~ + +> **batchUpdateScores**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L73) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `scores`: `bigint`[]; `users`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.scores` | `bigint`[] | +| `args.users` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — no `batchUpdateScores`. Throws ErrorCode.NOT\_IMPLEMENTED; use [setCommunityReputation](#setcommunityreputation) per user or [syncToRegistry](#synctoregistry). + +*** + +### boostedCollections() + +> **boostedCollections**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/reputation.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; \} | +| `args.index` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### calculateReputation() + +> **calculateReputation**: (`args`) => `Promise`\<\{ `communityScore`: `bigint`; `globalScore`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/reputation.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L42) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `timestamp`: `bigint`; `user`: `Address`; \} | +| `args.community` | `Address` | +| `args.timestamp` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<\{ `communityScore`: `bigint`; `globalScore`: `bigint`; \}\> + +*** + +### communityActiveRules() + +> **communityActiveRules**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L37) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `index`: `bigint`; \} | +| `args.community` | `Address` | +| `args.index` | `bigint` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### communityReputations() + +> **communityReputations**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L60) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `user`: `Address`; \} | +| `args.community` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### communityRules() + +> **communityRules**: (`args`) => `Promise`\<[`ReputationRule`](ReputationRule.md)\> + +Defined in: [packages/core/src/actions/reputation.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L36) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.community` | `Address` | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ReputationRule`](ReputationRule.md)\> + +*** + +### computeScore() + +> **computeScore**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L41) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `activities`: `bigint`[][]; `communities`: `Address`[]; `ruleIds`: [`Hex`](https://viem.sh/docs/index.html)[][]; `user`: `Address`; \} | +| `args.activities` | `bigint`[][] | +| `args.communities` | `Address`[] | +| `args.ruleIds` | [`Hex`](https://viem.sh/docs/index.html)[][] | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### defaultRule() + +> **defaultRule**: () => `Promise`\<[`ReputationRule`](ReputationRule.md)\> + +Defined in: [packages/core/src/actions/reputation.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L38) + +#### Returns + +`Promise`\<[`ReputationRule`](ReputationRule.md)\> + +*** + +### ~~disableRule()~~ + +> **disableRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L29) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — rules have no enable/disable toggle. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### ~~enableRule()~~ + +> **enableRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L27) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — rules have no enable/disable toggle. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### entropyFactors() + +> **entropyFactors**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L69) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getActiveRules() + +> **getActiveRules**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)[]\> + +Defined in: [packages/core/src/actions/reputation.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)[]\> + +*** + +### ~~getCommunityScore()~~ + +> **getCommunityScore**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L59) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +NOT available on-chain. `getCommunityScore` does not exist in the deployed +ReputationSystem ABI (calling it reverts). There is no aggregate per-community score +getter — use [communityReputations](#communityreputations) (per-user community score) or +[calculateReputation](#calculatereputation) (returns `communityScore` for a given user) instead. +This method now throws a descriptive error rather than reverting on-chain. + +*** + +### ~~getEntropyFactor()~~ + +> **getEntropyFactor**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L91) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — no no-arg `getEntropyFactor`. Throws ErrorCode.NOT\_IMPLEMENTED; use [entropyFactors](#entropyfactors)({ community }). + +*** + +### getReputationBreakdown() + +> **getReputationBreakdown**: (`args`) => `Promise`\<[`ReputationBreakdown`](ReputationBreakdown.md)\> + +Defined in: [packages/core/src/actions/reputation.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `timestamp`: `bigint`; `user`: `Address`; \} | +| `args.community` | `Address` | +| `args.timestamp` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`ReputationBreakdown`](ReputationBreakdown.md)\> + +*** + +### ~~getReputationRule()~~ + +> **getReputationRule**: (`args`) => `Promise`\<[`ReputationRule`](ReputationRule.md)\> + +Defined in: [packages/core/src/actions/reputation.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`ReputationRule`](ReputationRule.md)\> + +#### Deprecated + +Removed in the v5.x contract refactor — no single-rule getter by ruleId. Throws ErrorCode.NOT\_IMPLEMENTED; use [communityRules](#communityrules) (per-community) or [defaultRule](#defaultrule). + +*** + +### ~~getRuleCount()~~ + +> **getRuleCount**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L34) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — no global rule counter. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### ~~getUserScore()~~ + +> **getUserScore**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L51) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +NOT available on-chain. `getUserScore` does not exist in the deployed +ReputationSystem ABI (calling it reverts). There is no single-argument global score +getter — use [calculateReputation](#calculatereputation) (returns `globalScore`, requires a community ++ timestamp) or read `globalReputation(user)` from the Registry contract instead. +This method now throws a descriptive error rather than reverting on-chain. + +*** + +### ~~isRuleActive()~~ + +> **isRuleActive**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/reputation.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +#### Deprecated + +Removed in the v5.x contract refactor — no `isRuleActive(ruleId)` getter (rule activity is per-community). Throws ErrorCode.NOT\_IMPLEMENTED; use [getActiveRules](#getactiverules)({ community }) and test membership. + +*** + +### MAX\_BOOSTED\_COLLECTIONS() + +> **MAX\_BOOSTED\_COLLECTIONS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L96) + +Max number of NFT collections that can grant a reputation boost (view). ABI: MAX_BOOSTED_COLLECTIONS() -> uint256. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### nftCollectionBoost() + +> **nftCollectionBoost**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `collection`: `Address`; \} | +| `args.collection` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### nftHoldStart() + +> **nftHoldStart**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/reputation.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L66) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `collection`: `Address`; `user`: `Address`; \} | +| `args.collection` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/reputation.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L99) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/reputation.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L94) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L101) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setCommunityReputation() + +> **setCommunityReputation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L61) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `community`: `Address`; `score`: `bigint`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.community` | `Address` | +| `args.score` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setEntropyFactor() + +> **setEntropyFactor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L89) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `community`: `Address`; `factor`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.community` | `Address` | +| `args.factor` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setNFTBoost() + +> **setNFTBoost**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L64) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `boost`: `bigint`; `collection`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.boost` | `bigint` | +| `args.collection` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~setRegistry()~~ + +> **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L88) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — REGISTRY is immutable (no `setRegistry`). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### ~~setReputationRule()~~ + +> **setReputationRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `rule`: [`ReputationRule`](ReputationRule.md); `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.rule` | [`ReputationRule`](ReputationRule.md) | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +The deployed ReputationSystem ABI has no `setReputationRule` — this wrapper now calls the ABI-confirmed `setRule(ruleId, base, bonus, max, desc)` (the [ReputationRule](ReputationRule.md) struct is flattened). Prefer [setRule](#setrule). + +*** + +### setRule() + +> **setRule**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L35) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `base`: `bigint`; `bonus`: `bigint`; `desc`: `string`; `max`: `bigint`; `ruleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.base` | `bigint` | +| `args.bonus` | `bigint` | +| `args.desc` | `string` | +| `args.max` | `bigint` | +| `args.ruleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### syncToRegistry() + +> **syncToRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `activities`: `bigint`[][]; `communities`: `Address`[]; `epoch`: `bigint`; `proof`: [`Hex`](https://viem.sh/docs/index.html); `ruleIds`: [`Hex`](https://viem.sh/docs/index.html)[][]; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.activities` | `bigint`[][] | +| `args.communities` | `Address`[] | +| `args.epoch` | `bigint` | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.ruleIds` | [`Hex`](https://viem.sh/docs/index.html)[][] | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L100) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updateNFTHoldStart() + +> **updateNFTHoldStart**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/reputation.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `collection`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.collection` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/reputation.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L104) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/ReputationBreakdown.md b/api/@aastar/sdk/type-aliases/ReputationBreakdown.md new file mode 100644 index 000000000..7e84d85b6 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ReputationBreakdown.md @@ -0,0 +1,35 @@ +> **ReputationBreakdown** = `object` + +Defined in: [packages/core/src/actions/reputation.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L13) + +## Properties + +### activityBonus + +> **activityBonus**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L16) + +*** + +### baseScore + +> **baseScore**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L14) + +*** + +### multiplier + +> **multiplier**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L17) + +*** + +### nftBonus + +> **nftBonus**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L15) diff --git a/api/@aastar/sdk/type-aliases/ReputationRule.md b/api/@aastar/sdk/type-aliases/ReputationRule.md new file mode 100644 index 000000000..db9fe44dc --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ReputationRule.md @@ -0,0 +1,35 @@ +> **ReputationRule** = `object` + +Defined in: [packages/core/src/actions/reputation.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L6) + +## Properties + +### activityBonus + +> **activityBonus**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L8) + +*** + +### baseScore + +> **baseScore**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L7) + +*** + +### description + +> **description**: `string` + +Defined in: [packages/core/src/actions/reputation.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L10) + +*** + +### maxBonus + +> **maxBonus**: `bigint` + +Defined in: [packages/core/src/actions/reputation.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/reputation.ts#L9) diff --git a/api/@aastar/sdk/type-aliases/ResolvedAPNTsToken.md b/api/@aastar/sdk/type-aliases/ResolvedAPNTsToken.md new file mode 100644 index 000000000..119d8b1d9 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ResolvedAPNTsToken.md @@ -0,0 +1,50 @@ +> **ResolvedAPNTsToken** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L62) + +Runtime-resolved aPNTs token state read live from the SuperPaymaster contract. + +The contract exposes the currently active token via `APNTS_TOKEN()` and an +upcoming (timelocked) token via `pendingAPNTsToken()` / `pendingAPNTsTokenEta()`. +Consumers should prefer `active` and may surface `pending` to warn about an +upcoming migration. + +## Properties + +### active + +> **active**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L64) + +Currently active aPNTs token address, read from `APNTS_TOKEN()`. + +*** + +### fallbackUsed + +> **fallbackUsed**: `boolean` + +Defined in: [packages/core/src/actions/superPaymaster.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L70) + +True only when `active` came from the explicit `fallback` option after a failed chain read. + +*** + +### pending + +> **pending**: `Address` + +Defined in: [packages/core/src/actions/superPaymaster.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L66) + +aPNTs token queued for migration; `zeroAddress` when none is queued. + +*** + +### pendingEta + +> **pendingEta**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L68) + +Unix-second ETA when the pending change becomes executable; `0n` when none is queued. diff --git a/api/@aastar/sdk/type-aliases/ResourceInfo.md b/api/@aastar/sdk/type-aliases/ResourceInfo.md new file mode 100644 index 000000000..3c7087609 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/ResourceInfo.md @@ -0,0 +1,29 @@ +> **ResourceInfo** = `object` + +Defined in: [packages/x402/src/types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L13) + +Resource description in 402 response + +## Properties + +### description? + +> `optional` **description**: `string` + +Defined in: [packages/x402/src/types.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L15) + +*** + +### mimeType? + +> `optional` **mimeType**: `string` + +Defined in: [packages/x402/src/types.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L16) + +*** + +### url + +> **url**: `string` + +Defined in: [packages/x402/src/types.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L14) diff --git a/api/@aastar/sdk/type-aliases/RoleConfigDetailed.md b/api/@aastar/sdk/type-aliases/RoleConfigDetailed.md new file mode 100644 index 000000000..dd3c88066 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/RoleConfigDetailed.md @@ -0,0 +1,99 @@ +> **RoleConfigDetailed** = `object` + +Defined in: [packages/core/src/actions/registry.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L99) + +## Properties + +### description + +> **description**: `string` + +Defined in: [packages/core/src/actions/registry.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L109) + +*** + +### exitFeePercent + +> **exitFeePercent**: `number` + +Defined in: [packages/core/src/actions/registry.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L106) + +*** + +### isActive + +> **isActive**: `boolean` + +Defined in: [packages/core/src/actions/registry.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L107) + +*** + +### minExitFee + +> **minExitFee**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L108) + +*** + +### minStake + +> **minStake**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L100) + +*** + +### owner + +> **owner**: `Address` + +Defined in: [packages/core/src/actions/registry.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L110) + +*** + +### roleLockDuration + +> **roleLockDuration**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L111) + +*** + +### slashBase + +> **slashBase**: `number` + +Defined in: [packages/core/src/actions/registry.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L103) + +*** + +### slashInc + +> **slashInc**: `number` + +Defined in: [packages/core/src/actions/registry.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L104) + +*** + +### slashMax + +> **slashMax**: `number` + +Defined in: [packages/core/src/actions/registry.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L105) + +*** + +### slashThreshold + +> **slashThreshold**: `number` + +Defined in: [packages/core/src/actions/registry.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L102) + +*** + +### ticketPrice + +> **ticketPrice**: `bigint` + +Defined in: [packages/core/src/actions/registry.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/registry.ts#L101) diff --git a/api/@aastar/sdk/type-aliases/RoleId.md b/api/@aastar/sdk/type-aliases/RoleId.md new file mode 100644 index 000000000..195fe259e --- /dev/null +++ b/api/@aastar/sdk/type-aliases/RoleId.md @@ -0,0 +1,3 @@ +> **RoleId** = *typeof* [`RoleIds`](../variables/RoleIds.md)\[keyof *typeof* [`RoleIds`](../variables/RoleIds.md)\] + +Defined in: [packages/sdk/src/utils/roleData.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/roleData.ts#L14) diff --git a/api/@aastar/sdk/type-aliases/SBTActions.md b/api/@aastar/sdk/type-aliases/SBTActions.md new file mode 100644 index 000000000..c76685772 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SBTActions.md @@ -0,0 +1,982 @@ +> **SBTActions** = `object` + +Defined in: [packages/core/src/actions/sbt.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L30) + +## Properties + +### airdropMint() + +> **airdropMint**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleData`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### approve() + +> **approve**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L56) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `to`: `Address`; `tokenId`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.to` | `Address` | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### balanceOf() + +> **balanceOf**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L52) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; \} | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### batchAirdropMint() + +> **batchAirdropMint**: (`args`) => `Promise`\<[`BatchMintResult`](BatchMintResult.md)[]\> + +Defined in: [packages/core/src/actions/sbt.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L34) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `continueOnError?`: `boolean`; `items`: `object`[]; `onProgress?`: (`done`, `total`, `lastResult`) => `void`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.continueOnError?` | `boolean` | +| `args.items` | `object`[] | +| `args.onProgress?` | (`done`, `total`, `lastResult`) => `void` | + +#### Returns + +`Promise`\<[`BatchMintResult`](BatchMintResult.md)[]\> + +*** + +### burnSBT() + +> **burnSBT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L71) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### daoMultisig() + +> **daoMultisig**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L99) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### deactivateAllMemberships() + +> **deactivateAllMemberships**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L77) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### deactivateMembership() + +> **deactivateMembership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `community`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.community` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getActiveMemberships() + +> **getActiveMemberships**: (`args`) => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/sbt.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### getApproved() + +> **getApproved**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:58](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L58) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getCommunityMembership() + +> **getCommunityMembership**: (`args`) => `Promise`\<[`SBTMembership`](SBTMembership.md)\> + +Defined in: [packages/core/src/actions/sbt.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `tokenId`: `bigint`; \} | +| `args.community` | `Address` | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`SBTMembership`](SBTMembership.md)\> + +*** + +### getMemberships() + +> **getMemberships**: (`args`) => `Promise`\<[`SBTMembership`](SBTMembership.md)[]\> + +Defined in: [packages/core/src/actions/sbt.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L44) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`SBTMembership`](SBTMembership.md)[]\> + +*** + +### getSBTData() + +> **getSBTData**: (`args`) => `Promise`\<[`SBTData`](SBTData.md)\> + +Defined in: [packages/core/src/actions/sbt.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L42) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`SBTData`](SBTData.md)\> + +*** + +### getUserSBT() + +> **getUserSBT**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L41) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### GTOKEN() + +> **GTOKEN**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:110](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L110) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### GTOKEN\_STAKING() + +> **GTOKEN\_STAKING**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L109) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### isApprovedForAll() + +> **isApprovedForAll**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/sbt.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L59) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; `owner`: `Address`; \} | +| `args.operator` | `Address` | +| `args.owner` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### lastActivityTime() + +> **lastActivityTime**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L81) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `tokenId`: `bigint`; \} | +| `args.community` | `Address` | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### leaveCommunity() + +> **leaveCommunity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L75) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `community`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### membershipIndex() + +> **membershipIndex**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L49) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `tokenId`: `bigint`; \} | +| `args.community` | `Address` | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### minLockAmount() + +> **minLockAmount**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L90) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### mintFee() + +> **mintFee**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L88) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### mintForRole() + +> **mintForRole**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L33) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleData`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### mintOrAddMembership() + +> **mintOrAddMembership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L40) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleData`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleData` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### name() + +> **name**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/sbt.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L62) + +#### Returns + +`Promise`\<`string`\> + +*** + +### nextTokenId() + +> **nextTokenId**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L67) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### ~~owner()~~ + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L114) + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +MySBT is not Ownable — it is governed by `daoMultisig`. The deployed ABI has no `owner`. Throws ErrorCode.NOT\_IMPLEMENTED; use [daoMultisig](#daomultisig). + +*** + +### ownerOf() + +> **ownerOf**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L53) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pause() + +> **pause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L94) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### paused() + +> **paused**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/sbt.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L96) + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### recordActivity() + +> **recordActivity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L80) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L108) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~renounceOwnership()~~ + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L118) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +MySBT is not Ownable — there is no `renounceOwnership`. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### reputationCalculator() + +> **reputationCalculator**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/sbt.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L84) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### safeTransferFrom() + +> **safeTransferFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `data?`: [`Hex`](https://viem.sh/docs/index.html); `from`: `Address`; `to`: `Address`; `tokenId`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.data?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.from` | `Address` | +| `args.to` | `Address` | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### sbtData() + +> **sbtData**: (`args`) => `Promise`\<[`SBTData`](SBTData.md)\> + +Defined in: [packages/core/src/actions/sbt.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`SBTData`](SBTData.md)\> + +*** + +### setApprovalForAll() + +> **setApprovalForAll**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L57) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `approved`: `boolean`; `operator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.approved` | `boolean` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setBaseURI() + +> **setBaseURI**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L72) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `baseURI`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.baseURI` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setDAOMultisig() + +> **setDAOMultisig**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L100) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `multisig`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.multisig` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setMinLockAmount() + +> **setMinLockAmount**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L91) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setMintFee() + +> **setMintFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L89) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `fee`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.fee` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~setRegistry()~~ + +> **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L102) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — MySBT has no `setRegistry` (REGISTRY is immutable). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### setReputationCalculator() + +> **setReputationCalculator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L85) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `calculator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.calculator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### supportsInterface() + +> **supportsInterface**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/sbt.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `interfaceId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.interfaceId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### symbol() + +> **symbol**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/sbt.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L63) + +#### Returns + +`Promise`\<`string`\> + +*** + +### tokenURI() + +> **tokenURI**: (`args`) => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/sbt.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L64) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `tokenId`: `bigint`; \} | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### transferFrom() + +> **transferFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L55) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `from`: `Address`; `to`: `Address`; `tokenId`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.from` | `Address` | +| `args.to` | `Address` | +| `args.tokenId` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~transferOwnership()~~ + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L116) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +MySBT is not Ownable — there is no `transferOwnership`. Throws ErrorCode.NOT\_IMPLEMENTED; use [setDAOMultisig](#setdaomultisig). + +*** + +### unpause() + +> **unpause**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sbt.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L95) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### userToSBT() + +> **userToSBT**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sbt.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L47) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### verifyCommunityMembership() + +> **verifyCommunityMembership**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/sbt.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L46) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `user`: `Address`; \} | +| `args.community` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/sbt.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L105) + +#### Returns + +`Promise`\<`string`\> + +*** + +### ~~weeklyActivity()~~ + +> **weeklyActivity**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/sbt.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L83) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `tokenId`: `bigint`; `week`: `bigint`; \} | +| `args.community` | `Address` | +| `args.tokenId` | `bigint` | +| `args.week` | `bigint` | + +#### Returns + +`Promise`\<`boolean`\> + +#### Deprecated + +Removed in the v5.x contract refactor — MySBT no longer tracks per-week activity (no `weeklyActivity` getter). Throws ErrorCode.NOT\_IMPLEMENTED; use [lastActivityTime](#lastactivitytime) and compare against your week window. diff --git a/api/@aastar/sdk/type-aliases/SBTData.md b/api/@aastar/sdk/type-aliases/SBTData.md new file mode 100644 index 000000000..d46f68d51 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SBTData.md @@ -0,0 +1,35 @@ +> **SBTData** = `object` + +Defined in: [packages/core/src/actions/sbt.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L14) + +## Properties + +### firstCommunity + +> **firstCommunity**: `Address` + +Defined in: [packages/core/src/actions/sbt.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L16) + +*** + +### holder + +> **holder**: `Address` + +Defined in: [packages/core/src/actions/sbt.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L15) + +*** + +### mintedAt + +> **mintedAt**: `bigint` + +Defined in: [packages/core/src/actions/sbt.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L17) + +*** + +### totalCommunities + +> **totalCommunities**: `bigint` + +Defined in: [packages/core/src/actions/sbt.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L18) diff --git a/api/@aastar/sdk/type-aliases/SBTMembership.md b/api/@aastar/sdk/type-aliases/SBTMembership.md new file mode 100644 index 000000000..9b1dc1e15 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SBTMembership.md @@ -0,0 +1,43 @@ +> **SBTMembership** = `object` + +Defined in: [packages/core/src/actions/sbt.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L6) + +## Properties + +### community + +> **community**: `Address` + +Defined in: [packages/core/src/actions/sbt.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L7) + +*** + +### isActive + +> **isActive**: `boolean` + +Defined in: [packages/core/src/actions/sbt.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L10) + +*** + +### joinedAt + +> **joinedAt**: `bigint` + +Defined in: [packages/core/src/actions/sbt.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L8) + +*** + +### lastActiveTime + +> **lastActiveTime**: `bigint` + +Defined in: [packages/core/src/actions/sbt.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L9) + +*** + +### metadata + +> **metadata**: `string` + +Defined in: [packages/core/src/actions/sbt.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sbt.ts#L11) diff --git a/api/@aastar/sdk/type-aliases/SessionKeyValidatorActions.md b/api/@aastar/sdk/type-aliases/SessionKeyValidatorActions.md new file mode 100644 index 000000000..58ec9666f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SessionKeyValidatorActions.md @@ -0,0 +1,127 @@ +> **SessionKeyValidatorActions** = `object` + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L13) + +## Properties + +### checkSessionScope() + +> **checkSessionScope**: (`args`) => `Promise`\<`void`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `dest`: `Address`; `selector`: [`Hex`](https://viem.sh/docs/index.html); `sessionKeyOrHash`: [`Hex`](https://viem.sh/docs/index.html); `sessionType`: `number`; \} | +| `args.account` | `Address` | +| `args.dest` | `Address` | +| `args.selector` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sessionKeyOrHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sessionType` | `number` | + +#### Returns + +`Promise`\<`void`\> + +*** + +### grantNonces() + +> **grantNonces**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L16) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `key`: `Address`; \} | +| `args.account` | `Address` | +| `args.key` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### grantNonces\_p256() + +> **grantNonces\_p256**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `keyHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account` | `Address` | +| `args.keyHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### recordCallForVelocity() + +> **recordCallForVelocity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `sessionKeyOrHash`: [`Hex`](https://viem.sh/docs/index.html); `sessionType`: `number`; `signer?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account` | `Address` | +| `args.sessionKeyOrHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.sessionType` | `number` | +| `args.signer?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### sessionKeyCount() + +> **sessionKeyCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; \} | +| `args.account` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### sessionStates\_p256() + +> **sessionStates\_p256**: (`args`) => `Promise`\<[`P256SessionState`](P256SessionState.md)\> + +Defined in: [packages/core/src/actions/sessionKeyValidator.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/sessionKeyValidator.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account`: `Address`; `keyHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account` | `Address` | +| `args.keyHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`P256SessionState`](P256SessionState.md)\> diff --git a/api/@aastar/sdk/type-aliases/SettleResponse.md b/api/@aastar/sdk/type-aliases/SettleResponse.md new file mode 100644 index 000000000..f46cb538f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SettleResponse.md @@ -0,0 +1,54 @@ +> **SettleResponse** = `object` + +Defined in: [packages/x402/src/types.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L79) + +Settlement response — PAYMENT-RESPONSE header. +Server returns after facilitator settles. + +## Properties + +### errorReason? + +> `optional` **errorReason**: `string` + +Defined in: [packages/x402/src/types.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L84) + +*** + +### extensions? + +> `optional` **extensions**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/x402/src/types.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L85) + +*** + +### network? + +> `optional` **network**: [`NetworkId`](NetworkId.md) + +Defined in: [packages/x402/src/types.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L82) + +*** + +### payer? + +> `optional` **payer**: `Address` + +Defined in: [packages/x402/src/types.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L83) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/x402/src/types.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L80) + +*** + +### transaction? + +> `optional` **transaction**: `string` + +Defined in: [packages/x402/src/types.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L81) diff --git a/api/@aastar/sdk/type-aliases/SignedVoucher.md b/api/@aastar/sdk/type-aliases/SignedVoucher.md new file mode 100644 index 000000000..24f7639f8 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SignedVoucher.md @@ -0,0 +1,9 @@ +> **SignedVoucher** = [`VoucherParams`](VoucherParams.md) & `object` + +Defined in: [packages/channel/src/types.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L11) + +## Type Declaration + +### signature + +> **signature**: [`Hex`](https://viem.sh/docs/index.html) diff --git a/api/@aastar/sdk/type-aliases/SimpleSmartAccount.md b/api/@aastar/sdk/type-aliases/SimpleSmartAccount.md new file mode 100644 index 000000000..ff152ac3f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SimpleSmartAccount.md @@ -0,0 +1,39 @@ +> **SimpleSmartAccount** = [`LocalAccount`](https://viem.sh/docs/index.html) & `object` + +Defined in: [packages/account/src/accounts/simple.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/account/src/accounts/simple.ts#L15) + +## Type Declaration + +### entryPoint + +> **entryPoint**: `Address` + +### getDummySignature() + +> **getDummySignature**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### getInitCode() + +> **getInitCode**: () => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### signUserOperation() + +> **signUserOperation**: (`userOp`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `userOp` | `any` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> diff --git a/api/@aastar/sdk/type-aliases/SlashRecord.md b/api/@aastar/sdk/type-aliases/SlashRecord.md new file mode 100644 index 000000000..b2f033b8f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SlashRecord.md @@ -0,0 +1,43 @@ +> **SlashRecord** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L33) + +## Properties + +### amount + +> **amount**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L35) + +*** + +### level + +> **level**: `number` + +Defined in: [packages/core/src/actions/superPaymaster.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L38) + +*** + +### reason + +> **reason**: `string` + +Defined in: [packages/core/src/actions/superPaymaster.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L37) + +*** + +### reputationLoss + +> **reputationLoss**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L36) + +*** + +### timestamp + +> **timestamp**: `bigint` + +Defined in: [packages/core/src/actions/superPaymaster.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L34) diff --git a/api/@aastar/sdk/type-aliases/SpendCounter.md b/api/@aastar/sdk/type-aliases/SpendCounter.md new file mode 100644 index 000000000..4c50cbd5b --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SpendCounter.md @@ -0,0 +1,25 @@ +> **SpendCounter** = `object` + +Defined in: [packages/core/src/actions/policyRegistry.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L68) + +Sender-keyed cumulative spend counter for one asset/target window. + +## Properties + +### spentInWindow + +> **spentInWindow**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L70) + +cumulative native-unit spend in the current window. + +*** + +### windowStart + +> **windowStart**: `bigint` + +Defined in: [packages/core/src/actions/policyRegistry.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/policyRegistry.ts#L72) + +unix timestamp the current window began. diff --git a/api/@aastar/sdk/type-aliases/StakingActions.md b/api/@aastar/sdk/type-aliases/StakingActions.md new file mode 100644 index 000000000..232ba030f --- /dev/null +++ b/api/@aastar/sdk/type-aliases/StakingActions.md @@ -0,0 +1,629 @@ +> **StakingActions** = `object` + +Defined in: [packages/core/src/actions/staking.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L6) + +## Properties + +### authorizedSlashers() + +> **authorizedSlashers**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/staking.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L69) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `slasher`: `Address`; \} | +| `args.slasher` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### availableBalance() + +> **availableBalance**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L44) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getLockedStake() + +> **getLockedStake**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L35) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getStakeInfo() + +> **getStakeInfo**: (`args`) => `Promise`\<\{ `amount`: `bigint`; `slashedAmount`: `bigint`; `stakedAt`: `bigint`; `unstakeRequestedAt`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/staking.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L28) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.operator` | `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `amount`: `bigint`; `slashedAmount`: `bigint`; `stakedAt`: `bigint`; `unstakeRequestedAt`: `bigint`; \}\> + +*** + +### getStakingBalance() + +> **getStakingBalance**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L34) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getTotalStaked() + +> **getTotalStaked**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L71) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getUserRoleLocks() + +> **getUserRoleLocks**: (`args`) => `Promise`\<`object`[]\> + +Defined in: [packages/core/src/actions/staking.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L36) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`object`[]\> + +*** + +### GTOKEN() + +> **GTOKEN**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/staking.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L84) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### hasRoleLock() + +> **hasRoleLock**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/staking.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L43) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ~~lockStake()~~ + +> **lockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `payer`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; `ticketPrice`: `bigint`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.payer` | `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | +| `args.ticketPrice` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +`lockStake` is absent from the deployed ABI (reverts on-chain); use [lockStakeWithTicket](#lockstakewithticket). + +*** + +### lockStakeWithTicket() + +> **lockStakeWithTicket**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L17) + +Lock stake for a role and consume a ticket in one call. ABI: +lockStakeWithTicket(address user, bytes32 roleId, uint256 stakeAmount, uint256 ticketPrice, address payer) -> uint256 lockId. +NOTE: the deployed GTokenStaking ABI exposes ONLY this function; the bare `lockStake` getter no longer exists on-chain. +This is a state-changing tx, so it resolves to the transaction `Hash` — the on-chain +`uint256 lockId` return is NOT recoverable from a write; `simulateContract` the same call if you need it. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `payer`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; `ticketPrice`: `bigint`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.payer` | `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | +| `args.ticketPrice` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### MAX\_TOTAL\_STAKE() + +> **MAX\_TOTAL\_STAKE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L86) + +Protocol-wide cap on total locked stake (view). ABI: MAX_TOTAL_STAKE() -> uint256. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/staking.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L73) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### previewExitFee() + +> **previewExitFee**: (`args`) => `Promise`\<\{ `fee`: `bigint`; `netAmount`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/staking.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<\{ `fee`: `bigint`; `netAmount`: `bigint`; \}\> + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/staking.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L83) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L77) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### roleExitConfigs() + +> **roleExitConfigs**: (`args`) => `Promise`\<\{ `feePercent`: `bigint`; `minFee`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/staking.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `feePercent`: `bigint`; `minFee`: `bigint`; \}\> + +*** + +### roleLocks() + +> **roleLocks**: (`args`) => `Promise`\<\{ `amount`: `bigint`; `entryBurn`: `bigint`; `lockedAt`: `number`; `metadata`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +Defined in: [packages/core/src/actions/staking.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L60) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<\{ `amount`: `bigint`; `entryBurn`: `bigint`; `lockedAt`: `number`; `metadata`: [`Hex`](https://viem.sh/docs/index.html); `roleId`: [`Hex`](https://viem.sh/docs/index.html); \}\> + +*** + +### setAuthorizedSlasher() + +> **setAuthorizedSlasher**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `authorized`: `boolean`; `slasher`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.authorized` | `boolean` | +| `args.slasher` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~setRegistry()~~ + +> **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L49) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — `setRegistry` is absent from the deployed GTokenStaking ABI (REGISTRY is immutable, set at construction). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### setRoleExitFee() + +> **setRoleExitFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L50) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `feePercent`: `bigint`; `minFee`: `bigint`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.feePercent` | `bigint` | +| `args.minFee` | `bigint` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setTreasury() + +> **setTreasury**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L51) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `treasury`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.treasury` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### slash() + +> **slash**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L23) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `reason`: `string`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.reason` | `string` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### slashByDVT() + +> **slashByDVT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L24) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `operator`: `Address`; `penaltyAmount`: `bigint`; `reason`: `string`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.operator` | `Address` | +| `args.penaltyAmount` | `bigint` | +| `args.reason` | `string` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### stakes() + +> **stakes**: (`args`) => `Promise`\<\{ `amount`: `bigint`; `slashedAmount`: `bigint`; `stakedAt`: `bigint`; `unstakeRequestedAt`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/staking.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L54) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<\{ `amount`: `bigint`; `slashedAmount`: `bigint`; `stakedAt`: `bigint`; `unstakeRequestedAt`: `bigint`; \}\> + +*** + +### topUpStake() + +> **topUpStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `payer`: `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `stakeAmount`: `bigint`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.payer` | `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.stakeAmount` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### totalStaked() + +> **totalStaked**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/staking.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L70) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### treasury() + +> **treasury**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/staking.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L72) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### unlockAndTransfer() + +> **unlockAndTransfer**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L20) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### unlockStake() + +> **unlockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `roleId`: [`Hex`](https://viem.sh/docs/index.html); `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.roleId` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### userActiveRoles() + +> **userActiveRoles**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/staking.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L68) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `user`: `Address`; \} | +| `args.index` | `bigint` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/staking.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/staking.ts#L80) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/SuperPaymasterActions.md b/api/@aastar/sdk/type-aliases/SuperPaymasterActions.md new file mode 100644 index 000000000..d2d2f2a59 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SuperPaymasterActions.md @@ -0,0 +1,1491 @@ +> **SuperPaymasterActions** = `object` + +Defined in: [packages/core/src/actions/superPaymaster.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L73) + +## Properties + +### addStake() + +> **addStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L82) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `unstakeDelaySec`: `number`; `value`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.unstakeDelaySec` | `number` | +| `args.value` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### APNTS\_TOKEN() + +> **APNTS\_TOKEN**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:190](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L190) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### APNTS\_TOKEN\_TIMELOCK() + +> **APNTS\_TOKEN\_TIMELOCK**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L214) + +Duration (seconds) of the aPNTs-token-change timelock. + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### aPNTsPriceUSD() + +> **aPNTsPriceUSD**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L172) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### applyBLSAggregator() + +> **applyBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:148](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L148) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### BLS\_AGGREGATOR() + +> **BLS\_AGGREGATOR**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:192](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L192) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~BPS\_DENOMINATOR()~~ + +> **BPS\_DENOMINATOR**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:212](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L212) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### cachedPrice() + +> **cachedPrice**: () => `Promise`\<\{ `decimals`: `number`; `price`: `bigint`; `roundId`: `bigint`; `updatedAt`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:171](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L171) + +#### Returns + +`Promise`\<\{ `decimals`: `number`; `price`: `bigint`; `roundId`: `bigint`; `updatedAt`: `bigint`; \}\> + +*** + +### cancelAPNTsTokenChange() + +> **cancelAPNTsTokenChange**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L122) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### cancelEmergencyPrice() + +> **cancelEmergencyPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:140](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L140) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### clearPendingDebt() + +> **clearPendingDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L104) + +Operator force-clears the user's pending-debt entry without recording it. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### configureOperator() + +> **configureOperator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L87) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `opTreasury`: `Address`; `xPNTsToken`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.opTreasury` | `Address` | +| `args.xPNTsToken` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### deposit() + +> **deposit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L75) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### depositETH() + +> **depositETH**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L76) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `value`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.value` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### depositFor() + +> **depositFor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L77) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `targetOperator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.targetOperator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### dryRunValidation() + +> **dryRunValidation**: (`args`) => `Promise`\<[`DryRunValidationResult`](DryRunValidationResult.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:160](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L160) + +Off-chain pre-flight validation of a UserOp against this paymaster. +Returns `{ ok, reasonCode }` so callers can detect AA34-style rejections +before submitting the UserOp on-chain. View call; never mutates state. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `maxCost`: `bigint`; `userOp`: [`PackedUserOperation`](../../core/type-aliases/PackedUserOperation.md); \} | +| `args.maxCost` | `bigint` | +| `args.userOp` | [`PackedUserOperation`](../../core/type-aliases/PackedUserOperation.md) | + +#### Returns + +`Promise`\<[`DryRunValidationResult`](DryRunValidationResult.md)\> + +*** + +### EMERGENCY\_TIMELOCK() + +> **EMERGENCY\_TIMELOCK**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:144](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L144) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencyActivatedAt() + +> **emergencyActivatedAt**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:142](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L142) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencyPendingPrice() + +> **emergencyPendingPrice**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:141](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L141) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencyQueuedAt() + +> **emergencyQueuedAt**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L143) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### emergencySetPrice() + +> **emergencySetPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L138) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newPrice`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newPrice` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### entryPoint() + +> **entryPoint**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:196](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L196) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ETH\_USD\_PRICE\_FEED() + +> **ETH\_USD\_PRICE\_FEED**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L193) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### executeAPNTsTokenChange() + +> **executeAPNTsTokenChange**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L121) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeEmergencyPrice() + +> **executeEmergencyPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L139) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### executeSlashWithBLS() + +> **executeSlashWithBLS**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L91) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `level`: `number`; `operator`: `Address`; `proof`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.level` | `number` | +| `args.operator` | `Address` | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getAvailableCredit() + +> **getAvailableCredit**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:164](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L164) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; `user`: `Address`; \} | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getDeposit() + +> **getDeposit**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:165](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L165) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getLatestSlash() + +> **getLatestSlash**: (`args`) => `Promise`\<[`SlashRecord`](SlashRecord.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:166](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L166) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`SlashRecord`](SlashRecord.md)\> + +*** + +### getSlashCount() + +> **getSlashCount**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L167) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getSlashHistory() + +> **getSlashHistory**: (`args`) => `Promise`\<[`SlashRecord`](SlashRecord.md)[]\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:168](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L168) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`SlashRecord`](SlashRecord.md)[]\> + +*** + +### isChainlinkStale() + +> **isChainlinkStale**: () => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:179](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L179) + +True when the Chainlink ETH/USD feed is considered stale by the contract. + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### ~~MAX\_ETH\_USD\_PRICE()~~ + +> **MAX\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:200](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L200) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed from SuperPaymaster in the v5.x refactor (this bound belongs to the standalone Paymaster contract). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### ~~MAX\_PROTOCOL\_FEE()~~ + +> **MAX\_PROTOCOL\_FEE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L198) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### ~~MIN\_ETH\_USD\_PRICE()~~ + +> **MIN\_ETH\_USD\_PRICE**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L202) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed from SuperPaymaster in the v5.x refactor (this bound belongs to the standalone Paymaster contract). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### onTransferReceived() + +> **onTransferReceived**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:151](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L151) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `data`: [`Hex`](https://viem.sh/docs/index.html); `from`: `Address`; `operator`: `Address`; `value`: `bigint`; \} | +| `args.data` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.from` | `Address` | +| `args.operator` | `Address` | +| `args.value` | `bigint` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### operators() + +> **operators**: (`args`) => `Promise`\<[`OperatorConfig`](OperatorConfig.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:163](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L163) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`OperatorConfig`](OperatorConfig.md)\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:217](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L217) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~PAYMASTER\_DATA\_OFFSET()~~ + +> **PAYMASTER\_DATA\_OFFSET**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:204](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L204) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### pendingAPNTsToken() + +> **pendingAPNTsToken**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L123) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pendingAPNTsTokenEta() + +> **pendingAPNTsTokenEta**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:124](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L124) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### pendingBLSAgg() + +> **pendingBLSAgg**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L185) + +Address of the BLS aggregator pending the timelock (`zeroAddress` if none queued). + +#### Returns + +`Promise`\<`Address`\> + +*** + +### pendingBLSAggEta() + +> **pendingBLSAggEta**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L187) + +Unix-second ETA at which the pending BLS aggregator change becomes executable (uint48). + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### pendingDebts() + +> **pendingDebts**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L100) + +Read the unrecovered debt recorded for a user after a failed burn/recordDebt. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; `user`: `Address`; \} | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### ~~PRICE\_CACHE\_DURATION()~~ + +> **PRICE\_CACHE\_DURATION**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L206) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### priceMode() + +> **priceMode**: () => `Promise`\<`number`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:181](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L181) + +Current pricing mode (uint8 enum on the contract). + +#### Returns + +`Promise`\<`number`\> + +*** + +### priceStalenessThreshold() + +> **priceStalenessThreshold**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:176](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L176) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### priceValidUntil() + +> **priceValidUntil**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L183) + +Unix-second timestamp until which the cached price remains valid (uint48). + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### protocolFeeBPS() + +> **protocolFeeBPS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:173](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L173) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### protocolRevenue() + +> **protocolRevenue**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:174](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L174) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### queueBLSAggregator() + +> **queueBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L147) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `aggregator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.aggregator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~RATE\_OFFSET()~~ + +> **RATE\_OFFSET**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:208](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L208) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:191](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L191) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:219](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L219) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### resolveAPNTsToken() + +> **resolveAPNTsToken**: (`args?`) => `Promise`\<[`ResolvedAPNTsToken`](ResolvedAPNTsToken.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:135](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L135) + +Resolve the live aPNTs token address from chain instead of relying on a static constant. + +Reads `APNTS_TOKEN()` (active), `pendingAPNTsToken()` and `pendingAPNTsTokenEta()` +in parallel and returns them as a structured result. Prefer `active` for runtime use. + +If `fallback` is supplied and the chain reads fail, the static `fallback` address is +returned with `fallbackUsed: true` (pending fields zeroed). Without a `fallback` the +underlying error is re-thrown rather than silently masked. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args?` | \{ `fallback?`: `Address`; \} | +| `args.fallback?` | `Address` | + +#### Returns + +`Promise`\<[`ResolvedAPNTsToken`](ResolvedAPNTsToken.md)\> + +*** + +### retryPendingDebt() + +> **retryPendingDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L102) + +Operator retries recovering up to `amount` of the user's pending debt. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### sbtHolders() + +> **sbtHolders**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:177](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L177) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `user`: `Address`; \} | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### setAPNTSPrice() + +> **setAPNTSPrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L107) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newPrice`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newPrice` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setAPNTsToken() + +> **setAPNTsToken**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L115) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~setBLSAggregator()~~ + +> **setBLSAggregator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L117) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `aggregator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.aggregator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +The deployed SuperPaymaster ABI has no direct `setBLSAggregator` — the aggregator change is timelocked via [queueBLSAggregator](#queueblsaggregator) + [applyBLSAggregator](#applyblsaggregator). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### setOperatorLimits() + +> **setOperatorLimits**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L89) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `minTxInterval`: `number`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.minTxInterval` | `number` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setOperatorPaused() + +> **setOperatorPaused**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L88) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `operator`: `Address`; `paused`: `boolean`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.operator` | `Address` | +| `args.paused` | `boolean` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setProtocolFee() + +> **setProtocolFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L112) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newFeeBPS`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newFeeBPS` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setTreasury() + +> **setTreasury**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L113) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `treasury`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.treasury` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setXPNTsFactory() + +> **setXPNTsFactory**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:114](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L114) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `factory`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.factory` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### slashHistory() + +> **slashHistory**: (`args`) => `Promise`\<[`SlashRecord`](SlashRecord.md)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L169) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; `operator`: `Address`; \} | +| `args.index` | `bigint` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`SlashRecord`](SlashRecord.md)\> + +*** + +### slashOperator() + +> **slashOperator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L92) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `level`: `number`; `operator`: `Address`; `penaltyAmount`: `bigint`; `reason`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.level` | `number` | +| `args.operator` | `Address` | +| `args.penaltyAmount` | `bigint` | +| `args.reason` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### totalTrackedBalance() + +> **totalTrackedBalance**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:175](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L175) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:218](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L218) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### treasury() + +> **treasury**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:194](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L194) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### unlockStake() + +> **unlockStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L83) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updateBlockedStatus() + +> **updateBlockedStatus**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L95) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `operator`: `Address`; `statuses`: `boolean`[]; `users`: `Address`[]; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.operator` | `Address` | +| `args.statuses` | `boolean`[] | +| `args.users` | `Address`[] | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updatePrice() + +> **updatePrice**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L108) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updatePriceDVT() + +> **updatePriceDVT**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:109](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L109) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `price`: `bigint`; `proof`: [`Hex`](https://viem.sh/docs/index.html); `updatedAt`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.price` | `bigint` | +| `args.proof` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.updatedAt` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updateReputation() + +> **updateReputation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L90) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newScore`: `bigint`; `operator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newScore` | `bigint` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### updateSBTStatus() + +> **updateSBTStatus**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L96) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `status`: `boolean`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.status` | `boolean` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### userOpState() + +> **userOpState**: (`args`) => `Promise`\<\{ `isBlocked`: `boolean`; `lastTimestamp`: `number`; \}\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:170](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L170) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; `user`: `Address`; \} | +| `args.operator` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<\{ `isBlocked`: `boolean`; `lastTimestamp`: `number`; \}\> + +*** + +### validatePaymasterUserOp() + +> **validatePaymasterUserOp**: (`args`) => `Promise`\<\{ `context`: [`Hex`](https://viem.sh/docs/index.html); `validationData`: `bigint`; \}\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L154) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `maxCost`: `bigint`; `userOp`: `any`; `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.maxCost` | `bigint` | +| `args.userOp` | `any` | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<\{ `context`: [`Hex`](https://viem.sh/docs/index.html); `validationData`: `bigint`; \}\> + +*** + +### ~~VALIDATION\_BUFFER\_BPS()~~ + +> **VALIDATION\_BUFFER\_BPS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:210](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L210) + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +Removed in the v5.x contract refactor — not in the deployed SuperPaymaster ABI. Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:222](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L222) + +#### Returns + +`Promise`\<`string`\> + +*** + +### withdraw() + +> **withdraw**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L79) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawProtocolRevenue() + +> **withdrawProtocolRevenue**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L118) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawStake() + +> **withdrawStake**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L84) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawTo() + +> **withdrawTo**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L78) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### xpntsFactory() + +> **xpntsFactory**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/superPaymaster.ts:195](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/superPaymaster.ts#L195) + +#### Returns + +`Promise`\<`Address`\> diff --git a/api/@aastar/sdk/type-aliases/SupportedChainId.md b/api/@aastar/sdk/type-aliases/SupportedChainId.md new file mode 100644 index 000000000..5ce056e74 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SupportedChainId.md @@ -0,0 +1,3 @@ +> **SupportedChainId** = keyof *typeof* [`CANONICAL_ADDRESSES`](../variables/CANONICAL_ADDRESSES.md) + +Defined in: [packages/core/src/addresses.ts:185](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L185) diff --git a/api/@aastar/sdk/type-aliases/SupportedNetwork.md b/api/@aastar/sdk/type-aliases/SupportedNetwork.md new file mode 100644 index 000000000..847b0722d --- /dev/null +++ b/api/@aastar/sdk/type-aliases/SupportedNetwork.md @@ -0,0 +1,3 @@ +> **SupportedNetwork** = keyof *typeof* [`NETWORKS`](../variables/NETWORKS.md) + +Defined in: [packages/core/src/networks.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L52) diff --git a/api/@aastar/sdk/type-aliases/TokenActions.md b/api/@aastar/sdk/type-aliases/TokenActions.md new file mode 100644 index 000000000..b70a47b15 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/TokenActions.md @@ -0,0 +1,3 @@ +> **TokenActions** = [`GTokenActions`](GTokenActions.md) & [`XPNTsTokenActions`](XPNTsTokenActions.md) + +Defined in: [packages/core/src/actions/tokens.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L127) diff --git a/api/@aastar/sdk/type-aliases/TokenConfig.md b/api/@aastar/sdk/type-aliases/TokenConfig.md new file mode 100644 index 000000000..7620b15a1 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/TokenConfig.md @@ -0,0 +1,27 @@ +> **TokenConfig** = `object` + +Defined in: [packages/core/src/actions/airAccount.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L12) + +## Properties + +### dailyLimit + +> **dailyLimit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L15) + +*** + +### tier1Limit + +> **tier1Limit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L13) + +*** + +### tier2Limit + +> **tier2Limit**: `bigint` + +Defined in: [packages/core/src/actions/airAccount.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/airAccount.ts#L14) diff --git a/api/@aastar/sdk/type-aliases/VerifyResponse.md b/api/@aastar/sdk/type-aliases/VerifyResponse.md new file mode 100644 index 000000000..56d6b89dd --- /dev/null +++ b/api/@aastar/sdk/type-aliases/VerifyResponse.md @@ -0,0 +1,29 @@ +> **VerifyResponse** = `object` + +Defined in: [packages/x402/src/types.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L91) + +Facilitator verify response. + +## Properties + +### invalidReason? + +> `optional` **invalidReason**: `string` + +Defined in: [packages/x402/src/types.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L93) + +*** + +### isValid + +> **isValid**: `boolean` + +Defined in: [packages/x402/src/types.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L92) + +*** + +### payer? + +> `optional` **payer**: `Address` + +Defined in: [packages/x402/src/types.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L94) diff --git a/api/@aastar/sdk/type-aliases/VoucherParams.md b/api/@aastar/sdk/type-aliases/VoucherParams.md new file mode 100644 index 000000000..d0b283da0 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/VoucherParams.md @@ -0,0 +1,19 @@ +> **VoucherParams** = `object` + +Defined in: [packages/channel/src/types.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L6) + +## Properties + +### channelId + +> **channelId**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/channel/src/types.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L7) + +*** + +### cumulativeAmount + +> **cumulativeAmount**: `bigint` + +Defined in: [packages/channel/src/types.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/types.ts#L8) diff --git a/api/@aastar/sdk/type-aliases/X402Actions.md b/api/@aastar/sdk/type-aliases/X402Actions.md new file mode 100644 index 000000000..fe788d9ea --- /dev/null +++ b/api/@aastar/sdk/type-aliases/X402Actions.md @@ -0,0 +1,185 @@ +> **X402Actions** = `object` + +Defined in: [packages/core/src/actions/x402.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L46) + +## Properties + +### facilitatorEarnings() + +> **facilitatorEarnings**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/x402.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L61) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `asset`: `Address`; `operator`: `Address`; \} | +| `args.asset` | `Address` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### facilitatorFeeBPS() + +> **facilitatorFeeBPS**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/x402.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L60) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### operatorFacilitatorFees() + +> **operatorFacilitatorFees**: (`args`) => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/x402.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L62) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `operator`: `Address`; \} | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### setFacilitatorFeeBPS() + +> **setFacilitatorFeeBPS**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L66) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `fee`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.fee` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setOperatorFacilitatorFee() + +> **setOperatorFacilitatorFee**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L67) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `fee`: `bigint`; `operator`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.fee` | `bigint` | +| `args.operator` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### settleX402Payment() + +> **settleX402Payment**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `asset`: `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `signature`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `validAfter`: `bigint`; `validBefore`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.asset` | `Address` | +| `args.from` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.signature` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.to` | `Address` | +| `args.validAfter` | `bigint` | +| `args.validBefore` | `bigint` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### settleX402PaymentDirect() + +> **settleX402PaymentDirect**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L53) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `asset`: `Address`; `from`: `Address`; `nonce`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.asset` | `Address` | +| `args.from` | `Address` | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.to` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +*** + +### withdrawFacilitatorEarnings() + +> **withdrawFacilitatorEarnings**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/x402.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L65) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `asset`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.asset` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### x402SettlementNonces() + +> **x402SettlementNonces**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/x402.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/x402.ts#L59) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `nonce`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.nonce` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<`boolean`\> diff --git a/api/@aastar/sdk/type-aliases/X402ClientConfig.md b/api/@aastar/sdk/type-aliases/X402ClientConfig.md new file mode 100644 index 000000000..f5f625fd1 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/X402ClientConfig.md @@ -0,0 +1,73 @@ +> **X402ClientConfig** = `object` + +Defined in: [packages/x402/src/X402Client.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L21) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/x402/src/X402Client.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L25) + +*** + +### facilitator? + +> `optional` **facilitator**: [`FacilitatorConfig`](FacilitatorConfig.md) + +Defined in: [packages/x402/src/X402Client.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L27) + +Facilitator endpoint (default: self-facilitated via SuperPaymaster) + +*** + +### maxAmountPerRequest? + +> `optional` **maxAmountPerRequest**: `bigint` + +Defined in: [packages/x402/src/X402Client.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L32) + +Payment policy: max amount per request (in atomic units) + +*** + +### publicClient + +> **publicClient**: [`PublicClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/X402Client.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L22) + +*** + +### superPaymasterAddress + +> **superPaymasterAddress**: `Address` + +Defined in: [packages/x402/src/X402Client.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L24) + +*** + +### tokenName? + +> `optional` **tokenName**: `string` + +Defined in: [packages/x402/src/X402Client.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L29) + +EIP-712 domain for asset token (defaults: USDC / version "2") + +*** + +### tokenVersion? + +> `optional` **tokenVersion**: `string` + +Defined in: [packages/x402/src/X402Client.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L30) + +*** + +### walletClient + +> **walletClient**: [`WalletClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/X402Client.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L23) diff --git a/api/@aastar/sdk/type-aliases/X402PaymentParams.md b/api/@aastar/sdk/type-aliases/X402PaymentParams.md new file mode 100644 index 000000000..b0e916471 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/X402PaymentParams.md @@ -0,0 +1,61 @@ +> **X402PaymentParams** = `object` + +Defined in: [packages/x402/src/types.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L126) + +Payment creation parameters (high-level SDK input) + +## Properties + +### amount + +> **amount**: `bigint` + +Defined in: [packages/x402/src/types.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L130) + +*** + +### asset + +> **asset**: `Address` + +Defined in: [packages/x402/src/types.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L129) + +*** + +### from + +> **from**: `Address` + +Defined in: [packages/x402/src/types.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L127) + +*** + +### nonce? + +> `optional` **nonce**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/types.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L133) + +*** + +### to + +> **to**: `Address` + +Defined in: [packages/x402/src/types.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L128) + +*** + +### validAfter? + +> `optional` **validAfter**: `bigint` + +Defined in: [packages/x402/src/types.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L131) + +*** + +### validBefore? + +> `optional` **validBefore**: `bigint` + +Defined in: [packages/x402/src/types.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L132) diff --git a/api/@aastar/sdk/type-aliases/XPNTsFactoryActions.md b/api/@aastar/sdk/type-aliases/XPNTsFactoryActions.md new file mode 100644 index 000000000..ae583b699 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/XPNTsFactoryActions.md @@ -0,0 +1,467 @@ +> **XPNTsFactoryActions** = `object` + +Defined in: [packages/core/src/actions/factory.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L7) + +## Properties + +### communityToToken() + +> **communityToToken**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L26) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### createToken() + +> **createToken**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L10) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `community`: `Address`; `name`: `string`; `symbol`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.community` | `Address` | +| `args.name` | `string` | +| `args.symbol` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### deployedTokens() + +> **deployedTokens**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L25) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `index`: `bigint`; \} | +| `args.index` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~deployForCommunity()~~ + +> **deployForCommunity**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L12) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `community`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory has no `deployForCommunity` (it cannot derive token name/symbol from a community address). Throws ErrorCode.NOT\_IMPLEMENTED; use [deployxPNTsToken](#deployxpntstoken) with full token params. + +*** + +### deployxPNTsToken() + +> **deployxPNTsToken**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L9) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `communityENS`: `string`; `communityName`: `string`; `exchangeRate`: `bigint`; `name`: `string`; `paymasterAOA`: `Address`; `symbol`: `string`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.communityENS` | `string` | +| `args.communityName` | `string` | +| `args.exchangeRate` | `bigint` | +| `args.name` | `string` | +| `args.paymasterAOA` | `Address` | +| `args.symbol` | `string` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### getAllTokens() + +> **getAllTokens**: () => `Promise`\<`Address`[]\> + +Defined in: [packages/core/src/actions/factory.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L22) + +#### Returns + +`Promise`\<`Address`[]\> + +*** + +### ~~getCommunityByToken()~~ + +> **getCommunityByToken**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L21) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory has no token->community reverse lookup (only community->token via [communityToToken](#communitytotoken)). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### getDeployedCount() + +> **getDeployedCount**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/factory.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L23) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### getImplementation() + +> **getImplementation**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L36) + +Token implementation address. On-chain fn: `implementation()` (the legacy `getImplementation` getter was removed). + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getTokenAddress() + +> **getTokenAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L15) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +*** + +### getTokenCount() + +> **getTokenCount**: () => `Promise`\<`bigint`\> + +Defined in: [packages/core/src/actions/factory.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L24) + +#### Returns + +`Promise`\<`bigint`\> + +*** + +### hasToken() + +> **hasToken**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/factory.ts:18](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L18) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### isTokenDeployed() + +> **isTokenDeployed**: (`args`) => `Promise`\<`boolean`\> + +Defined in: [packages/core/src/actions/factory.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L19) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; \} | +| `args.community` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### owner() + +> **owner**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L46) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### ~~predictAddress()~~ + +> **predictAddress**: (`args`) => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L17) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `community`: `Address`; `salt?`: `bigint`; \} | +| `args.community` | `Address` | +| `args.salt?` | `bigint` | + +#### Returns + +`Promise`\<`Address`\> + +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory exposes no CREATE2 address predictor. Throws ErrorCode.NOT\_IMPLEMENTED; read the deployed address via [getTokenAddress](#gettokenaddress)/[communityToToken](#communitytotoken) after deploy. + +*** + +### REGISTRY() + +> **REGISTRY**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L39) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### renounceOwnership() + +> **renounceOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:48](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L48) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### ~~setImplementation()~~ + +> **setImplementation**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L34) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `impl`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.impl` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory has no implementation setter (the token `implementation()` is fixed). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### ~~setRegistry()~~ + +> **setRegistry**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L30) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `registry`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.registry` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Deprecated + +Removed in the v5.x contract refactor — xPNTsFactory.REGISTRY is immutable (no `setRegistry`). Throws ErrorCode.NOT\_IMPLEMENTED. + +*** + +### setSuperPaymaster() + +> **setSuperPaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L32) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `paymaster`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.paymaster` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### setSuperPaymasterAddress() + +> **setSuperPaymasterAddress**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L31) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `paymaster`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.paymaster` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### SUPER\_PAYMASTER() + +> **SUPER\_PAYMASTER**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L41) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### SUPERPAYMASTER() + +> **SUPERPAYMASTER**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L40) + +#### Returns + +`Promise`\<`Address`\> + +*** + +### tokenImplementation() + +> **tokenImplementation**: () => `Promise`\<`Address`\> + +Defined in: [packages/core/src/actions/factory.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L43) + +Token implementation address. On-chain fn: `implementation()` (the legacy `tokenImplementation` getter was removed). + +#### Returns + +`Promise`\<`Address`\> + +*** + +### transferOwnership() + +> **transferOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Defined in: [packages/core/src/actions/factory.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L47) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +*** + +### version() + +> **version**: () => `Promise`\<`string`\> + +Defined in: [packages/core/src/actions/factory.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/factory.ts#L51) + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/type-aliases/XPNTsTokenActions.md b/api/@aastar/sdk/type-aliases/XPNTsTokenActions.md new file mode 100644 index 000000000..4b17f38a6 --- /dev/null +++ b/api/@aastar/sdk/type-aliases/XPNTsTokenActions.md @@ -0,0 +1,893 @@ +> **XPNTsTokenActions** = [`ERC20Actions`](ERC20Actions.md) & `object` + +Defined in: [packages/core/src/actions/tokens.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/actions/tokens.ts#L33) + +## Type Declaration + +### addApprovedFacilitator() + +> **addApprovedFacilitator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Add an approved facilitator. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `facilitator`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.facilitator` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### addAutoApprovedSpender() + +> **addAutoApprovedSpender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `spender`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### approvedFacilitators() + +> **approvedFacilitators**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `facilitator`: `Address`; `token`: `Address`; \} | +| `args.facilitator` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### autoApprovedSpenders() + +> **autoApprovedSpenders**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `spender`: `Address`; `token`: `Address`; \} | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### burn() + +> **burn**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### burnFrom() + +> **burnFrom**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `from`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.from` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### burnFromWithOpHash() + +> **burnFromWithOpHash**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `from`: `Address`; `token`: `Address`; `userOpHash`: [`Hex`](https://viem.sh/docs/index.html); \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.from` | `Address` | +| `args.token` | `Address` | +| `args.userOpHash` | [`Hex`](https://viem.sh/docs/index.html) | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### communityENS() + +> **communityENS**: (`args`) => `Promise`\<`string`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`string`\> + +### communityName() + +> **communityName**: (`args`) => `Promise`\<`string`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`string`\> + +### communityOwner() + +> **communityOwner**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### debts() + +> **debts**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; `user`: `Address`; \} | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### DOMAIN\_SEPARATOR() + +> **DOMAIN\_SEPARATOR**: (`args`) => `Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hex`](https://viem.sh/docs/index.html)\> + +### eip712Domain() + +> **eip712Domain**: (`args`) => `Promise`\<`any`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`any`\> + +### emergencyDisabled() + +> **emergencyDisabled**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### emergencyRevokedAddress() + +> **emergencyRevokedAddress**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### emergencyRevokePaymaster() + +> **emergencyRevokePaymaster**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### EXCHANGE\_RATE\_COOLDOWN() + +> **EXCHANGE\_RATE\_COOLDOWN**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### EXCHANGE\_RATE\_DELTA\_BPS() + +> **EXCHANGE\_RATE\_DELTA\_BPS**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### EXCHANGE\_RATE\_MAX() + +> **EXCHANGE\_RATE\_MAX**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### EXCHANGE\_RATE\_MIN() + +> **EXCHANGE\_RATE\_MIN**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### exchangeRate() + +> **exchangeRate**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### exchangeRateUpdatedAt() + +> **exchangeRateUpdatedAt**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### FACTORY() + +> **FACTORY**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### getDebt() + +> **getDebt**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; `user`: `Address`; \} | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### getMetadata() + +> **getMetadata**: (`args`) => `Promise`\<\{ `communityENS`: `string`; `communityName`: `string`; `communityOwner`: `Address`; `name`: `string`; `symbol`: `string`; \}\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<\{ `communityENS`: `string`; `communityName`: `string`; `communityOwner`: `Address`; `name`: `string`; `symbol`: `string`; \}\> + +### ~~MAX\_SINGLE\_TX\_LIMIT()~~ + +> **MAX\_SINGLE\_TX\_LIMIT**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +#### Deprecated + +The deployed xPNTsToken ABI renamed this constant to `MAX_SINGLE_TX_LIMIT_CAP`; this wrapper now reads that. Prefer MAX\_SINGLE\_TX\_LIMIT\_CAP. + +### MAX\_SINGLE\_TX\_LIMIT\_CAP() + +> **MAX\_SINGLE\_TX\_LIMIT\_CAP**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### maxSingleTxLimit() + +> **maxSingleTxLimit**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### mint() + +> **mint**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `to`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.to` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### needsApproval() + +> **needsApproval**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `amount`: `bigint`; `owner`: `Address`; `spender`: `Address`; `token`: `Address`; \} | +| `args.amount` | `bigint` | +| `args.owner` | `Address` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### nonces() + +> **nonces**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `owner`: `Address`; `token`: `Address`; \} | +| `args.owner` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### permit() + +> **permit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `deadline`: `bigint`; `owner`: `Address`; `r`: [`Hex`](https://viem.sh/docs/index.html); `s`: [`Hex`](https://viem.sh/docs/index.html); `spender`: `Address`; `token`: `Address`; `v`: `number`; `value`: `bigint`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.deadline` | `bigint` | +| `args.owner` | `Address` | +| `args.r` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.s` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.spender` | `Address` | +| `args.token` | `Address` | +| `args.v` | `number` | +| `args.value` | `bigint` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### recordDebt() + +> **recordDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amountXPNTs`: `bigint`; `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amountXPNTs` | `bigint` | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### recordDebtWithOpHash() + +> **recordDebtWithOpHash**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Record APNTs-denominated debt for a user, guarded by a unique `opHash` to prevent replay. +ABI: recordDebtWithOpHash(address user, uint256 amountAPNTs, bytes32 opHash). This is a +state-changing tx, so it resolves to the transaction `Hash`; the function has no return value. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amountAPNTs`: `bigint`; `opHash`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; `user`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amountAPNTs` | `bigint` | +| `args.opHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | +| `args.user` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### removeApprovedFacilitator() + +> **removeApprovedFacilitator**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Remove an approved facilitator. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `facilitator`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.facilitator` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### removeAutoApprovedSpender() + +> **removeAutoApprovedSpender**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `spender`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### renounceFactory() + +> **renounceFactory**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Permanently renounce the factory link. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### repayDebt() + +> **repayDebt**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setMaxSingleTxLimit() + +> **setMaxSingleTxLimit**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Set the per-tx burn ceiling. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newLimit`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newLimit` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setSpenderDailyCap() + +> **setSpenderDailyCap**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Set the per-spender daily burn cap (in whole tokens). State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newCap`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newCap` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setSpenderDailyCapFor() + +> **setSpenderDailyCapFor**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Set a per-spender daily burn-cap OVERRIDE for a specific spender (admin). State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newCap`: `bigint`; `spender`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newCap` | `bigint` | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### setSuperPaymasterAddress() + +> **setSuperPaymasterAddress**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `spAddress`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.spAddress` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### spenderDailyCapOverride() + +> **spenderDailyCapOverride**: (`args`) => `Promise`\<`bigint`\> + +Read a spender's daily-cap override (0 = no override; the global `spenderDailyCapTokens` applies). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `spender`: `Address`; `token`: `Address`; \} | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### spenderDailyCapTokens() + +> **spenderDailyCapTokens**: (`args`) => `Promise`\<`bigint`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`bigint`\> + +### spenderRateLimit() + +> **spenderRateLimit**: (`args`) => `Promise`\<\{ `dailyBurnTotal`: `bigint`; `reserved`: `bigint`; `windowStart`: `bigint`; \}\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `spender`: `Address`; `token`: `Address`; \} | +| `args.spender` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<\{ `dailyBurnTotal`: `bigint`; `reserved`: `bigint`; `windowStart`: `bigint`; \}\> + +### SUPERPAYMASTER\_ADDRESS() + +> **SUPERPAYMASTER\_ADDRESS**: (`args`) => `Promise`\<`Address`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`Address`\> + +### transferAndCall() + +> **transferAndCall**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `amount`: `bigint`; `data?`: [`Hex`](https://viem.sh/docs/index.html); `to`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.amount` | `bigint` | +| `args.data?` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.to` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### transferCommunityOwnership() + +> **transferCommunityOwnership**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newOwner`: `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newOwner` | `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### unsetEmergencyDisabled() + +> **unsetEmergencyDisabled**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +Clear the emergency-disabled flag. State-changing tx → resolves to a tx `Hash`. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### updateExchangeRate() + +> **updateExchangeRate**: (`args`) => `Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `account?`: [`Account`](https://viem.sh/docs/index.html) \| `Address`; `newRate`: `bigint`; `token`: `Address`; \} | +| `args.account?` | [`Account`](https://viem.sh/docs/index.html) \| `Address` | +| `args.newRate` | `bigint` | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<[`Hash`](https://viem.sh/docs/index.html)\> + +### usedDebtHashes() + +> **usedDebtHashes**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `opHash`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.opHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### usedOpHashes() + +> **usedOpHashes**: (`args`) => `Promise`\<`boolean`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `opHash`: [`Hex`](https://viem.sh/docs/index.html); `token`: `Address`; \} | +| `args.opHash` | [`Hex`](https://viem.sh/docs/index.html) | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`boolean`\> + +### version() + +> **version**: (`args`) => `Promise`\<`string`\> + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `args` | \{ `token`: `Address`; \} | +| `args.token` | `Address` | + +#### Returns + +`Promise`\<`string`\> diff --git a/api/@aastar/sdk/variables/AASTAR_COMMUNITY.md b/api/@aastar/sdk/variables/AASTAR_COMMUNITY.md new file mode 100644 index 000000000..34252448b --- /dev/null +++ b/api/@aastar/sdk/variables/AASTAR_COMMUNITY.md @@ -0,0 +1,8 @@ +> `const` **AASTAR\_COMMUNITY**: [`CommunityConfig`](../interfaces/CommunityConfig.md) + +Defined in: [packages/core/src/communities.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L34) + +AAstar Community +- SuperPaymaster shared mode (AOA+) +- Uses aPNTs for gas payments +- MySBT for identity verification diff --git a/api/@aastar/sdk/variables/AAStarAirAccountFactoryV7ABI.md b/api/@aastar/sdk/variables/AAStarAirAccountFactoryV7ABI.md new file mode 100644 index 000000000..4d9fa9ba6 --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarAirAccountFactoryV7ABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarAirAccountFactoryV7ABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:183](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L183) diff --git a/api/@aastar/sdk/variables/AAStarAirAccountFactoryV7Artifact.md b/api/@aastar/sdk/variables/AAStarAirAccountFactoryV7Artifact.md new file mode 100644 index 000000000..c3e75aecf --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarAirAccountFactoryV7Artifact.md @@ -0,0 +1,3 @@ +> `const` **AAStarAirAccountFactoryV7Artifact**: (\{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `AAStarAirAccountFactoryV7ABIData` + +Defined in: [packages/core/src/abis/index.ts:184](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L184) diff --git a/api/@aastar/sdk/variables/AAStarAirAccountV7ABI.md b/api/@aastar/sdk/variables/AAStarAirAccountV7ABI.md new file mode 100644 index 000000000..1881ad9f2 --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarAirAccountV7ABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarAirAccountV7ABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:97](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L97) diff --git a/api/@aastar/sdk/variables/AAStarAirAccountV7Artifact.md b/api/@aastar/sdk/variables/AAStarAirAccountV7Artifact.md new file mode 100644 index 000000000..c14a48f5a --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarAirAccountV7Artifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarAirAccountV7Artifact**: `object` = `AAStarAirAccountV7ABIData` + +Defined in: [packages/core/src/abis/index.ts:98](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L98) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: ...[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/sdk/variables/AAStarBLSAggregatorABI.md b/api/@aastar/sdk/variables/AAStarBLSAggregatorABI.md new file mode 100644 index 000000000..d0484fd10 --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarBLSAggregatorABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarBLSAggregatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:214](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L214) diff --git a/api/@aastar/sdk/variables/AAStarBLSAggregatorArtifact.md b/api/@aastar/sdk/variables/AAStarBLSAggregatorArtifact.md new file mode 100644 index 000000000..cdb673875 --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarBLSAggregatorArtifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarBLSAggregatorArtifact**: `object` = `AAStarBLSAggregatorABIData` + +Defined in: [packages/core/src/abis/index.ts:215](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L215) + +## Type Declaration + +### abi + +> **abi**: (\{ `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: `never`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/sdk/variables/AAStarBLSAlgorithmABI.md b/api/@aastar/sdk/variables/AAStarBLSAlgorithmABI.md new file mode 100644 index 000000000..3a6472e28 --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarBLSAlgorithmABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarBLSAlgorithmABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:211](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L211) diff --git a/api/@aastar/sdk/variables/AAStarBLSAlgorithmArtifact.md b/api/@aastar/sdk/variables/AAStarBLSAlgorithmArtifact.md new file mode 100644 index 000000000..c2e439925 --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarBLSAlgorithmArtifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarBLSAlgorithmArtifact**: `object` = `AAStarBLSAlgorithmABIData` + +Defined in: [packages/core/src/abis/index.ts:212](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L212) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/sdk/variables/AAStarValidatorABI.md b/api/@aastar/sdk/variables/AAStarValidatorABI.md new file mode 100644 index 000000000..52edcfa0d --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarValidatorABI.md @@ -0,0 +1,3 @@ +> `const` **AAStarValidatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:206](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L206) diff --git a/api/@aastar/sdk/variables/AAStarValidatorArtifact.md b/api/@aastar/sdk/variables/AAStarValidatorArtifact.md new file mode 100644 index 000000000..d4c05c13d --- /dev/null +++ b/api/@aastar/sdk/variables/AAStarValidatorArtifact.md @@ -0,0 +1,9 @@ +> `const` **AAStarValidatorArtifact**: `object` = `AAStarValidatorABIData` + +Defined in: [packages/core/src/abis/index.ts:207](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L207) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/sdk/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md b/api/@aastar/sdk/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md new file mode 100644 index 000000000..3f6bc908b --- /dev/null +++ b/api/@aastar/sdk/variables/AGENT_IDENTITY_REGISTRY_ADDRESS.md @@ -0,0 +1,3 @@ +> **AGENT\_IDENTITY\_REGISTRY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L45) diff --git a/api/@aastar/sdk/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md b/api/@aastar/sdk/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md new file mode 100644 index 000000000..3db8e761e --- /dev/null +++ b/api/@aastar/sdk/variables/AGENT_REPUTATION_REGISTRY_ADDRESS.md @@ -0,0 +1,3 @@ +> **AGENT\_REPUTATION\_REGISTRY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L46) diff --git a/api/@aastar/sdk/variables/ALL_ADDRESSES.md b/api/@aastar/sdk/variables/ALL_ADDRESSES.md new file mode 100644 index 000000000..e8a13097f --- /dev/null +++ b/api/@aastar/sdk/variables/ALL_ADDRESSES.md @@ -0,0 +1,87 @@ +> `const` **ALL\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L116) + +All Addresses Combined (for reference) + +## Type Declaration + +### agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +### agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + +### aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` + +### blsAggregator + +> `readonly` **blsAggregator**: `` `0x${string}` `` = `BLS_AGGREGATOR_ADDRESS` + +### bPNTs + +> `readonly` **bPNTs**: `` `0x${string}` `` + +### dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +### entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` + +### gToken + +> `readonly` **gToken**: `` `0x${string}` `` = `GTOKEN_ADDRESS` + +### gTokenStaking + +> `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` + +### microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + +### mockUSDT + +> `readonly` **mockUSDT**: `` `0x${string}` `` + +### mySBT + +> `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` + +### paymasterFactory + +> `readonly` **paymasterFactory**: `` `0x${string}` `` = `PAYMASTER_FACTORY_ADDRESS` + +### paymasterV4 + +> `readonly` **paymasterV4**: `` `0x${string}` `` + +### paymasterV4\_1 + +> `readonly` **paymasterV4\_1**: `` `0x${string}` `` + +### paymasterV4\_1iImplementation + +> `readonly` **paymasterV4\_1iImplementation**: `` `0x${string}` `` = `PAYMASTER_V4_IMPL_ADDRESS` + +### registry + +> `readonly` **registry**: `` `0x${string}` `` = `REGISTRY_ADDRESS` + +### simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `` `0x${string}` `` + +### superPaymaster + +> `readonly` **superPaymaster**: `` `0x${string}` `` = `SUPER_PAYMASTER_ADDRESS` + +### xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` diff --git a/api/@aastar/sdk/variables/ALL_ROLES.md b/api/@aastar/sdk/variables/ALL_ROLES.md new file mode 100644 index 000000000..f2786786d --- /dev/null +++ b/api/@aastar/sdk/variables/ALL_ROLES.md @@ -0,0 +1,5 @@ +> `const` **ALL\_ROLES**: readonly \[`` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``\] + +Defined in: [packages/core/src/roles.ts:236](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L236) + +All defined roles array (for iteration) diff --git a/api/@aastar/sdk/variables/APNTS_ADDRESS.md b/api/@aastar/sdk/variables/APNTS_ADDRESS.md new file mode 100644 index 000000000..6e451bd0b --- /dev/null +++ b/api/@aastar/sdk/variables/APNTS_ADDRESS.md @@ -0,0 +1,3 @@ +> **APNTS\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L43) diff --git a/api/@aastar/sdk/variables/AgentRegistryABI.md b/api/@aastar/sdk/variables/AgentRegistryABI.md new file mode 100644 index 000000000..84dbc33ab --- /dev/null +++ b/api/@aastar/sdk/variables/AgentRegistryABI.md @@ -0,0 +1,3 @@ +> `const` **AgentRegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:186](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L186) diff --git a/api/@aastar/sdk/variables/AgentRegistryArtifact.md b/api/@aastar/sdk/variables/AgentRegistryArtifact.md new file mode 100644 index 000000000..4bdd67a9a --- /dev/null +++ b/api/@aastar/sdk/variables/AgentRegistryArtifact.md @@ -0,0 +1,3 @@ +> `const` **AgentRegistryArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `AgentRegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:187](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L187) diff --git a/api/@aastar/sdk/variables/AirAccountDelegateABI.md b/api/@aastar/sdk/variables/AirAccountDelegateABI.md new file mode 100644 index 000000000..801d7b4f4 --- /dev/null +++ b/api/@aastar/sdk/variables/AirAccountDelegateABI.md @@ -0,0 +1,3 @@ +> `const` **AirAccountDelegateABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:201](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L201) diff --git a/api/@aastar/sdk/variables/AirAccountDelegateArtifact.md b/api/@aastar/sdk/variables/AirAccountDelegateArtifact.md new file mode 100644 index 000000000..008b40ecc --- /dev/null +++ b/api/@aastar/sdk/variables/AirAccountDelegateArtifact.md @@ -0,0 +1,3 @@ +> `const` **AirAccountDelegateArtifact**: (\{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `AirAccountDelegateABIData` + +Defined in: [packages/core/src/abis/index.ts:202](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L202) diff --git a/api/@aastar/sdk/variables/AirAccountExtensionABI.md b/api/@aastar/sdk/variables/AirAccountExtensionABI.md new file mode 100644 index 000000000..6fc6446fc --- /dev/null +++ b/api/@aastar/sdk/variables/AirAccountExtensionABI.md @@ -0,0 +1,3 @@ +> `const` **AirAccountExtensionABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:226](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L226) diff --git a/api/@aastar/sdk/variables/AirAccountExtensionArtifact.md b/api/@aastar/sdk/variables/AirAccountExtensionArtifact.md new file mode 100644 index 000000000..063dbe666 --- /dev/null +++ b/api/@aastar/sdk/variables/AirAccountExtensionArtifact.md @@ -0,0 +1,9 @@ +> `const` **AirAccountExtensionArtifact**: `object` = `AirAccountExtensionABIData` + +Defined in: [packages/core/src/abis/index.ts:227](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L227) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/sdk/variables/BLSAggregatorABI.md b/api/@aastar/sdk/variables/BLSAggregatorABI.md new file mode 100644 index 000000000..3525232f6 --- /dev/null +++ b/api/@aastar/sdk/variables/BLSAggregatorABI.md @@ -0,0 +1,3 @@ +> `const` **BLSAggregatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L122) diff --git a/api/@aastar/sdk/variables/BLSAggregatorArtifact.md b/api/@aastar/sdk/variables/BLSAggregatorArtifact.md new file mode 100644 index 000000000..04026926a --- /dev/null +++ b/api/@aastar/sdk/variables/BLSAggregatorArtifact.md @@ -0,0 +1,13 @@ +> `const` **BLSAggregatorArtifact**: `object` = `BLSAggregatorABIData` + +Defined in: [packages/core/src/abis/index.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L123) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a03461017957601f612f1938819003918201601f19168301916001600160401b0383118484101761017d578084926060946040528339810103126101795761004781610191565b90610060604061005960208401610191565b9201610191565b3315610166575f8054336001600160a01b0319821681178355604051959290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001805560036009556007600a556001600160a01b0316918215610140576001600160a01b0316908115610153576001600160a01b03169182156101405760805260018060a01b0319600254161760025560018060a01b03196003541617600355612d7390816101a682396080518181816101e601528181611536015281816116a7015281816121d201526125ae0152f35b82634726455360e11b5f5260045260245ffd5b50634726455360e11b5f5260045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101795756fe60806040526004361015610011575f80fd5b5f3560e01c806306433b1b146101b45780630d8b9eab146101af5780632399c309146101aa578063300b0b35146101a55780633b60288a146101a057806353f10a4b1461019b57806354fd4d50146101965780635ae48ba4146101915780635e1a03a21461018c5780636578b0cc14610187578063714897df14610182578063715018a61461017d5780637f39a939146101785780638da5cb5b14610173578063a3c570931461016e578063a74c1ca814610169578063a9ea199214610164578063aded17c51461015f578063b33a3a621461015a578063bc8efe7514610155578063c2e7cbdd14610150578063c5246bf51461014b578063c85501bb14610146578063e79e973914610141578063f2fde38b1461013c5763fc3c298e14610137575f80fd5b611359565b6112d9565b611263565b611246565b611194565b6110cd565b6110a7565b610fdd565b610d1d565b610cbb565b610c87565b610c49565b610c24565b610ade565b610a87565b610a6c565b6109c1565b61060f565b6105e9565b61058a565b61056d565b61053e565b610436565b6102bc565b61020a565b6101c7565b5f9103126101c357565b5f80fd5b346101c3575f3660031901126101c35760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101c3575f3660031901126101c357602060ff600b54166040519015158152f35b6001600160a01b038116036101c357565b6044359060ff821682036101c357565b60a4359060ff821682036101c357565b9181601f840112156101c35782359167ffffffffffffffff83116101c3576020808501948460051b0101116101c357565b9181601f840112156101c35782359167ffffffffffffffff83116101c357602083818601950101116101c357565b346101c35760e03660031901126101c3576004356024356102dc8161022c565b6102e461023d565b9160643567ffffffffffffffff81116101c35761030590369060040161025d565b60843567ffffffffffffffff81116101c35761032590369060040161025d565b9160a4359360c4359767ffffffffffffffff89116101c35761034e61035699369060040161028e565b9890976114a2565b005b634e487b7160e01b5f52604160045260245ffd5b6060810190811067ffffffffffffffff82111761038857604052565b610358565b6080810190811067ffffffffffffffff82111761038857604052565b610100810190811067ffffffffffffffff82111761038857604052565b90601f8019910116810190811067ffffffffffffffff82111761038857604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b926104246060939695926080865260808601906103e8565b95602085015260408401521515910152565b346101c35760203660031901126101c3576004355f52600660205260405f206040515f82548060011c91600182168015610534575b602084108114610520578385528492602084019190811561050757506001146104c9575b5061049c925003826103c6565b6104c56002830154926104b86004600383015492015460ff1690565b906040519485948561040c565b0390f35b90506104d8855f5260205f2090565b905f915b8483106104f0575061049c9350015f61048f565b8054828401528593506020909201916001016104dc565b60ff191682525061049c93151560051b0190505f61048f565b634e487b7160e01b5f52602260045260245ffd5b92607f169261046b565b346101c35760203660031901126101c3576004355f526007602052602060ff60405f2054166040519015158152f35b346101c3575f3660031901126101c3576020600a54604051908152f35b346101c3575f3660031901126101c3576104c56040516105ab6040826103c6565b601381527f424c5341676772656761746f722d342e312e300000000000000000000000000060208201526040519182916020835260208301906103e8565b346101c3575f3660031901126101c35760206001600160a01b0360025416604051908152f35b346101c35760a03660031901126101c35760243560043561062f8261022c565b60443567ffffffffffffffff81116101c35761064f90369060040161028e565b9060643560843567ffffffffffffffff81116101c35761067390369060040161028e565b9561067c611b89565b61069d6106916003546001600160a01b031690565b6001600160a01b031690565b331415806109a4575b610991576001600160a01b038116968715610975578615610966576106dd6106d6885f52600760205260405f2090565b5460ff1690565b61095157600954841061090b57600d84116108c5575f93849361075e92610705368a8a6118ca565b8051602091820120604080519283018d81526001600160a01b038916918401919091526060830191909152608082018590524660a0830152906107558160c081015b03601f1981018352826103c6565b51902091611c4e565b604051828161076e818989611900565b03925af161077a61190d565b90156108a357506107a3610796845f52600760205260405f2090565b805460ff19166001179055565b6107b86106916003546001600160a01b031690565b80610811575b506107ef610805917ff75669458e39b3e450bebdf8e3f8396a4ca0b4057017be244aa5af43321b28079336916118ca565b8051602091820120604051908152918291820190565b0390a361035660018055565b6001600160a01b031690813b156101c35760405163424a3d7760e01b815260048101859052915f908390602490829084905af190811561089e577ff75669458e39b3e450bebdf8e3f8396a4ca0b4057017be244aa5af43321b280793610805936107ef93610884575b50935091506107be565b806108925f610898936103c6565b806101b9565b5f61087a565b61181b565b60405163020c65b360e11b81529081906108c190866004840161193c565b0390fd5b6040516305519d6f60e51b815260206004820152601560248201527f5468726573686f6c642065786365656473206d617800000000000000000000006044820152606490fd5b6040516305519d6f60e51b815260206004820152601760248201527f5468726573686f6c642062656c6f77206d696e696d756d0000000000000000006044820152606490fd5b632776407360e11b5f52600487905260245b5ffd5b630992f7ad60e01b5f5260045ffd5b63d08525e960e01b5f526001600160a01b03821660045260245ffd5b63d86ad9cf60e01b5f523360045260245ffd5b506109b96106916001600160a01b035f541690565b3314156106a6565b346101c35760203660031901126101c3576001600160a01b036004356109e68161022c565b6109ee611db9565b168015610a3757600354816001600160a01b0382167fea8290e94fa93ea70e8ae04f89229012a6a3afb80b6b604792bb931c09cafcba5f80a36001600160a01b03191617600355005b6040516305519d6f60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b6044820152606490fd5b346101c3575f3660031901126101c3576020604051600d8152f35b346101c3575f3660031901126101c357610a9f611db9565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101c35760203660031901126101c357600435610afa611db9565b60028110610bde57600d8111610b9857600a548111610b5257600954604080519182526020820183905261035692917fb06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b9190a1600955565b6040516305519d6f60e51b815260206004820152601f60248201527f6d696e5468726573686f6c64203e2064656661756c745468726573686f6c64006044820152606490fd5b6040516305519d6f60e51b815260206004820152600f60248201527f5468726573686f6c64203e204d617800000000000000000000000000000000006044820152606490fd5b6040516305519d6f60e51b815260206004820152601560248201527f4d696e207468726573686f6c6420746f6f206c6f7700000000000000000000006044820152606490fd5b346101c3575f3660031901126101c35760206001600160a01b035f5416604051908152f35b346101c35760203660031901126101c35760043560ff81168091036101c3575f52600560205260206001600160a01b0360405f205416604051908152f35b346101c35760203660031901126101c3576004355f526008602052602060405f2054604051908152f35b801515036101c357565b346101c35760203660031901126101c3577f1a8b72448c86ca4cfd93a54c5ef39ab3afd44079dd8c7f304d6892dd8c52ed136020600435610cfb81610cb1565b610d03611db9565b151560ff19600b541660ff821617600b55604051908152a1005b346101c3576101c03660031901126101c357600435610d3b8161022c565b60803660231901126101c357610d4f61024d565b906101003660c31901126101c357816001600160a01b038216928315610fc95760ff82168015908115610fbe575b50610fa857610d966106915f546001600160a01b031690565b3314610f985750610db0610dac600b5460ff1690565b1590565b610f895782330361099157610dc5908261219d565b610dcd611ddf565b610dd8610dac612401565b610f7a57610de5816124f8565b905b6004610e04826001600160a01b03165f52600460205260405f2090565b0154600881901c60ff169081610f69575b50610f4857610e42610691610e358460ff165f52600560205260405f2090565b546001600160a01b031690565b838115159182610f5e575b5050610f485790610f2060ff92610ef0610e6561188f565b610e6e36611953565b815260ff8516602082015260016040820152610e9b836001600160a01b03165f52600460205260405f2090565b600460409160608451805183556020810151600184015584810151600284015501516003820155019160ff60208201511660ff198454161783550151151561ff00825491151560081b169061ff001916179055565b610f058360ff165f52600560205260405f2090565b906001600160a01b03166001600160a01b0319825416179055565b16907f544d98ba9bb0b5ddc2f49ab57954b76f6ff7ffba5e89a9bcb73bbf77ffa31ed35f80a3005b63558bc2f160e01b5f5260ff821660045260245ffd5b14159050835f610e4d565b60ff8481169116141590505f610e15565b6339c93aa560e11b5f5260045ffd5b632564727160e21b5f5260045ffd5b919050610fa3611ddf565b610de7565b63839797cd60e01b5f5260ff821660045260245ffd5b600d9150115f610d7d565b634726455360e11b5f90815260045260245ffd5b346101c35760203660031901126101c3576001600160a01b036004356110028161022c565b61100a611db9565b16805f526004602052600460405f200180549060ff8260081c16156110945761104461103860ff9360ff1690565b825461ff001916909255565b61106c61105c8260ff165f52600560205260405f2090565b80546001600160a01b0319169055565b16907f2cd272f77807374f441a41070466b148ec96b0a2426251231e1f61c1161f61b55f80a3005b8263590a9e9d60e11b5f5260045260245ffd5b346101c3575f3660031901126101c35760206001600160a01b0360035416604051908152f35b346101c35760203660031901126101c3576001600160a01b036004356110f28161022c565b6110fa6119c7565b50165f5260046020526040805f206104c561115161114b845161111c8161036c565b6004611127866119eb565b9586835201549060ff8083169283602084015260081c161515968791015260ff1690565b93151590565b60405193849384919260ff60a0929594606060c0860197805187526020810151602088015260408101516040880152015160608601521660808401521515910152565b346101c35760203660031901126101c3576004356111b0611db9565b600954811061120057600d8111610b9857600a54604080519182526020820183905261035692917fb06a54caabe58475c86c2bf9df3f2f06dd1213e9e10659c293117fe4893b274b9190a1600a55565b6040516305519d6f60e51b815260206004820152601260248201527f42656c6f77206d696e5468726573686f6c6400000000000000000000000000006044820152606490fd5b346101c3575f3660031901126101c3576020600954604051908152f35b346101c35760203660031901126101c3576001600160a01b036004356112888161022c565b611290611db9565b168015610a3757600254816001600160a01b0382167f1f7cd67c986d0cce4aa6f69075b5278a05438ef2a5d1abf6eeded51ba81232455f80a36001600160a01b03191617600255005b346101c35760203660031901126101c3576001600160a01b036004356112fe8161022c565b611306611db9565b168015611346576001600160a01b035f548282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b346101c35760803660031901126101c35760043560443560243560643567ffffffffffffffff81116101c35761139390369060040161028e565b9091801561149357600954841061090b57600d84116108c5576113b59061258c565b84819592951061147e576104c561146c87876113f56107476113f06113dc8a8c018c611a82565b946040519283916020830160209181520190565b6129f4565b61143f611400611a97565b92611409611b13565b94611412612b74565b61141b86611b67565b5261142585611b67565b5061142f86611b67565b5261143985611b67565b50612bf4565b61144883611b79565b5261145282611b79565b5061145c83611b79565b5261146682611b79565b50612c98565b60405190151581529081906020820190565b636b01174760e11b5f5260045260245260445ffd5b637489a07960e11b5f5260045ffd5b9896919493929097956114b3611b89565b6114c86106916003546001600160a01b031690565b33141580611729575b610991578915610966576114f06106d68b5f52600760205260405f2090565b611715576115268983611518896107478f89888d8d604051988997602089019b46978d6117c6565b519020600a54908a8a611c4e565b8315611698576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b156101c3575f92838c6115868c8c898b986040519d8e9a8b998a98631b02e44f60e01b8a5260048a01611846565b03925af192831561089e577f5ce6898a418ad55caa812016e4cdd4a200158714e584a9627d17df3369316ef393611684575b50604080519182526020820192909252a15b6001600160a01b038416611671575b505050506115f2610796825f52600760205260405f2090565b6116076106916003546001600160a01b031690565b8061161a575b505061161860018055565b565b6001600160a01b0316803b156101c35760405163424a3d7760e01b815260048101929092525f908290602490829084905af1801561089e5761165d575b8061160d565b806108925f61166b936103c6565b5f611657565b61167b9385611d01565b5f8080806115d9565b806108925f611692936103c6565b5f6115b8565b50505050506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b156101c35760405163424a3d7760e01b815260048101879052905f908290602490829084905af1801561089e57611701575b506115ca565b806108925f61170f936103c6565b5f6116fb565b632776407360e11b5f5260048a905260245ffd5b5061173e6106916001600160a01b035f541690565b3314156114d1565b916020908281520191905f5b81811061175f5750505090565b9091926020806001926001600160a01b03873561177b8161022c565b168152019401929101611752565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116101c35760209260051b809284830137010190565b9593909460ff60c098946001600160a01b0361180395611811999e9d9c9e8b521660208a015216604088015260e0606088015260e0870191611746565b918483036080860152611789565b9460a08201520152565b6040513d5f823e3d90fd5b908060209392818452848401375f828201840152601f01601f1916010190565b939161186b906118799461188c9a98999793875260a0602088015260a0870191611746565b918483036040860152611789565b9360608201526080818503910152611826565b90565b604051906116186060836103c6565b60405190611618610180836103c6565b67ffffffffffffffff811161038857601f01601f191660200190565b9291926118d6826118ae565b916118e460405193846103c6565b8294818452818301116101c3578281602093845f960137010152565b908092918237015f815290565b3d15611937573d9061191e826118ae565b9161192c60405193846103c6565b82523d5f602084013e565b606090565b60409061188c9392815281602082015201906103e8565b60809060231901126101c3576040519061196c8261038d565b6024358252604435602083015260643560408301526084356060830152565b91908260809103126101c3576040516119a38161038d565b60608082948035845260208101356020850152604081013560408501520135910152565b604051906119d48261038d565b5f6060838281528260208201528260408201520152565b906040516119f88161038d565b6060600382948054845260018101546020850152600281015460408501520154910152565b9190826101009103126101c357604051611a36816103a9565b60e0808294803584526020810135602085015260408101356040850152606081013560608501526080810135608085015260a081013560a085015260c081013560c08501520135910152565b90610100828203126101c35761188c91611a1d565b60405160609190611aa883826103c6565b6002815291601f1901825f5b828110611ac057505050565b602090611acb6119c7565b82828501015201611ab4565b60405190611ae4826103a9565b5f60e0838281528260208201528260408201528260608201528260808201528260a08201528260c08201520152565b60405160609190611b2483826103c6565b6002815291601f1901825f5b828110611b3c57505050565b602090611b47611ad7565b82828501015201611b30565b634e487b7160e01b5f52603260045260245ffd5b805115611b745760200190565b611b53565b805160011015611b745760400190565b600260015414611b9a576002600155565b633ee5aeb560e01b5f5260045ffd5b91906040838203126101c35782359260208101359067ffffffffffffffff82116101c357019080601f830112156101c35781602061188c933591016118ca565b90816101009103126101c35760e060405191611c04836103a9565b805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b611c5d91939293810190611ba9565b90600954831061090b57600d83116108c557611c789061258c565b83819492941061147e57505091610dac916113f56107476113f06113dc87602080611ca89a518301019101611be9565b611cae57565b63729d0f6b60e01b5f5260045ffd5b9391906001600160a01b031684526003811015611ced5783606091602061188c9601528160408201520191611826565b634e487b7160e01b5f52602160045260245ffd5b92919360ff8516906003821015611ced57611d2a6106916106916002546001600160a01b031690565b803b156101c357611d56945f8094604051978895869485936303ce96a160e11b85528a60048601611cbd565b03925af190811561089e577f85137418138b73abf7daf3f3556f050e536be403436e0ee7649eaee69d1faaca926001600160a01b0392611da5575b5060405160ff9590951685521692602090a3565b806108925f611db3936103c6565b5f611d91565b6001600160a01b035f54163303611dcc57565b63118cdaa760e01b5f523360045260245ffd5b602435801580611f5e575b80611f54575b80611f4a575b611f3b5760443560643591608435925f806040516020810190611e50816107478a888b8b88929091610100949284526020840152604083015260608201525f60808201525f60a08201525f60c08201525f60e08201520190565b5190600b5afa611e5e61190d565b5015611f3b57604080516020810193845290810193909352606083015260808201929092527f73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff0000000160a08201525f918291611eba8160c08101610747565b5190600c5afa611ec861190d565b9015611f0e576080815103611f0e57602081015160408201519160806060820151910151911592831593611f31575b508215611f27575b508115611f1d575b50611f0e57565b6318a2a1df60e31b5f5260045ffd5b905015155f611f07565b151591505f611eff565b151592505f611ef7565b631d3d531b60e21b5f5260045ffd5b5060843515611df6565b5060643515611df0565b5060443515611dea565b519061161882610cb1565b908160209103126101c3575161188c81610cb1565b908160209103126101c3575161188c8161022c565b519063ffffffff821682036101c357565b519061ffff821682036101c357565b929192611fc9826118ae565b91611fd760405193846103c6565b8294818452818301116101c3578281602093845f96015e010152565b9080601f830112156101c357815161188c92602001611fbd565b51906116188261022c565b6020818303126101c35780519067ffffffffffffffff82116101c3570190610180828203126101c35761204961189e565b91805183526020810151602084015261206460408201611f9d565b604084015261207560608201611f9d565b606084015261208660808201611f9d565b608084015261209760a08201611f9d565b60a08401526120a860c08201611fae565b60c08401526120b960e08201611f68565b60e084015261010081015161010084015261012081015167ffffffffffffffff81116101c357610160926120ee918301611ff3565b610120840152612101610140820161200d565b610140840152015161016082015290565b51906fffffffffffffffffffffffffffffffff821682036101c357565b919060a0838203126101c35761214483612112565b9261215160208201612112565b92604082015165ffffffffffff811681036101c3579260608301519260808101519067ffffffffffffffff82116101c357019080601f830112156101c357815161188c92602001611fbd565b604051632474521560e21b81525f516020612d475f395f51905f5260048201526001600160a01b0382811660248301529192917f00000000000000000000000000000000000000000000000000000000000000001690602081604481855afa90811561089e575f916123d2575b50156123af57604051634133006760e11b8152602081600481855afa801561089e576001600160a01b03915f91612380575b50169081156123715760405163b5e936ab60e01b81525f516020612d475f395f51905f526004820152905f90829060249082905afa90811561089e575f9161234f575b50516040516318581cf760e11b81526001600160a01b03851660048201525f516020612d475f395f51905f52602482015290915f90829060449082905afa801561089e576fffffffffffffffffffffffffffffffff915f91612329575b50168181106122eb5750505050565b604051632fd6c42560e01b815260ff9390931660048401526001600160a01b0393909316602483015260448201929092526064810191909152608490fd5b61234591503d805f833e61233d81836103c6565b81019061212f565b505050505f6122dc565b61236b91503d805f833e61236381836103c6565b810190612018565b5f61227f565b63204cba0960e01b5f5260045ffd5b6123a2915060203d6020116123a8575b61239a81836103c6565b810190611f88565b5f61223c565b503d612390565b630945cae160e31b5f5260ff82166004526001600160a01b03831660245260445ffd5b6123f4915060203d6020116123fa575b6123ec81836103c6565b810190611f73565b5f61220a565b503d6123e2565b61188c61246160243560443560643560843591604051937f424c53313233383147315f584d443a5348412d3235365f504f505f76313a00006020860152603e850152605e840152607e830152609e820152609e81526113f060be826103c6565b612469611a97565b612471611b13565b9161247a612b74565b61248383611b67565b5261248d82611b67565b506124993660c4611a1d565b6124a284611b67565b526124ac83611b67565b5061143f6124bb36602461198b565b612bf4565b634e487b7160e01b5f52601160045260245ffd5b60ff1660ff81146124e55760010190565b6124c0565b90600182018092116124e557565b6001600160a01b03165f526004602052600460405f20015460ff8160081c16612574575060015b600d60ff8216111561254657610963600e5b63839797cd60e01b5f5260ff16600452602490565b612561610691610e358360ff165f52600560205260405f2090565b1561188c5761256f906124d4565b61251f565b60ff1690565b60ff5f199116019060ff82116124e557565b6125946119c7565b915f9180600d1c6128da57604051634133006760e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169190602081600481865afa801561089e576001600160a01b03915f916128bb575b50169182156123715760405163b5e936ab60e01b81525f516020612d475f395f51905f5260048201525f81602481855afa90811561089e575f916128a1575b5092909251915f936001925b600d60ff8516111561265a5750505050501561149357565b919397909296946001856126706125748b61257a565b1c16156128935761268f610e358960ff165f52600560205260405f2090565b916001600160a01b0383161561287d576126ba836001600160a01b03165f52600460205260405f2090565b926126d0610dac600486015460ff9060081c1690565b61286757604051632474521560e21b81525f516020612d475f395f51905f5260048201526001600160a01b03821660248201526020816044818a5afa90811561089e575f91612849575b5015612827576040516318581cf760e11b81526001600160a01b03821660048201525f516020612d475f395f51905f5260248201525f81604481895afa801561089e576fffffffffffffffffffffffffffffffff915f91612809575b50168b81106127d1575050816127af575050612791906119eb565b966127a66127a06001966124ea565b976124d4565b92909391612642565b6127cb6127a0916127c56127a694999c956119eb565b90612d0d565b996124ea565b604051632fd6c42560e01b815260ff8c1660048201526001600160a01b039290921660248301526044820152606481018b9052608490fd5b61281d91503d805f833e61233d81836103c6565b505050505f612776565b630945cae160e31b5f5260ff8a166004526001600160a01b031660245260445ffd5b612861915060203d81116123fa576123ec81836103c6565b5f61271a565b63173ec76f60e31b5f5260ff8a1660045260245ffd5b63173ec76f60e31b5f5260ff891660045260245ffd5b94966127a6909891986124d4565b6128b591503d805f833e61236381836103c6565b5f612636565b6128d4915060203d6020116123a85761239a81836103c6565b5f6125f7565b610963600e612531565b5f81537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e600182015263554c5f2360e01b602182015260250190565b600181537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e600182015263554c5f2360e01b602182015260250190565b9081537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e600182015263554c5f2360e01b602182015260250190565b6020915f9160025afa60203d1416156101c3575f5190565b906101006040928383606083015e60055afa60403d1416156101c357565b9060806101009260115afa6101003d1416156129e757565b6389083b915f526004601cfd5b906129fd611ad7565b916040516101008101916040368437612a4581519161014084019281602001845e518301600160f81b61014082015283612a3d61014260ff1993016128e4565b030184612999565b9283602052838152610120830193612a6b60ff1985612a6388612920565b030183612999565b8452600260016020865b8051851886520191612a9660ff1988612a8e848c61295d565b030186612999565b8352019160098314612aae5791602060019192612a75565b5050506040612b36926020612b4e96838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e0840152612b1283826129b1565b612b1f60408401826129b1565b612b2c60808401826129b1565b60c08301906129b1565b612b4084826129cf565b8361010001906080016129cf565b6101008261020081600d5afa6101003d141615612b6757565b63c55e5e335f526004601cfd5b612b7c6119c7565b906f17f1d3a73197d7942695638c4fa9ac0f82527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208301526f08b3f481e3aaa0f1a09e30ed741d8ae460408301527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e16060830152565b612bfc6119c7565b506040810180516060830191825191801580612c90575b612c89577f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab831115612c815760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab03905290565b60ff5f612c44565b5050505090565b508215612c13565b919082519160405193808303915f5b82868214612cd85790610100602060019301946080602084610180028c0192828951855e8901015191015e01612ca7565b505094602092505f9150846101800290600f5afa9160203d14915114161615612d00575f5190565b634df45e2f5f526004601cfd5b919060809081612d1b6119c7565b94855e8184015e60808261010081600b5afa60803d141615612d3957565b63d6cc76eb5f526004601cfdfe3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514da164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/BLSHelpers.md b/api/@aastar/sdk/variables/BLSHelpers.md new file mode 100644 index 000000000..fdff0d04a --- /dev/null +++ b/api/@aastar/sdk/variables/BLSHelpers.md @@ -0,0 +1,147 @@ +> `const` **BLSHelpers**: `object` + +Defined in: [packages/core/src/crypto/blsSigner.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/blsSigner.ts#L76) + +Helper functions for creating BLS proofs for Registry and BLSAggregator operations + +## Type Declaration + +### createReputationUpdateMessage() + +> **createReputationUpdateMessage**(`users`, `scores`, `epoch`): `` `0x${string}` `` + +Create message hash for reputation update + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `users` | `` `0x${string}` ``[] | +| `scores` | `bigint`[] | +| `epoch` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +### createSlashProposalMessage() + +> **createSlashProposalMessage**(`proposalId`): `` `0x${string}` `` + +Create message hash for slash proposal + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `proposalId` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +### encodeBLSProof() + +> **encodeBLSProof**(`aggregatedPublicKey`, `aggregatedSignature`, `messageMappingG2`, `signerMask`): `` `0x${string}` `` + +Encode BLS proof for Registry/Aggregator (v3 format) +Proof structure: (bytes pkG1, bytes sigG2, bytes msgG2, uint256 signerMask) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `aggregatedPublicKey` | `` `0x${string}` `` | +| `aggregatedSignature` | `` `0x${string}` `` | +| `messageMappingG2` | `` `0x${string}` `` | +| `signerMask` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +### ~~encodeDVTProof()~~ + +> **encodeDVTProof**(`signerMask`, `aggregatedSignature`): `` `0x${string}` `` + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `signerMask` | `bigint` | Bitmask of contributing slots (see [slotsToSignerMask](#slotstosignermask)). | +| `aggregatedSignature` | `` `0x${string}` `` | The BLS12-381 aggregated G2 signature (`sigG2`). | + +#### Returns + +`` `0x${string}` `` + +#### Deprecated + +SUPERSEDED by the explicit-`nodeIds` DVT wire (airaccount-contract +#110, LIVE-verified). The DEPLOYED verifier decodes an explicit `nodeIds` list + +256-byte `blsSig`, NOT this `(signerMask, sigG2)` ABI tuple. Use +import('./dvtWire').encodeDVTVerifierProof (verifier-level) or +import('./dvtWire').encodeDVTAccountSignature (account-level) instead. +Retained for backward compatibility only. + +Encode a DVT co-sign proof (early `signerMask` design, hub #42, decision B). + +Under decision B the on-chain verifier recomputes `msgG2 = hashToG2(userOpHash)` +itself and rebuilds the aggregate public key from `signerMask` → registered +keys, so the proof carries ONLY `(signerMask, sigG2)`. pkG1 and msgG2 are NOT +included — this is intentionally narrower than the v3 [encodeBLSProof](#encodeblsproof) +still used by the slash/reputation path. + +### encodeReputationProof() + +> **encodeReputationProof**(`signature`, `publicKey`, `signerMask`): `` `0x${string}` `` + +Encode Reputation Proof (for test compatibility) +Matches format: (signature, publicKey, signerMask) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `signature` | `` `0x${string}` `` | +| `publicKey` | `` `0x${string}` `` | +| `signerMask` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +### ~~slotsToSignerMask()~~ + +> **slotsToSignerMask**(`slots`): `bigint` + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `slots` | `number`[] | Registration slots (1-indexed, `>= 1`) of the contributing signers. | + +#### Returns + +`bigint` + +The uint256 signerMask. + +#### Deprecated + +SUPERSEDED by the explicit-`nodeIds` DVT wire (airaccount-contract +#110, LIVE-verified). The DEPLOYED `AAStarBLSAlgorithm` verifier takes an explicit +list of `bytes32` `nodeId`s, NOT a `signerMask` bitmask — `signerMask` was an early +design that the landed contract did not adopt. Use +import('./dvtWire').encodeDVTAccountSignature / +import('./dvtWire').encodeDVTVerifierProof instead. Retained for backward +compatibility with the legacy aggregator path only. + +Build a DVT co-sign `signerMask` from registration slots (frozen DVT program +spec, hub YetAnotherAA-Validator#42). + +The on-chain BLSAggregator addresses signers by REGISTRATION SLOT, not by +key-array index: bit `i` (LSB = 0) corresponds to slot `i + 1` (1-indexed) → +`validatorAtSlot[i + 1]`. So a validator registered at slot `s` sets bit `s - 1`. +Using a 0-indexed array position instead makes the contract rebuild the WRONG +aggregate public key → verification always fails. diff --git a/api/@aastar/sdk/variables/BLSValidatorABI.md b/api/@aastar/sdk/variables/BLSValidatorABI.md new file mode 100644 index 000000000..690d230f9 --- /dev/null +++ b/api/@aastar/sdk/variables/BLSValidatorABI.md @@ -0,0 +1,3 @@ +> `const` **BLSValidatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:125](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L125) diff --git a/api/@aastar/sdk/variables/BLSValidatorArtifact.md b/api/@aastar/sdk/variables/BLSValidatorArtifact.md new file mode 100644 index 000000000..09c13d707 --- /dev/null +++ b/api/@aastar/sdk/variables/BLSValidatorArtifact.md @@ -0,0 +1,13 @@ +> `const` **BLSValidatorArtifact**: `object` = `BLSValidatorABIData` + +Defined in: [packages/core/src/abis/index.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L126) + +## Type Declaration + +### abi + +> **abi**: `object`[] + +### bytecode + +> **bytecode**: `string` = `"0x608080604052346015576109b5908161001a8239f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c806354fd4d501461009d5763b8e72af61461002f575f80fd5b346100995760403660031901126100995760043567ffffffffffffffff811161009957610060903690600401610110565b6024359067ffffffffffffffff82116100995760209261008761008f933690600401610110565b929091610302565b6040519015158152f35b5f80fd5b34610099575f3660031901126100995760406100b881610193565b906012825260208201917f424c5356616c696461746f722d302e332e32000000000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b9181601f840112156100995782359167ffffffffffffffff8311610099576020838186019501011161009957565b60405190610100820182811067ffffffffffffffff82111761015f57604052565b634e487b7160e01b5f52604160045260245ffd5b604051906080820182811067ffffffffffffffff82111761015f57604052565b6040519190601f01601f1916820167ffffffffffffffff81118382101761015f57604052565b92919267ffffffffffffffff821161015f576101de601f8301601f1916602001610193565b938285528282011161009957815f926020928387013784010152565b9080601f8301121561009957816020610215933591016101b9565b90565b90816101009103126100995760e061022e61013e565b91805183526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c0840152015160e082015290565b610281610173565b905f82525f60208301525f60408301525f6060830152565b6102a161013e565b905f82525f60208301525f60408301525f60608301525f60808301525f60a08301525f60c08301525f60e0830152565b8051156102de5760200190565b634e487b7160e01b5f52603260045260245ffd5b8051600110156102de5760400190565b93929060c0811061087857811561087857840160808582031261009957843567ffffffffffffffff8111610099578161033c9187016101fa565b94602081013567ffffffffffffffff8111610099578261035d9183016101fa565b91604082013567ffffffffffffffff81116100995761037c92016101fa565b92608086805181010312610099576103e06103d06103e893608061039e610173565b9960208101518b52604081015160208c0152606081015160408c0152015160608a015260208082518301019101610218565b9460208082518301019101610218565b9236916101b9565b6103f0610299565b90604051610100810191604036843761046660678383519361014082019481602001865e518101600160f81b6101408201525f6101428201537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e61014382015263554c5f2360e01b610163820152030184610880565b9283602052838152610120830193600185536101218401907f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e825261014185019163554c5f2360e01b835260205f60458660025afa60203d141615610099575f51865290916045916101458701919060026020895b8051881889520190808b537f424c53313233383147325f584d443a5348412d3235365f535357555f524f5f4e835263554c5f2360e01b845260205f878a60025afa60203d141615610099575f51825260010195600987146105405795906020906104db565b5050505050505060406105cc9260206105e496838552525260016101a08401526f1a0111ea397fe69a4b1ba7b6434bacd76101c08401527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab6101e08401526105a88382610898565b6105b56040840182610898565b6105c26080840182610898565b60c0830190610898565b6105d683826108b6565b8261010001906080016108b6565b6101008161020081600d5afa6101003d14161561086b5780518251149081610858575b81610845575b81610832575b8161081f575b8161080c575b816107f9575b816107e7575b50156107e05761063b6060610193565b60028152936040925f5b8481106107c957506106576060610193565b93600285525f5b8181106107b25750509061071691610674610279565b6f17f1d3a73197d7942695638c4fa9ac0f81527fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb60208201526f08b3f481e3aaa0f1a09e30ed741d8ae460408201527ffcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e160608201526106f2886102d1565b526106fc876102d1565b50610706856102d1565b52610710846102d1565b506108db565b61071f856102f2565b52610729846102f2565b50610733826102f2565b5261073d816102f2565b508291835192604051948303915f5b8286821461077d5790610100602060019301946080602084610180028c0192828951855e8901015191015e0161074c565b505094602092505f9150846101800290600f5afa9160203d149151141616156107a5575f5190565b634df45e2f5f526004601cfd5b6020906107bd610299565b8282890101520161065e565b6020906107d4610279565b82828a01015201610645565b505f925050565b60e09150015160e0820151145f61062b565b905060c081015160c08301511490610625565b905060a081015160a0830151149061061f565b9050608081015160808301511490610619565b9050606081015160608301511490610613565b905060408101516040830151149061060d565b9050602081015160208301511490610607565b63c55e5e335f526004601cfd5b505f93505050565b6020915f9160025afa60203d141615610099575f5190565b906101006040928383606083015e60055afa60403d14161561009957565b9060806101009260115afa6101003d1416156108ce57565b6389083b915f526004601cfd5b6108e3610279565b506040810180516060830191825191801580610977575b610970577f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab8311156109685760ff60015b16016f1a0111ea397fe69a4b1ba7b6434bacd70390527f64774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab03905290565b60ff5f61092b565b5050505090565b5082156108fa56fea264697066735822122099a4bef546e35f7f419e6d425305ce27139d0f4e1e6ddc9748f154840fe1abc364736f6c63430008210033"` diff --git a/api/@aastar/sdk/variables/BLS_AGGREGATOR_ADDRESS.md b/api/@aastar/sdk/variables/BLS_AGGREGATOR_ADDRESS.md new file mode 100644 index 000000000..b28638868 --- /dev/null +++ b/api/@aastar/sdk/variables/BLS_AGGREGATOR_ADDRESS.md @@ -0,0 +1,3 @@ +> **BLS\_AGGREGATOR\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L39) diff --git a/api/@aastar/sdk/variables/BLS_POP_DST.md b/api/@aastar/sdk/variables/BLS_POP_DST.md new file mode 100644 index 000000000..ae23979ac --- /dev/null +++ b/api/@aastar/sdk/variables/BLS_POP_DST.md @@ -0,0 +1,13 @@ +> `const` **BLS\_POP\_DST**: `"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_"` = `'BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_'` + +Defined in: [packages/core/src/crypto/hashToField.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/hashToField.ts#L16) + +Frozen cross-repo DST (Domain Separation Tag) for the BLS-signature +Proof-of-Possession (POP) scheme. This MUST be byte-identical across: + - SuperPaymaster contracts/src/utils/BLS.sol (dstPrime) + - AAStar SDK this file + - YetAnotherAA-Validator src/utils/bls.util.ts (BLS_DST) + +NOTE: @noble/curves's `bls.G2.defaults.DST` is the `_NUL_` variant +("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_"); we deliberately override +it with the `_POP_` variant to match the on-chain contract. diff --git a/api/@aastar/sdk/variables/BLS_VALIDATOR_ADDRESS.md b/api/@aastar/sdk/variables/BLS_VALIDATOR_ADDRESS.md new file mode 100644 index 000000000..8d5fafe60 --- /dev/null +++ b/api/@aastar/sdk/variables/BLS_VALIDATOR_ADDRESS.md @@ -0,0 +1,3 @@ +> **BLS\_VALIDATOR\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L40) diff --git a/api/@aastar/sdk/variables/BPS_DENOMINATOR.md b/api/@aastar/sdk/variables/BPS_DENOMINATOR.md new file mode 100644 index 000000000..cea79f1ee --- /dev/null +++ b/api/@aastar/sdk/variables/BPS_DENOMINATOR.md @@ -0,0 +1,3 @@ +> `const` **BPS\_DENOMINATOR**: `10000` = `10000` + +Defined in: [packages/core/src/constants.ts:88](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L88) diff --git a/api/@aastar/sdk/variables/BRANDING.md b/api/@aastar/sdk/variables/BRANDING.md new file mode 100644 index 000000000..e28fe83e1 --- /dev/null +++ b/api/@aastar/sdk/variables/BRANDING.md @@ -0,0 +1,67 @@ +> `const` **BRANDING**: `object` + +Defined in: [packages/core/src/branding.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/branding.ts#L5) + +AAStar Community Branding Configuration + +## Type Declaration + +### colors + +> `readonly` **colors**: `object` + +#### colors.error + +> `readonly` **error**: `"#F44336"` = `"#F44336"` + +#### colors.gray100 + +> `readonly` **gray100**: `"#F3F4F6"` = `"#F3F4F6"` + +#### colors.gray50 + +> `readonly` **gray50**: `"#F9FAFB"` = `"#F9FAFB"` + +#### colors.gray700 + +> `readonly` **gray700**: `"#374151"` = `"#374151"` + +#### colors.gray800 + +> `readonly` **gray800**: `"#1F2937"` = `"#1F2937"` + +#### colors.gray900 + +> `readonly` **gray900**: `"#111827"` = `"#111827"` + +#### colors.primary + +> `readonly` **primary**: `"#FF6B35"` = `"#FF6B35"` + +#### colors.primaryLight + +> `readonly` **primaryLight**: `"#FF8C42"` = `"#FF8C42"` + +#### colors.secondary + +> `readonly` **secondary**: `"#4A90E2"` = `"#4A90E2"` + +#### colors.secondaryDark + +> `readonly` **secondaryDark**: `"#357ABD"` = `"#357ABD"` + +#### colors.success + +> `readonly` **success**: `"#4CAF50"` = `"#4CAF50"` + +#### colors.warning + +> `readonly` **warning**: `"#FFC107"` = `"#FFC107"` + +### icon + +> `readonly` **icon**: `"https://www.aastar.io/favicon.ico"` = `"https://www.aastar.io/favicon.ico"` + +### logo + +> `readonly` **logo**: `"https://raw.githubusercontent.com/jhfnetboy/MarkDownImg/main/img/202505031325963.png"` = `"https://raw.githubusercontent.com/jhfnetboy/MarkDownImg/main/img/202505031325963.png"` diff --git a/api/@aastar/sdk/variables/BREAD_COMMUNITY.md b/api/@aastar/sdk/variables/BREAD_COMMUNITY.md new file mode 100644 index 000000000..428cb66ff --- /dev/null +++ b/api/@aastar/sdk/variables/BREAD_COMMUNITY.md @@ -0,0 +1,8 @@ +> `const` **BREAD\_COMMUNITY**: [`CommunityConfig`](../interfaces/CommunityConfig.md) + +Defined in: [packages/core/src/communities.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L53) + +Bread Community +- Independent AOA Paymaster mode +- Uses bPNTs for gas payments +- MySBT for identity verification diff --git a/api/@aastar/sdk/variables/CANONICAL_ADDRESSES.md b/api/@aastar/sdk/variables/CANONICAL_ADDRESSES.md new file mode 100644 index 000000000..e8fc0150a --- /dev/null +++ b/api/@aastar/sdk/variables/CANONICAL_ADDRESSES.md @@ -0,0 +1,449 @@ +> `const` **CANONICAL\_ADDRESSES**: `object` + +Defined in: [packages/core/src/addresses.ts:17](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/addresses.ts#L17) + +## Type Declaration + +### 10 + +> `readonly` **10**: `object` + +#### 10.aaStarBLSAggregator + +> `readonly` **aaStarBLSAggregator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.aaStarBLSAlgorithm + +> `readonly` **aaStarBLSAlgorithm**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.aaStarValidator + +> `readonly` **aaStarValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentRegistry + +> `readonly` **agentRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.agentValidationRegistry + +> `readonly` **agentValidationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountDelegate + +> `readonly` **airAccountDelegate**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountExtension + +> `readonly` **airAccountExtension**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountFactoryV7 + +> `readonly` **airAccountFactoryV7**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.airAccountV7Impl + +> `readonly` **airAccountV7Impl**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.aPNTs + +> `readonly` **aPNTs**: `"0x0B41C78081B5A141eb4C3C7E7FD8E58A7Bde553B"` = `"0x0B41C78081B5A141eb4C3C7E7FD8E58A7Bde553B"` + +#### 10.blsAggregator + +> `readonly` **blsAggregator**: `"0x1C305372ecc5a36CBef1FA371392234bCD55eB19"` = `"0x1C305372ecc5a36CBef1FA371392234bCD55eB19"` + +#### 10.blsValidator + +> `readonly` **blsValidator**: `"0xA88ADec5A8dc422B57488272d5aD5913d728942A"` = `"0xA88ADec5A8dc422B57488272d5aD5913d728942A"` + +#### 10.calldataParserRegistry + +> `readonly` **calldataParserRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.dvtValidator + +> `readonly` **dvtValidator**: `"0x31Ede6454a56293f7cf2323CA5d5F9a6230558Fb"` = `"0x31Ede6454a56293f7cf2323CA5d5F9a6230558Fb"` + +#### 10.entryPoint + +> `readonly` **entryPoint**: `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 10.forceExitModule + +> `readonly` **forceExitModule**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.gToken + +> `readonly` **gToken**: `"0x8d6Fe002dDacCcFBD377F684EC1825f2E1ab7ef6"` = `"0x8d6Fe002dDacCcFBD377F684EC1825f2E1ab7ef6"` + +#### 10.microPaymentChannel + +> `readonly` **microPaymentChannel**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.paymasterFactory + +> `readonly` **paymasterFactory**: `"0x58A7F6E44a57028A255794119F8b37124c9a7eB8"` = `"0x58A7F6E44a57028A255794119F8b37124c9a7eB8"` + +#### 10.paymasterV4 + +> `readonly` **paymasterV4**: `"0x67a70a578E142b950987081e7016906ae4F56Df4"` = `"0x67a70a578E142b950987081e7016906ae4F56Df4"` + +#### 10.paymasterV4Impl + +> `readonly` **paymasterV4Impl**: `"0xc4dd13F7825409EEC13FBCBdD9D8f6d618207cca"` = `"0xc4dd13F7825409EEC13FBCBdD9D8f6d618207cca"` + +#### 10.pnts + +> `readonly` **pnts**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.policyRegistry + +> `readonly` **policyRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.priceFeed + +> `readonly` **priceFeed**: `"0x13e3Ee699D1909E989722E753853AE30b17e08c5"` = `"0x13e3Ee699D1909E989722E753853AE30b17e08c5"` + +#### 10.registry + +> `readonly` **registry**: `"0x997686219F31405503D32728B1f094F115EF24e7"` = `"0x997686219F31405503D32728B1f094F115EF24e7"` + +#### 10.reputationSystem + +> `readonly` **reputationSystem**: `"0xA9560898dC0eE4F9Ed3F1db17dbf74dE65e925c2"` = `"0xA9560898dC0eE4F9Ed3F1db17dbf74dE65e925c2"` + +#### 10.sbt + +> `readonly` **sbt**: `"0x28eBFc5fc03B1d7648254AbF1C7B39DbFdef1a94"` = `"0x28eBFc5fc03B1d7648254AbF1C7B39DbFdef1a94"` + +#### 10.sessionKeyValidator + +> `readonly` **sessionKeyValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` = `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` + +#### 10.staking + +> `readonly` **staking**: `"0x7A1216C2d814D2389698C64eD23AA1aA9Eb6343E"` = `"0x7A1216C2d814D2389698C64eD23AA1aA9Eb6343E"` + +#### 10.superPaymaster + +> `readonly` **superPaymaster**: `"0xA2c9A6e95f19f5D2a364CBCbB5f0b32B1B4d140E"` = `"0xA2c9A6e95f19f5D2a364CBCbB5f0b32B1B4d140E"` + +#### 10.timelockController + +> `readonly` **timelockController**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.x402Facilitator + +> `readonly` **x402Facilitator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 10.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"0x864971a26384d9DCC7115f0bBC428e2623F28b6e"` = `"0x864971a26384d9DCC7115f0bBC428e2623F28b6e"` + +### 11155111 + +> `readonly` **11155111**: `object` + +#### 11155111.aaStarBLSAggregator + +> `readonly` **aaStarBLSAggregator**: `"0x77f7bf95B8602b7851f392F412257539242947e0"` = `"0x77f7bf95B8602b7851f392F412257539242947e0"` + +#### 11155111.aaStarBLSAlgorithm + +> `readonly` **aaStarBLSAlgorithm**: `"0x68c381Ad3A2e3380F22840008027E9Ec2783F43A"` = `"0x68c381Ad3A2e3380F22840008027E9Ec2783F43A"` + +#### 11155111.aaStarValidator + +> `readonly` **aaStarValidator**: `"0xC20A986Bcd5bF5Cc2fE5fFde6b155B8419E0389e"` = `"0xC20A986Bcd5bF5Cc2fE5fFde6b155B8419E0389e"` + +#### 11155111.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `"0x8004A818BFB912233c491871b3d84c89A494BD9e"` = `"0x8004A818BFB912233c491871b3d84c89A494BD9e"` + +#### 11155111.agentRegistry + +> `readonly` **agentRegistry**: `"0x3895b3E6fEf4e121E6289dC7881A0eEd5283C652"` = `"0x3895b3E6fEf4e121E6289dC7881A0eEd5283C652"` + +#### 11155111.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `"0x8004B663056A597Dffe9eCcC1965A193B7388713"` = `"0x8004B663056A597Dffe9eCcC1965A193B7388713"` + +#### 11155111.agentValidationRegistry + +> `readonly` **agentValidationRegistry**: `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"` = `"0x8004Cb1BF31DAf7788923b405b754f57acEB4272"` + +#### 11155111.airAccountDelegate + +> `readonly` **airAccountDelegate**: `"0xA8D7f70c9D36bC4a4eb14F0dCEE19053FCB3309f"` = `"0xA8D7f70c9D36bC4a4eb14F0dCEE19053FCB3309f"` + +#### 11155111.airAccountExtension + +> `readonly` **airAccountExtension**: `"0xD61C0F3DE6D98070E9986743d35A56d56855A249"` = `"0xD61C0F3DE6D98070E9986743d35A56d56855A249"` + +#### 11155111.airAccountFactoryV7 + +> `readonly` **airAccountFactoryV7**: `"0x52c5190E7308Ea9B149157FF016cC99B6C6bf984"` = `"0x52c5190E7308Ea9B149157FF016cC99B6C6bf984"` + +#### 11155111.airAccountV7Impl + +> `readonly` **airAccountV7Impl**: `"0x7fe62d512f0b8238DE6Ff17175DcE40eA312bBF2"` = `"0x7fe62d512f0b8238DE6Ff17175DcE40eA312bBF2"` + +#### 11155111.aPNTs + +> `readonly` **aPNTs**: `"0x9e66B457E0ABb1F139FD8A596d00f784eBA2873b"` = `"0x9e66B457E0ABb1F139FD8A596d00f784eBA2873b"` + +#### 11155111.blsAggregator + +> `readonly` **blsAggregator**: `"0x15387e161c1b3dAe7c66Fbd5c1F32837B58B2e79"` = `"0x15387e161c1b3dAe7c66Fbd5c1F32837B58B2e79"` + +#### 11155111.blsValidator + +> `readonly` **blsValidator**: `"0x0A71C5a32b8CBC517523D2C88b539Ab22AeF0654"` = `"0x0A71C5a32b8CBC517523D2C88b539Ab22AeF0654"` + +#### 11155111.calldataParserRegistry + +> `readonly` **calldataParserRegistry**: `"0xb8Af1C039dF88F6bD9fE36Ca683492a3c09e7D17"` = `"0xb8Af1C039dF88F6bD9fE36Ca683492a3c09e7D17"` + +#### 11155111.dvtValidator + +> `readonly` **dvtValidator**: `"0x19BA9829C784E4A41b68960b9c0bA55f83718997"` = `"0x19BA9829C784E4A41b68960b9c0bA55f83718997"` + +#### 11155111.entryPoint + +> `readonly` **entryPoint**: `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 11155111.forceExitModule + +> `readonly` **forceExitModule**: `"0xd882a16Ea37Be463D1885EF4a397Dbbf157dC211"` = `"0xd882a16Ea37Be463D1885EF4a397Dbbf157dC211"` + +#### 11155111.gToken + +> `readonly` **gToken**: `"0x20a051502a7AE6e40cfFd6EBe59057538E698984"` = `"0x20a051502a7AE6e40cfFd6EBe59057538E698984"` + +#### 11155111.microPaymentChannel + +> `readonly` **microPaymentChannel**: `"0x405851A141Cde827E33247d4D4089Af2814c2FF5"` = `"0x405851A141Cde827E33247d4D4089Af2814c2FF5"` + +#### 11155111.paymasterFactory + +> `readonly` **paymasterFactory**: `"0x0Aa06EA5295eeD4D48c93c594Db1CBf3626971A5"` = `"0x0Aa06EA5295eeD4D48c93c594Db1CBf3626971A5"` + +#### 11155111.paymasterV4 + +> `readonly` **paymasterV4**: `"0x1f0D4eF151a79948070D387BaC43b1321F0c41e3"` = `"0x1f0D4eF151a79948070D387BaC43b1321F0c41e3"` + +#### 11155111.paymasterV4Impl + +> `readonly` **paymasterV4Impl**: `"0x59DCA5861aaDA602fE1BFbfcc36DFAc36C58623d"` = `"0x59DCA5861aaDA602fE1BFbfcc36DFAc36C58623d"` + +#### 11155111.pnts + +> `readonly` **pnts**: `"0xC687f8a115D308ECD39658a8EE33bC3c8F75EE31"` = `"0xC687f8a115D308ECD39658a8EE33bC3c8F75EE31"` + +#### 11155111.policyRegistry + +> `readonly` **policyRegistry**: `"0x8c2488d46d5447418558c38AA6441720df656094"` = `"0x8c2488d46d5447418558c38AA6441720df656094"` + +#### 11155111.priceFeed + +> `readonly` **priceFeed**: `"0x694AA1769357215DE4FAC081bf1f309aDC325306"` = `"0x694AA1769357215DE4FAC081bf1f309aDC325306"` + +#### 11155111.registry + +> `readonly` **registry**: `"0x3F920B25f8b65988359C372F66F036E48adFc556"` = `"0x3F920B25f8b65988359C372F66F036E48adFc556"` + +#### 11155111.reputationSystem + +> `readonly` **reputationSystem**: `"0x7fEd690E1663755e24a1C9d6164336809d68a578"` = `"0x7fEd690E1663755e24a1C9d6164336809d68a578"` + +#### 11155111.sbt + +> `readonly` **sbt**: `"0x072A0D12f4212B6baD7c6d0A633eaffbDE9105bF"` = `"0x072A0D12f4212B6baD7c6d0A633eaffbDE9105bF"` + +#### 11155111.sessionKeyValidator + +> `readonly` **sessionKeyValidator**: `"0x70de2e36004d6Ddc24DEB80e1Ef76c03EdC0c2AE"` = `"0x70de2e36004d6Ddc24DEB80e1Ef76c03EdC0c2AE"` + +#### 11155111.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` = `"0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985"` + +#### 11155111.staking + +> `readonly` **staking**: `"0x3B363598746Ea57314d4869B160940948c569D48"` = `"0x3B363598746Ea57314d4869B160940948c569D48"` + +#### 11155111.superPaymaster + +> `readonly` **superPaymaster**: `"0x030025f40d509b1a99547bAEb3795bD27F7182b7"` = `"0x030025f40d509b1a99547bAEb3795bD27F7182b7"` + +#### 11155111.timelockController + +> `readonly` **timelockController**: `"0xB734df3c0A1809bc06708512363D368Ac51dF1A2"` = `"0xB734df3c0A1809bc06708512363D368Ac51dF1A2"` + +#### 11155111.x402Facilitator + +> `readonly` **x402Facilitator**: `"0x326Fc3413c8A0185b0179B971C69813B6dFD971B"` = `"0x326Fc3413c8A0185b0179B971C69813B6dFD971B"` + +#### 11155111.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"0xCec3655525a112882E74Fb7C26AcB267a07724cb"` = `"0xCec3655525a112882E74Fb7C26AcB267a07724cb"` + +### 11155420 + +> `readonly` **11155420**: `object` + +#### 11155420.aaStarBLSAggregator + +> `readonly` **aaStarBLSAggregator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.aaStarBLSAlgorithm + +> `readonly` **aaStarBLSAlgorithm**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.aaStarValidator + +> `readonly` **aaStarValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentRegistry + +> `readonly` **agentRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.agentValidationRegistry + +> `readonly` **agentValidationRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountDelegate + +> `readonly` **airAccountDelegate**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountExtension + +> `readonly` **airAccountExtension**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountFactoryV7 + +> `readonly` **airAccountFactoryV7**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.airAccountV7Impl + +> `readonly` **airAccountV7Impl**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.aPNTs + +> `readonly` **aPNTs**: `"0x3BBcA92Ad828b3dD619c980Ba09f929b9d2BC440"` = `"0x3BBcA92Ad828b3dD619c980Ba09f929b9d2BC440"` + +#### 11155420.blsAggregator + +> `readonly` **blsAggregator**: `"0x6e06b17b1a4D2D973F7E3e026e24b4393315736c"` = `"0x6e06b17b1a4D2D973F7E3e026e24b4393315736c"` + +#### 11155420.blsValidator + +> `readonly` **blsValidator**: `"0x260fa905CcE1f5b29Afe9d627c01fAAE4A66A7F5"` = `"0x260fa905CcE1f5b29Afe9d627c01fAAE4A66A7F5"` + +#### 11155420.calldataParserRegistry + +> `readonly` **calldataParserRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.dvtValidator + +> `readonly` **dvtValidator**: `"0x0087cA806109E150438116cAA414580BB5fa9195"` = `"0x0087cA806109E150438116cAA414580BB5fa9195"` + +#### 11155420.entryPoint + +> `readonly` **entryPoint**: `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` = `"0x0000000071727De22E5E9d8BAf0edAc6f37da032"` + +#### 11155420.forceExitModule + +> `readonly` **forceExitModule**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.gToken + +> `readonly` **gToken**: `"0xC341c88453372021d0221834307613c2e99fE718"` = `"0xC341c88453372021d0221834307613c2e99fE718"` + +#### 11155420.microPaymentChannel + +> `readonly` **microPaymentChannel**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.paymasterFactory + +> `readonly` **paymasterFactory**: `"0x1e3b9d12eAc27867a523d0537902441B0E7D98d8"` = `"0x1e3b9d12eAc27867a523d0537902441B0E7D98d8"` + +#### 11155420.paymasterV4 + +> `readonly` **paymasterV4**: `"0xf250416C940605a1D423ccd059668219cf7D80ea"` = `"0xf250416C940605a1D423ccd059668219cf7D80ea"` + +#### 11155420.paymasterV4Impl + +> `readonly` **paymasterV4Impl**: `"0x906123080207F250B1C9F299991512Cb31f35b2f"` = `"0x906123080207F250B1C9F299991512Cb31f35b2f"` + +#### 11155420.pnts + +> `readonly` **pnts**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.policyRegistry + +> `readonly` **policyRegistry**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.priceFeed + +> `readonly` **priceFeed**: `"0x61Ec26aA57019C486B10502285c5A3D4A4750AD7"` = `"0x61Ec26aA57019C486B10502285c5A3D4A4750AD7"` + +#### 11155420.registry + +> `readonly` **registry**: `"0xcf6860Ab57de8669756997e414D9c52B6e301972"` = `"0xcf6860Ab57de8669756997e414D9c52B6e301972"` + +#### 11155420.reputationSystem + +> `readonly` **reputationSystem**: `"0x891EC0f84D9275839B8dAf74e87B23F2DBd7f9c9"` = `"0x891EC0f84D9275839B8dAf74e87B23F2DBd7f9c9"` + +#### 11155420.sbt + +> `readonly` **sbt**: `"0x2c3Ca1553dC1B8870381E8E56C7b3e3A3ae162f0"` = `"0x2c3Ca1553dC1B8870381E8E56C7b3e3A3ae162f0"` + +#### 11155420.sessionKeyValidator + +> `readonly` **sessionKeyValidator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `"0x91E6060613810449d098b0b5EC8b51A0fe8C8985"` = `"0x91E6060613810449d098b0b5EC8b51A0fe8C8985"` + +#### 11155420.staking + +> `readonly` **staking**: `"0x5f57B931C849e8E255F22755506eB2255aB22a7C"` = `"0x5f57B931C849e8E255F22755506eB2255aB22a7C"` + +#### 11155420.superPaymaster + +> `readonly` **superPaymaster**: `"0x9eC1FE8134A1C05aD34ba2E4e8758dAe0a009B94"` = `"0x9eC1FE8134A1C05aD34ba2E4e8758dAe0a009B94"` + +#### 11155420.timelockController + +> `readonly` **timelockController**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.x402Facilitator + +> `readonly` **x402Facilitator**: `"0x0000000000000000000000000000000000000000"` = `"0x0000000000000000000000000000000000000000"` + +#### 11155420.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"0x7792a49C9E91e0E9B631B27D885d15e971B7482A"` = `"0x7792a49C9E91e0E9B631B27D885d15e971B7482A"` diff --git a/api/@aastar/sdk/variables/CHAIN_MAINNET.md b/api/@aastar/sdk/variables/CHAIN_MAINNET.md new file mode 100644 index 000000000..1654b4b2b --- /dev/null +++ b/api/@aastar/sdk/variables/CHAIN_MAINNET.md @@ -0,0 +1,3 @@ +> `const` **CHAIN\_MAINNET**: `1` = `1` + +Defined in: [packages/core/src/constants.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L102) diff --git a/api/@aastar/sdk/variables/CHAIN_SEPOLIA.md b/api/@aastar/sdk/variables/CHAIN_SEPOLIA.md new file mode 100644 index 000000000..da734e235 --- /dev/null +++ b/api/@aastar/sdk/variables/CHAIN_SEPOLIA.md @@ -0,0 +1,3 @@ +> `const` **CHAIN\_SEPOLIA**: `11155111` = `11155111` + +Defined in: [packages/core/src/constants.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L101) diff --git a/api/@aastar/sdk/variables/COMMUNITIES.md b/api/@aastar/sdk/variables/COMMUNITIES.md new file mode 100644 index 000000000..17e2fe727 --- /dev/null +++ b/api/@aastar/sdk/variables/COMMUNITIES.md @@ -0,0 +1,5 @@ +> `const` **COMMUNITIES**: `Record`\<`string`, [`CommunityConfig`](../interfaces/CommunityConfig.md)\> + +Defined in: [packages/core/src/communities.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/communities.ts#L69) + +All communities indexed by address diff --git a/api/@aastar/sdk/variables/COMMUNITY_OWNERS.md b/api/@aastar/sdk/variables/COMMUNITY_OWNERS.md new file mode 100644 index 000000000..f578e7221 --- /dev/null +++ b/api/@aastar/sdk/variables/COMMUNITY_OWNERS.md @@ -0,0 +1,15 @@ +> `const` **COMMUNITY\_OWNERS**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L99) + +Community Owner Addresses + +## Type Declaration + +### aastarOwner + +> `readonly` **aastarOwner**: `"0x411BD567E46C0781248dbB6a9211891C032885e5"` = `'0x411BD567E46C0781248dbB6a9211891C032885e5'` + +### breadCommunityOwner + +> `readonly` **breadCommunityOwner**: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"` = `'0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA'` diff --git a/api/@aastar/sdk/variables/CONTRACTS.md b/api/@aastar/sdk/variables/CONTRACTS.md new file mode 100644 index 000000000..6e7b7ecad --- /dev/null +++ b/api/@aastar/sdk/variables/CONTRACTS.md @@ -0,0 +1,191 @@ +> `const` **CONTRACTS**: `object` + +Defined in: [packages/core/src/contracts.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L101) + +All supported networks + +## Type Declaration + +### sepolia + +> `readonly` **sepolia**: `object` = `SEPOLIA_CONTRACTS` + +#### sepolia.communities + +> `readonly` **communities**: `object` + +#### sepolia.communities.aastar + +> `readonly` **aastar**: `object` + +AAStar Community - Test community for development (registered: 2025-11-01) + +#### sepolia.communities.aastar.ensName + +> `readonly` **ensName**: `"aastar.eth"` = `'aastar.eth'` + +#### sepolia.communities.aastar.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.aPNTs` + +#### sepolia.communities.aastar.name + +> `readonly` **name**: `"AAStar"` = `'AAStar'` + +#### sepolia.communities.aastar.owner + +> `readonly` **owner**: `"0x411BD567E46C0781248dbB6a9211891C032885e5"` = `COMMUNITY_OWNERS.aastarOwner` + +#### sepolia.communities.aastar.stake + +> `readonly` **stake**: `"50"` = `'50'` + +#### sepolia.communities.breadCommunity + +> `readonly` **breadCommunity**: `object` + +BreadCommunity - Test community for development (registered: 2025-11-03) + +#### sepolia.communities.breadCommunity.ensName + +> `readonly` **ensName**: `"bread.eth"` = `'bread.eth'` + +#### sepolia.communities.breadCommunity.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.bPNTs` + +#### sepolia.communities.breadCommunity.name + +> `readonly` **name**: `"BreadCommunity"` = `'BreadCommunity'` + +#### sepolia.communities.breadCommunity.owner + +> `readonly` **owner**: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"` = `COMMUNITY_OWNERS.breadCommunityOwner` + +#### sepolia.communities.breadCommunity.stake + +> `readonly` **stake**: `"50"` = `'50'` + +#### sepolia.core + +> `readonly` **core**: `object` = `CORE_ADDRESSES` + +#### sepolia.core.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +#### sepolia.core.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + +#### sepolia.core.aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` + +#### sepolia.core.dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +#### sepolia.core.entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` = `ENTRY_POINT_ADDRESS` + +#### sepolia.core.gToken + +> `readonly` **gToken**: `` `0x${string}` `` = `GTOKEN_ADDRESS` + +#### sepolia.core.gTokenStaking + +> `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` + +#### sepolia.core.microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + +#### sepolia.core.mySBT + +> `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` + +#### sepolia.core.paymasterFactory + +> `readonly` **paymasterFactory**: `` `0x${string}` `` = `PAYMASTER_FACTORY_ADDRESS` + +#### sepolia.core.paymasterV4 + +> `readonly` **paymasterV4**: `` `0x${string}` `` + +#### sepolia.core.registry + +> `readonly` **registry**: `` `0x${string}` `` = `REGISTRY_ADDRESS` + +#### sepolia.core.superPaymaster + +> `readonly` **superPaymaster**: `` `0x${string}` `` = `SUPER_PAYMASTER_ADDRESS` + +#### sepolia.core.xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` + +#### sepolia.monitoring + +> `readonly` **monitoring**: `object` = `MONITORING_ADDRESSES` + +#### sepolia.monitoring.blsAggregator + +> `readonly` **blsAggregator**: `` `0x${string}` `` = `BLS_AGGREGATOR_ADDRESS` + +#### sepolia.monitoring.dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +#### sepolia.official + +> `readonly` **official**: `object` = `OFFICIAL_ADDRESSES` + +#### sepolia.official.entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` + +#### sepolia.paymaster + +> `readonly` **paymaster**: `object` = `PAYMASTER_ADDRESSES` + +#### sepolia.paymaster.paymasterV4\_1 + +> `readonly` **paymasterV4\_1**: `` `0x${string}` `` + +#### sepolia.paymaster.paymasterV4\_1iImplementation + +> `readonly` **paymasterV4\_1iImplementation**: `` `0x${string}` `` = `PAYMASTER_V4_IMPL_ADDRESS` + +#### sepolia.testAccounts + +> `readonly` **testAccounts**: `object` = `TEST_ACCOUNT_ADDRESSES` + +#### sepolia.testAccounts.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `` `0x${string}` `` + +#### sepolia.testTokens + +> `readonly` **testTokens**: `object` = `TEST_TOKEN_ADDRESSES` + +#### sepolia.testTokens.aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` + +#### sepolia.testTokens.bPNTs + +> `readonly` **bPNTs**: `` `0x${string}` `` + +#### sepolia.testTokens.mockUSDT + +> `readonly` **mockUSDT**: `` `0x${string}` `` + +#### sepolia.tokens + +> `readonly` **tokens**: `object` = `TOKEN_ADDRESSES` + +#### sepolia.tokens.xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` diff --git a/api/@aastar/sdk/variables/CONTRACT_METADATA.md b/api/@aastar/sdk/variables/CONTRACT_METADATA.md new file mode 100644 index 000000000..7d5b5e2e2 --- /dev/null +++ b/api/@aastar/sdk/variables/CONTRACT_METADATA.md @@ -0,0 +1,67 @@ +> `const` **CONTRACT\_METADATA**: `object` + +Defined in: [packages/core/src/contracts.ts:332](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L332) + +Contract deployment metadata + +## Type Declaration + +### sepolia + +> `readonly` **sepolia**: `object` + +#### sepolia.deploymentDates + +> `readonly` **deploymentDates**: `object` + +#### sepolia.deploymentDates.aPNTs + +> `readonly` **aPNTs**: `"2025-10-30"` = `'2025-10-30'` + +#### sepolia.deploymentDates.blsAggregator + +> `readonly` **blsAggregator**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.dvtValidator + +> `readonly` **dvtValidator**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.gToken + +> `readonly` **gToken**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.gTokenStaking + +> `readonly` **gTokenStaking**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.mySBT + +> `readonly` **mySBT**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.paymasterFactory + +> `readonly` **paymasterFactory**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.paymasterV4\_1 + +> `readonly` **paymasterV4\_1**: `"2025-10-15"` = `'2025-10-15'` + +#### sepolia.deploymentDates.registry + +> `readonly` **registry**: `"2025-11-02"` = `'2025-11-02'` + +#### sepolia.deploymentDates.superPaymaster + +> `readonly` **superPaymaster**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.deploymentDates.xPNTsFactory + +> `readonly` **xPNTsFactory**: `"2025-11-01"` = `'2025-11-01'` + +#### sepolia.lastUpdated + +> `readonly` **lastUpdated**: `"2025-11-02"` = `'2025-11-02'` + +#### sepolia.networkId + +> `readonly` **networkId**: `11155111` = `11155111` diff --git a/api/@aastar/sdk/variables/CONTRACT_SRC_HASH.md b/api/@aastar/sdk/variables/CONTRACT_SRC_HASH.md new file mode 100644 index 000000000..bc5944115 --- /dev/null +++ b/api/@aastar/sdk/variables/CONTRACT_SRC_HASH.md @@ -0,0 +1,5 @@ +> **CONTRACT\_SRC\_HASH**: `any` + +Defined in: [packages/core/src/constants.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L28) + +Contract Addresses (Priority: ENV > Local Config > Canonical Defaults) diff --git a/api/@aastar/sdk/variables/CORE_ADDRESSES.md b/api/@aastar/sdk/variables/CORE_ADDRESSES.md new file mode 100644 index 000000000..f8e473d7c --- /dev/null +++ b/api/@aastar/sdk/variables/CORE_ADDRESSES.md @@ -0,0 +1,63 @@ +> `const` **CORE\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L32) + +Core System Addresses + +## Type Declaration + +### agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +### agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + +### aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` + +### dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +### entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` = `ENTRY_POINT_ADDRESS` + +### gToken + +> `readonly` **gToken**: `` `0x${string}` `` = `GTOKEN_ADDRESS` + +### gTokenStaking + +> `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` + +### microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + +### mySBT + +> `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` + +### paymasterFactory + +> `readonly` **paymasterFactory**: `` `0x${string}` `` = `PAYMASTER_FACTORY_ADDRESS` + +### paymasterV4 + +> `readonly` **paymasterV4**: `` `0x${string}` `` + +### registry + +> `readonly` **registry**: `` `0x${string}` `` = `REGISTRY_ADDRESS` + +### superPaymaster + +> `readonly` **superPaymaster**: `` `0x${string}` `` = `SUPER_PAYMASTER_ADDRESS` + +### xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` diff --git a/api/@aastar/sdk/variables/CalldataParserRegistryABI.md b/api/@aastar/sdk/variables/CalldataParserRegistryABI.md new file mode 100644 index 000000000..62df73266 --- /dev/null +++ b/api/@aastar/sdk/variables/CalldataParserRegistryABI.md @@ -0,0 +1,3 @@ +> `const` **CalldataParserRegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:220](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L220) diff --git a/api/@aastar/sdk/variables/CalldataParserRegistryArtifact.md b/api/@aastar/sdk/variables/CalldataParserRegistryArtifact.md new file mode 100644 index 000000000..88075eb6e --- /dev/null +++ b/api/@aastar/sdk/variables/CalldataParserRegistryArtifact.md @@ -0,0 +1,9 @@ +> `const` **CalldataParserRegistryArtifact**: `object` = `CalldataParserRegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:221](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L221) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] diff --git a/api/@aastar/sdk/variables/CustomErrors.md b/api/@aastar/sdk/variables/CustomErrors.md new file mode 100644 index 000000000..9de246a00 --- /dev/null +++ b/api/@aastar/sdk/variables/CustomErrors.md @@ -0,0 +1,17 @@ +> `const` **CustomErrors**: `object` + +Defined in: [packages/sdk/src/errors/decoder.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/errors/decoder.ts#L4) + +## Type Declaration + +### InsufficientStake + +> `readonly` **InsufficientStake**: `"InsufficientStake(uint256,uint256)"` = `'InsufficientStake(uint256,uint256)'` + +### RoleAlreadyGranted + +> `readonly` **RoleAlreadyGranted**: `"RoleAlreadyGranted(bytes32,address)"` = `'RoleAlreadyGranted(bytes32,address)'` + +### RoleNotConfigured + +> `readonly` **RoleNotConfigured**: `"RoleNotConfigured(bytes32,bool)"` = `'RoleNotConfigured(bytes32,bool)'` diff --git a/api/@aastar/sdk/variables/DEFAULT_ADMIN_ROLE.md b/api/@aastar/sdk/variables/DEFAULT_ADMIN_ROLE.md new file mode 100644 index 000000000..e858005f6 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_ADMIN_ROLE.md @@ -0,0 +1,17 @@ +> `const` **DEFAULT\_ADMIN\_ROLE**: [`Hash`](https://viem.sh/docs/index.html) = `'0x0000000000000000000000000000000000000000000000000000000000000000'` + +Defined in: [packages/core/src/roles.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L16) + +Default Admin Role (OpenZeppelin AccessControl) + +## Description + +Highest privilege, can grant/revoke all roles + +## Permission + +Protocol governance only + +## Source + +OpenZeppelin AccessControl DEFAULT_ADMIN_ROLE diff --git a/api/@aastar/sdk/variables/DEFAULT_APNTS_PRICE_USD.md b/api/@aastar/sdk/variables/DEFAULT_APNTS_PRICE_USD.md new file mode 100644 index 000000000..c00d65180 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_APNTS_PRICE_USD.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_APNTS\_PRICE\_USD**: `"0.02"` = `"0.02"` + +Defined in: [packages/core/src/constants.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L100) diff --git a/api/@aastar/sdk/variables/DEFAULT_CALL_GAS_LIMIT.md b/api/@aastar/sdk/variables/DEFAULT_CALL_GAS_LIMIT.md new file mode 100644 index 000000000..a79b86c65 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_CALL_GAS_LIMIT.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_CALL\_GAS\_LIMIT**: `100000n` = `100000n` + +Defined in: [packages/core/src/constants.ts:106](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L106) diff --git a/api/@aastar/sdk/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md b/api/@aastar/sdk/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md new file mode 100644 index 000000000..b9d67d173 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_GAS_TOKEN_MINT_AMOUNT.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_GAS\_TOKEN\_MINT\_AMOUNT**: `"100"` = `"100"` + +Defined in: [packages/core/src/constants.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L89) diff --git a/api/@aastar/sdk/variables/DEFAULT_PRE_VERIFICATION_GAS.md b/api/@aastar/sdk/variables/DEFAULT_PRE_VERIFICATION_GAS.md new file mode 100644 index 000000000..add190f39 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_PRE_VERIFICATION_GAS.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_PRE\_VERIFICATION\_GAS**: `50000n` = `50000n` + +Defined in: [packages/core/src/constants.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L107) diff --git a/api/@aastar/sdk/variables/DEFAULT_TIMEOUT_MS.md b/api/@aastar/sdk/variables/DEFAULT_TIMEOUT_MS.md new file mode 100644 index 000000000..40ffd8c09 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_TIMEOUT_MS.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_TIMEOUT\_MS**: `30000` = `30000` + +Defined in: [packages/core/src/constants.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L108) diff --git a/api/@aastar/sdk/variables/DEFAULT_TOKEN_NAME.md b/api/@aastar/sdk/variables/DEFAULT_TOKEN_NAME.md new file mode 100644 index 000000000..859f5c9eb --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_TOKEN_NAME.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_TOKEN\_NAME**: `"Governance Token"` = `'Governance Token'` + +Defined in: [packages/core/src/constants.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L104) diff --git a/api/@aastar/sdk/variables/DEFAULT_TOKEN_SYMBOL.md b/api/@aastar/sdk/variables/DEFAULT_TOKEN_SYMBOL.md new file mode 100644 index 000000000..fec27c763 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_TOKEN_SYMBOL.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_TOKEN\_SYMBOL**: `"GT"` = `'GT'` + +Defined in: [packages/core/src/constants.ts:103](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L103) diff --git a/api/@aastar/sdk/variables/DEFAULT_USDT_MINT_AMOUNT.md b/api/@aastar/sdk/variables/DEFAULT_USDT_MINT_AMOUNT.md new file mode 100644 index 000000000..475e03b57 --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_USDT_MINT_AMOUNT.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_USDT\_MINT\_AMOUNT**: `"10"` = `"10"` + +Defined in: [packages/core/src/constants.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L90) diff --git a/api/@aastar/sdk/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md b/api/@aastar/sdk/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md new file mode 100644 index 000000000..2370cb75f --- /dev/null +++ b/api/@aastar/sdk/variables/DEFAULT_VERIFICATION_GAS_LIMIT.md @@ -0,0 +1,3 @@ +> `const` **DEFAULT\_VERIFICATION\_GAS\_LIMIT**: `200000n` = `200000n` + +Defined in: [packages/core/src/constants.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L105) diff --git a/api/@aastar/sdk/variables/DVTValidatorABI.md b/api/@aastar/sdk/variables/DVTValidatorABI.md new file mode 100644 index 000000000..44dc59686 --- /dev/null +++ b/api/@aastar/sdk/variables/DVTValidatorABI.md @@ -0,0 +1,3 @@ +> `const` **DVTValidatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L119) diff --git a/api/@aastar/sdk/variables/DVTValidatorArtifact.md b/api/@aastar/sdk/variables/DVTValidatorArtifact.md new file mode 100644 index 000000000..4dcb8deca --- /dev/null +++ b/api/@aastar/sdk/variables/DVTValidatorArtifact.md @@ -0,0 +1,13 @@ +> `const` **DVTValidatorArtifact**: `object` = `DVTValidatorABIData` + +Defined in: [packages/core/src/abis/index.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L120) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a0346100e457601f61161f38819003918201601f19168301916001600160401b038311848410176100e8578084926020946040528339810103126100e457516001600160a01b038116908190036100e45733156100d1575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600160045560805261152290816100fd82396080518181816105b60152818161098001528181610e2f01526112cb0152f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c908163013cf08b14610e535750806306433b1b14610e1057806308f4133414610bc55780632ab09d1414610ba7578063349a2c261461091f57806340a141ff14610892578063424a3d77146108005780634d238c8e1461058a57806354fd4d5014610525578063715018a6146104d35780638da5cb5b146104ad5780638e24bc9a14610244578063bc959101146101c7578063c06f58e8146101a0578063f2fde38b1461010d5763facd743b146100ce575f80fd5b3461010a57602036600319011261010a5760ff60406020926001600160a01b036100f6611057565b168152600284522054166040519015158152f35b80fd5b503461010a57602036600319011261010a576001600160a01b0361012f611057565b6101376114cf565b16801561018c57815473ffffffffffffffffffffffffffffffffffffffff198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b503461010a578060031936011261010a5760206001600160a01b0360015416604051908152f35b503461010a57602036600319011261010a576101e1611057565b6101e96114cf565b6001600160a01b03600154911690816001600160a01b0382167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48580a373ffffffffffffffffffffffffffffffffffffffff19161760015580f35b503461010a57606036600319011261010a5761025e611057565b60243560ff81168082036104a95760443567ffffffffffffffff81116104a55761028c903690600401611029565b939094610298336112a3565b600454945f198614610491576001868101600455868352600360205260408320805474ffffffffffffffffffffffffffffffffffffffffff19166001600160a01b039590951694851760a09790971b60ff60a01b1696909617865592949283019167ffffffffffffffff821161047d576103128354610f66565b601f811161042b575b509081602098889695949391601f84116001146103a05792808b96937f876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b135523598969360029692610395575b50508160011b915f199060031b1c19161790555b01805461ffff1916610100179055604051908152a3604051908152f35b013590505f80610364565b91601f1984168584528b8420935b8181106104115750938b96937f876b000c101c27e7aaff6a3254ea503d0e9bf516112d43803bd82989b135523598969360019383600298106103f8575b505050811b019055610378565b01355f19600384901b60f8161c191690555f80806103eb565b8284013585558b9950600190940193918c01918c016103ae565b8281111561031b579783825260208220601f840160051c9060208510610475575b810199601f0160051c03825b8181106104675750509761031b565b80846001928d015501610458565b83915061044c565b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b82526011600452602482fd5b8480fd5b8380fd5b503461010a578060031936011261010a576001600160a01b036020915416604051908152f35b503461010a578060031936011261010a576104ec6114cf565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461010a578060031936011261010a5750610586604051610548604082610f9e565b601281527f44565456616c696461746f722d302e362e3000000000000000000000000000006020820152604051918291602083526020830190610fd4565b0390f35b503461010a57602036600319011261010a576105a4611057565b6105ac6114cf565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166001600160a01b0360405192632474521560e21b84525f5160206114f65f395f51905f5260048501521691826024820152602081604481855afa90811561073c5784916107c6575b50156107b757604051634133006760e11b8152602081600481855afa801561073c576001600160a01b03918591610788575b50169081156107795783806024926040519384809263b5e936ab60e01b82525f5160206114f65f395f51905f5260048301525afa91821561076c578192610747575b5060449192604051928380926318581cf760e11b82528760048301525f5160206114f65f395f51905f5260248301525afa801561073c576001600160801b03918591610716575b50169051908181106107005750508152600260205260408120805460ff1916600117905580f35b630208a00560e01b845260045260245250604490fd5b61073291503d8087833e61072a8183610f9e565b810190611232565b505050505f6106d9565b6040513d86823e3d90fd5b60449250610766903d8084833e61075e8183610f9e565b8101906110f0565b91610692565b50604051903d90823e3d90fd5b63204cba0960e01b8452600484fd5b6107aa915060203d6020116107b0575b6107a28183610f9e565b81019061107a565b5f610650565b503d610798565b638453659560e01b8352600483fd5b90506020813d6020116107f8575b816107e160209383610f9e565b810103126104a9576107f29061106d565b5f61061e565b3d91506107d4565b503461010a57602036600319011261010a576004356001600160a01b0360015416330361088357808252600360205260026040832001805460ff8160081c16156108745760ff191660011790557f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8280a280f35b636ce3c70160e11b8452600484fd5b63598c379b60e11b8252600482fd5b503461010a57602036600319011261010a576001600160a01b036108b4611057565b6108bc6114cf565b16808252600260205260ff6040832054161561090d57808252600260205260408220805460ff191690557fe1434e25d6611e0db941968fdc97811c982ac1602e951637d206f5fdda9dd8f18280a280f35b6337603bef60e01b8252600452602490fd5b503461010a57602036600319011261010a576001600160a01b03610941611057565b16808252600260205260ff6040832054161561090d57604051632474521560e21b81525f5160206114f65f395f51905f526004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082604481845afa91821561073c578492610b6b575b50604051634133006760e11b8152602081600481855afa8015610b15576001600160a01b03918691610b4c575b5016908115610b3d5784806024926040519384809263b5e936ab60e01b82525f5160206114f65f395f51905f5260048301525afa91821561076c578192610b20575b5060449192604051928380926318581cf760e11b82528860048301525f5160206114f65f395f51905f5260248301525afa918215610b155783918693610af5575b5081610ae0575b50610acc577f367bc3cec9a81b642b69cb2ec83e77eb3f403ab741030d9d98afc27999443077916001600160801b03604092858752600260205283872060ff19815416905583519215158352166020820152a280f35b63c23285bd60e01b84526004839052602484fd5b9050516001600160801b03821610155f610a76565b610b0a9193503d8088833e61072a8183610f9e565b50505050915f610a6f565b6040513d87823e3d90fd5b60449250610b37903d8084833e61075e8183610f9e565b91610a2e565b63204cba0960e01b8552600485fd5b610b65915060203d6020116107b0576107a28183610f9e565b5f6109ec565b9091506020813d602011610b9f575b81610b8760209383610f9e565b810103126104a957610b989061106d565b905f6109bf565b3d9150610b7a565b503461010a578060031936011261010a576020600454604051908152f35b5034610d8f5760a0366003190112610d8f5760043560243567ffffffffffffffff8111610d8f57610bfa903690600401610ff8565b9060443567ffffffffffffffff8111610d8f57610c1b903690600401610ff8565b60849391933567ffffffffffffffff8111610d8f57610c3e903690600401611029565b90916001600160a01b03600154169384331415808091610df9575b610dea57610ddc575b875f52600360205260405f20600281015460ff8160081c1615610dcd5760ff16610dbe575497853b15610d8f57819060ff6040519a632399c30960e01b8c5260e48c019260048d01526001600160a01b03811660248d015260a01c1660448b015260e060648b015252610104880195905f905b808210610d93575050508685036003190160848801528085527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111610d8f57866020819694845f99958a968598859760051b809287830137019260643560a487015260031985878603010160c48701528185850152604084013781810183018301869052601f01601f191601010301925af18015610d8457610d76575080f35b610d8291505f90610f9e565b005b6040513d5f823e3d90fd5b5f80fd5b9091968735906001600160a01b038216809203610d8f57602081600193829352019801920190610cd5565b634cbd1fab60e11b5f5260045ffd5b636ce3c70160e11b5f5260045ffd5b610de5336112a3565b610c62565b631a75945360e21b5f5260045ffd5b50335f52600260205260ff60405f20541615610c59565b34610d8f575f366003190112610d8f5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610d8f576020366003190112610d8f576004355f52600360205260405f2090815490600183015f90805490610e8882610f66565b8085529160018116908115610f3e5750600114610f00575b5050610ee6600260ff95610eb78588950386610f9e565b01549260405195856001600160a01b03889716875260a01c16602086015260a0604086015260a0850190610fd4565b918181161515606085015260081c16151560808301520390f35b5f908152602081209092505b818310610f245750508101602001610ee66002610ea0565b600181602092949394548385880101520191019190610f0c565b60ff191660208087019190915292151560051b85019092019250610ee6915060029050610ea0565b90600182811c92168015610f94575b6020831014610f8057565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610f75565b90601f8019910116810190811067ffffffffffffffff821117610fc057604052565b634e487b7160e01b5f52604160045260245ffd5b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f84011215610d8f5782359167ffffffffffffffff8311610d8f576020808501948460051b010111610d8f57565b9181601f84011215610d8f5782359167ffffffffffffffff8311610d8f5760208381860195010111610d8f57565b600435906001600160a01b0382168203610d8f57565b51908115158203610d8f57565b90816020910312610d8f57516001600160a01b0381168103610d8f5790565b519063ffffffff82168203610d8f57565b92919267ffffffffffffffff8211610fc057604051916110d4601f8201601f191660200184610f9e565b829481845281830111610d8f578281602093845f96015e010152565b602081830312610d8f5780519067ffffffffffffffff8211610d8f570161018081830312610d8f5760405191610180830183811067ffffffffffffffff821117610fc057604052815183526020820151602084015261115160408301611099565b604084015261116260608301611099565b606084015261117360808301611099565b608084015261118460a08301611099565b60a084015260c082015161ffff81168103610d8f5760c08401526111aa60e0830161106d565b60e084015261010082015161010084015261012082015167ffffffffffffffff8111610d8f5782019080601f83011215610d8f5781516111ec926020016110aa565b610120830152610140810151906001600160a01b0382168203610d8f5761016091610140840152015161016082015290565b51906001600160801b0382168203610d8f57565b919060a083820312610d8f576112478361121e565b926112546020820161121e565b92604082015165ffffffffffff81168103610d8f579260608301519260808101519067ffffffffffffffff8211610d8f57019080601f83011215610d8f5781516112a0926020016110aa565b90565b6001600160a01b0316805f52600260205260ff60405f205416156114bd576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690604051632474521560e21b81525f5160206114f65f395f51905f526004820152816024820152602081604481865afa908115610d84575f91611483575b501561147157604051634133006760e11b8152602081600481865afa8015610d84576001600160a01b03915f91611452575b5016908115611443575f6024936040519485809263b5e936ab60e01b82525f5160206114f65f395f51905f5260048301525afa928315610d84575f93611425575b505f906044604051809481936318581cf760e11b835260048301525f5160206114f65f395f51905f5260248301525afa8015610d84576001600160801b03915f91611407575b50169051908181106113f2575050565b630208a00560e01b5f5260045260245260445ffd5b61141b91503d805f833e61072a8183610f9e565b505050505f6113e2565b5f91935061143c903d8084833e61075e8183610f9e565b929061139c565b63204cba0960e01b5f5260045ffd5b61146b915060203d6020116107b0576107a28183610f9e565b5f61135b565b636264d57f60e01b5f5260045260245ffd5b90506020813d6020116114b5575b8161149e60209383610f9e565b81010312610d8f576114af9061106d565b5f611329565b3d9150611491565b6337603bef60e01b5f5260045260245ffd5b6001600160a01b035f541633036114e257565b63118cdaa760e01b5f523360045260245ffdfe3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514da164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/DVT_TIER_T2.md b/api/@aastar/sdk/variables/DVT_TIER_T2.md new file mode 100644 index 000000000..b4e30398c --- /dev/null +++ b/api/@aastar/sdk/variables/DVT_TIER_T2.md @@ -0,0 +1,5 @@ +> `const` **DVT\_TIER\_T2**: `4` + +Defined in: [packages/core/src/crypto/dvtWire.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L43) + +DVT account-signature tier byte: P256 primary + ≥threshold BLS aggregate (DVT co-sign). diff --git a/api/@aastar/sdk/variables/DVT_TIER_T3.md b/api/@aastar/sdk/variables/DVT_TIER_T3.md new file mode 100644 index 000000000..1b0060e7b --- /dev/null +++ b/api/@aastar/sdk/variables/DVT_TIER_T3.md @@ -0,0 +1,5 @@ +> `const` **DVT\_TIER\_T3**: `5` + +Defined in: [packages/core/src/crypto/dvtWire.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/crypto/dvtWire.ts#L45) + +DVT account-signature tier byte: T2 + a trailing 65-byte guardian ECDSA signature. diff --git a/api/@aastar/sdk/variables/DVT_VALIDATOR_ADDRESS.md b/api/@aastar/sdk/variables/DVT_VALIDATOR_ADDRESS.md new file mode 100644 index 000000000..7a98f9764 --- /dev/null +++ b/api/@aastar/sdk/variables/DVT_VALIDATOR_ADDRESS.md @@ -0,0 +1,3 @@ +> **DVT\_VALIDATOR\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L41) diff --git a/api/@aastar/sdk/variables/EIP3009_TYPES.md b/api/@aastar/sdk/variables/EIP3009_TYPES.md new file mode 100644 index 000000000..b5dedbb12 --- /dev/null +++ b/api/@aastar/sdk/variables/EIP3009_TYPES.md @@ -0,0 +1,17 @@ +> `const` **EIP3009\_TYPES**: `object` + +Defined in: [packages/x402/src/eip3009.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L3) + +## Type Declaration + +### CancelAuthorization + +> `readonly` **CancelAuthorization**: readonly \[\{ `name`: `"authorizer"`; `type`: `"address"`; \}, \{ `name`: `"nonce"`; `type`: `"bytes32"`; \}\] + +### ReceiveWithAuthorization + +> `readonly` **ReceiveWithAuthorization**: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"value"`; `type`: `"uint256"`; \}, \{ `name`: `"validAfter"`; `type`: `"uint256"`; \}, \{ `name`: `"validBefore"`; `type`: `"uint256"`; \}, \{ `name`: `"nonce"`; `type`: `"bytes32"`; \}\] + +### TransferWithAuthorization + +> `readonly` **TransferWithAuthorization**: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"value"`; `type`: `"uint256"`; \}, \{ `name`: `"validAfter"`; `type`: `"uint256"`; \}, \{ `name`: `"validBefore"`; `type`: `"uint256"`; \}, \{ `name`: `"nonce"`; `type`: `"bytes32"`; \}\] diff --git a/api/@aastar/sdk/variables/ENTRY_POINT_ADDRESS.md b/api/@aastar/sdk/variables/ENTRY_POINT_ADDRESS.md new file mode 100644 index 000000000..0bfede0ec --- /dev/null +++ b/api/@aastar/sdk/variables/ENTRY_POINT_ADDRESS.md @@ -0,0 +1,3 @@ +> **ENTRY\_POINT\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L42) diff --git a/api/@aastar/sdk/variables/EntryPointABI.md b/api/@aastar/sdk/variables/EntryPointABI.md new file mode 100644 index 000000000..b921b9608 --- /dev/null +++ b/api/@aastar/sdk/variables/EntryPointABI.md @@ -0,0 +1,3 @@ +> `const` **EntryPointABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L86) diff --git a/api/@aastar/sdk/variables/EntryPointArtifact.md b/api/@aastar/sdk/variables/EntryPointArtifact.md new file mode 100644 index 000000000..d5846a23b --- /dev/null +++ b/api/@aastar/sdk/variables/EntryPointArtifact.md @@ -0,0 +1,13 @@ +> `const` **EntryPointArtifact**: `object` = `EntryPointABIData` + +Defined in: [packages/core/src/abis/index.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L87) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: (\{ `components`: ...[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x6101806040523461019557604051610018604082610199565b600781526020810190664552433433333760c81b82526040519161003d604084610199565b600183526020830191603160f81b8352610056816101bc565b6101205261006384610363565b61014052519020918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526100cc60c082610199565b5190206080523060c0526040516104ee8082016001600160401b038111838210176101815782916150f7833903905ff080156101765761016052604051614c4f90816104a8823960805181612d20015260a05181612ddd015260c05181612cf1015260e05181612d6f01526101005181612d95015261012051816114eb0152610140518161151401526101605181818161137e01528181611b27015281816148670152614aba0152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b601f909101601f19168101906001600160401b0382119082101761018157604052565b908151602081105f14610236575090601f8151116101f65760208151910151602082106101e7571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b03811161018157600254600181811c91168015610359575b602082101461034557601f8111610306575b50602092601f82116001146102a557928192935f9261029a575b50508160011b915f199060031b1c19161760025560ff90565b015190505f80610281565b601f1982169360025f52805f20915f5b8681106102ee57508360019596106102d6575b505050811b0160025560ff90565b01515f1960f88460031b161c191690555f80806102c8565b919260206001819286850151815501940192016102b5565b818111156102675760025f5260205f20601f80840160051c809201920160051c03905f5b828110610338575050610267565b5f8282015560010161032a565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610255565b908151602081105f1461038e575090601f8151116101f65760208151910151602082106101e7571790565b6001600160401b03811161018157600354600181811c9116801561049d575b602082101461034557601f811161045e575b50602092601f82116001146103fd57928192935f926103f2575b50508160011b915f199060031b1c19161760035560ff90565b015190505f806103d9565b601f1982169360035f52805f20915f5b868110610446575083600195961061042e575b505050811b0160035560ff90565b01515f1960f88460031b161c191690555f8080610420565b9192602060018192868501518155019401920161040d565b818111156103bf5760035f5260205f20601f80840160051c809201920160051c03905f5b8281106104905750506103bf565b5f82820155600101610482565b90607f16906103ad56fe6101606040526004361015610024575b3615610019575f80fd5b610022336129fc565b005b5f610140525f3560e01c806242dc5314611ec057806301ffc9a714611d8c5780630396cb6014611b4b57806309ccb88014611b055780630bd28e3b14611a8757806313c65a6e14611a6a578063154e58dc14611a2d5780631b2e01b8146119c2578063205c2878146118ab57806322cdde4c1461186357806335567e1a146117d45780635287ce12146116df57806370a082311461169f578063765e827f146115f257806384b0196e146114d0578063850aaf62146114295780639b249f69146112fd578063b0a398d1146112db578063b760faf9146112bf578063bb9fe6bf14611187578063c23a5cea14610fdf5763dbed18e00361000f5734610d795761012c36612545565b6101005260e05233321480610fd6575b15610fa8576101405190815b60e0518110610db2575061015b8261288b565b61012052610140516080526101405160c0525b60e05160c05110610279577fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f9726101405161014051a161014051608081905290815b60e05181106101cc576101c58361010051613f53565b6101405180f35b6102216101dc8260e05185612aaa565b6001600160a01b036101f060208301612b3e565b167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d6101405161014051a280612aea565b9061014051915b80831061023a575050506001016101af565b90919460019061026761024e88858761293c565b61025d608051610120516129a9565b5190608051613967565b01958160805101608052019190610228565b61028860c05160e05183612aaa565b6001600160a01b036102a9602061029f8480612aea565b60a0529301612b3e565b61014051911691905b60a05181106102d65750505060a05160805101608052600160c0510160c05261016e565b6102e78160805101610120516129a9565b516102f58260a0518561293c565b61014051915a8151926001600160a01b0361030f82612b3e565b168452602081810135908501526fffffffffffffffffffffffffffffffff6080808301358281166060880152811c604087015260a083013560c0808801919091528301359182166101008701521c61012085015261037060e0820182612b52565b9081610ce5575b50506040519361038682612747565b6020850152846040526040810151946effffffffffffffffffffffffffffff8660c08401511760608401511760808401511760a084015117610100840151176101208401511711610c985750604081015160608201510160808201510160a08201510160c082015101610100820151029485604086015284516001600160a01b0360e0818351169261042c898d61042060408b018b612b52565b929091608051016147c5565b0151169661014051978015610c67575b8751604081015190516001600160a01b03169061014051506040519a8b8960208d01519260208301937f19822f7c000000000000000000000000000000000000000000000000000000008552602484019261049693614bd2565b03601f1981018d526104a8908d612465565b61014051908c5190846101405190602095f161014051519a3d602003610c5c575b60405215610b82575015610b1d575b50506001600160a01b03825116602083015190610140515260016020526040610140512077ffffffffffffffffffffffffffffffffffffffffffffffff8260401c165f5260205267ffffffffffffffff60405f2091825492610539846126b0565b90551603610acd575a840311610a7d5760e001516060906001600160a01b03166107c7575b6001600160a01b03949260a0859360809360606105869801520135905a90030191015261453e565b929091168603610777576106d557506105a66001600160a01b039161453e565b92909116610685576105bb57506001016102b2565b6106355760a49060405190631101335b60e11b825260805101600482015260406024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560648201527f65000000000000000000000000000000000000000000000000000000000000006084820152fd5b60849060405190631101335b60e11b825260805101600482015260406024820152602060448201527f41413337207061796d617374657220696e76616c20626c6f636b2072616e67656064820152fd5b60848360405190631101335b60e11b825260805101600482015260406024820152601460448201527f41413334207369676e6174757265206572726f720000000000000000000000006064820152fd5b8260849161072a5760405190631101335b60e11b825260805101600482015260406024820152601760448201527f414132322065787069726564206f72206e6f74206475650000000000000000006064820152fd5b60405190631101335b60e11b825260805101600482015260406024820152601e60448201527f41413237206f7574736964652076616c696420626c6f636b2072616e676500006064820152fd5b60848460405190631101335b60e11b825260805101600482015260406024820152601460448201527f41413234207369676e6174757265206572726f720000000000000000000000006064820152fd5b9897969594505a988351996107ee6001600160a01b0360e08d015116604087015190614bf4565b15610a2d5760807f52b7512c000000000000000000000000000000000000000000000000000000009798999a9b01516040516108518161084360208a015160408b015190602084019d8e528960248501614bd2565b03601f198101835282612465565b865160806001600160a01b0360e08301511691015161014051918b61014051928551926101405191f1983d908161014051843e519482519a604084019b8c5191156109ab5760401490811591610997575b506109125750601f601f199101160191826040525a9003116108c557509461055e565b8088631101335b60e11b6084935260805101600482015260406024820152602060448201527f41413336206f76657220706d566572696669636174696f6e4761734c696d69746064820152fd5b8b61099361091e612cba565b6040519384937f65c8fd4d0000000000000000000000000000000000000000000000000000000085526080510160048501526024840152601d60648401527f41413335206d616c666f726d6564207061796d61737465722064617461000000608484015260a0604484015260a48301906125ad565b0390fd5b601f199150601f011681018214155f6108a2565b828e6109936109b8612cba565b6040519384937f65c8fd4d0000000000000000000000000000000000000000000000000000000085526080510160048501526024840152600d60648401527f4141333320726576657274656400000000000000000000000000000000000000608484015260a0604484015260a48301906125ad565b60848760405190631101335b60e11b825260805101600482015260406024820152601e60448201527f41413331207061796d6173746572206465706f73697420746f6f206c6f7700006064820152fd5b60848760405190631101335b60e11b825260805101600482015260406024820152601e60448201527f41413236206f76657220766572696669636174696f6e4761734c696d697400006064820152fd5b60848860405190631101335b60e11b825260805101600482015260406024820152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152fd5b610b2691614bf4565b15610b32578b806104d8565b60848860405190631101335b60e11b825260805101600482015260406024820152601760448201527f41413231206469646e2774207061792070726566756e640000000000000000006064820152fd5b8b903b610bd95760849060405190631101335b60e11b825260805101600482015260406024820152601960448201527f41413230206163636f756e74206e6f74206465706c6f796564000000000000006064820152fd5b610be1612cba565b906109936040519283927f65c8fd4d00000000000000000000000000000000000000000000000000000000845260805101600484015260606024840152600d60648401527f4141323320726576657274656400000000000000000000000000000000000000608484015260a0604484015260a48301906125ad565b6101405191506104c9565b6101408051849052516020819052604090205490985081811115610c915750610140515b9761043c565b8103610c8b565b8088631101335b60e11b6084935260805101600482015260406024820152601860448201527f41413934206761732076616c756573206f766572666c6f7700000000000000006064820152fd5b60348210610d805781601411610d795780359160248110610d7957603411610d79576024810135608090811c60a0880152601490910135811c90860152606081901c15610d3b5760601c60e08501528980610377565b6001600160a01b03907fd8ccb29200000000000000000000000000000000000000000000000000000000610140515260601c16600452602461014051fd5b6101405180fd5b507f120aaab5000000000000000000000000000000000000000000000000000000006101405152600452602461014051fd5b610dbf8160e05184612aaa565b92610dca8480612aea565b91906001600160a01b03610de060208801612b3e565b169560018714610f765786610dfd575b5050019250600101610148565b806040610e0b920190612b52565b91873b15610d7957916040519283917f2dd8113300000000000000000000000000000000000000000000000000000000835286604484016040600486015252606483019160648860051b8501019281610140517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301915b8b8210610f1c57505050505081610ead916003198580950301602485015261014051956129dc565b0381610140518a5af19081610f01575b50610ef457847f86a9f750000000000000000000000000000000000000000000000000000000006101405152600452602461014051fd5b929350839260015f610df0565b61014051610f0e91612465565b61014051610d79575f610ebd565b9193967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c90879294969703018552863584811215610d79576020610f6560019385839401612bf3565b980195019201889695949391610e85565b867f86a9f750000000000000000000000000000000000000000000000000000000006101405152600452602461014051fd5b7fab143c06000000000000000000000000000000000000000000000000000000006101405152600461014051fd5b50333b1561013c565b34610d79576020600319360112610d7957610ff86124da565b33610140515261014051602052600160406101405120019081549165ffffffffffff6dffffffffffffffffffffffffffff8460081c169361104960ff821663ffffffff8360781c1687801515612a55565b60981c1680156111525742811161111d575080547fffffffffffffff000000000000000000000000000000000000000000000000ff169055604080516001600160a01b03831681526020810184905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda391a261014051808080856001600160a01b0386165af16110d96126ea565b90156110e6576101405180f35b610993906040519384937f0dcf087c0000000000000000000000000000000000000000000000000000000085523360048601612719565b7f561d331200000000000000000000000000000000000000000000000000000000610140515260045242602452604461014051fd5b7ffbd021d600000000000000000000000000000000000000000000000000000000610140515260045242602452604461014051fd5b34610d795761014051600319360112610d7957336101405152610140516020526001604061014051200180546111ef63ffffffff8260781c16918260ff6dffffffffffffffffffffffffffff8360081c169216916111e9838383811515612a55565b82612a55565b65ffffffffffff4216019065ffffffffffff821161128c5780547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001678ffffffffffff00000000000000000000000000000000000000609884901b1617905560405165ffffffffffff909116815233907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a90602090a26101405180f35b7f4e487b710000000000000000000000000000000000000000000000000000000061014051526011600452602461014051fd5b6020600319360112610d79576101c56112d66124da565b6129fc565b34610d795761014051600319360112610d79576020610140515c604051908152f35b34610d79576020600319360112610d795760043567ffffffffffffffff8111610d7957602061133361136e9236906004016124f0565b60405193849283927f570e1a3600000000000000000000000000000000000000000000000000000000845285600485015260248401916129dc565b0381610140516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af1801561141b576001600160a01b039161014051916113ec575b507f6ca7b80600000000000000000000000000000000000000000000000000000000610140515216600452602461014051fd5b61140e915060203d602011611414575b6114068183612465565b8101906129bd565b826113b9565b503d6113fc565b6040513d61014051823e3d90fd5b34610d79576040600319360112610d79576114426124da565b60243567ffffffffffffffff8111610d79576114629036906004016124f0565b604051929181908437820190610140518252610140519280610140519303915af461148b6126ea565b906109936040519283927f99410554000000000000000000000000000000000000000000000000000000008452151560048401526040602484015260448301906125ad565b34610d795761014051600319360112610d795761159061150f7f0000000000000000000000000000000000000000000000000000000000000000614242565b6115387f00000000000000000000000000000000000000000000000000000000000000006143b8565b6040519060209061159e9061154d8385612465565b6101405184525f3681376040519586957f0f00000000000000000000000000000000000000000000000000000000000000875260e08588015260e08701906125ad565b9085820360408701526125ad565b4660608501523060808501526101405160a085015283810360c0850152818084519283815201930191610140515b8281106115db57505050500390f35b8351855286955093810193928101926001016115cc565b34610d795761160036612545565b91909133321480611696575b15610fa85761161a8361288b565b611625818585612f1b565b5061014051927fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f9728480a161014051915b858310611666576101c58585613f53565b90919360019061168c61167a87898761293c565b61168488866129a9565b519088613967565b0194019190611655565b50333b1561160c565b34610d79576020600319360112610d79576001600160a01b036116c06124da565b1661014051526101405160205260206040610140512054604051908152f35b34610d79576020600319360112610d79576001600160a01b036117006124da565b60405161170c816123e3565b6101405181526101405160208201526101405160408201526101405160608201526080610140519101521661014051526101405160205260a06040610140512065ffffffffffff60405161175f816123e3565b63ffffffff60018454948584520154916dffffffffffffffffffffffffffff6020820160ff8516151581526040830190828660081c1682528660806060860195878960781c168752019660981c1686526040519788525115156020880152511660408601525116606084015251166080820152f35b34610d79576040600319360112610d795760206117ef6124da565b6001600160a01b036117ff61251e565b91166101405152600182526040610140512077ffffffffffffffffffffffffffffffffffffffffffffffff82165f52825260405f20547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006040519260401b16178152f35b34610d79576020600319360112610d795760043567ffffffffffffffff8111610d79576101206003198236030112610d79576118a3602091600401612747565b604051908152f35b34610d79576040600319360112610d79576118c46124da565b60243590336101405152610140516020526040610140512082815480821161198e57906118f0916126dd565b9055604080516001600160a01b03831681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb91a261014051808080856001600160a01b0386165af161194a6126ea565b9015611957576101405180f35b610993906040519384937f9f3d69330000000000000000000000000000000000000000000000000000000085523360048601612719565b7f25c3f46e000000000000000000000000000000000000000000000000000000006101405152600452602452604461014051fd5b34610d79576040600319360112610d79576119db6124da565b6001600160a01b036119eb61251e565b91166101405152600160205277ffffffffffffffffffffffffffffffffffffffffffffffff6040610140512091165f52602052602060405f2054604051908152f35b34610d795761014051600319360112610d795760206040517f29a0bca4af4be3421398da00295e58e6d7de38cb492214754cb6a47507dd6f8e8152f35b34610d795761014051600319360112610d795760206118a3612ce7565b34610d79576020600319360112610d795760043577ffffffffffffffffffffffffffffffffffffffffffffffff81168103610d7957336101405152600160205277ffffffffffffffffffffffffffffffffffffffffffffffff6040610140512091165f5260205260405f20611afc81546126b0565b90556101405180f35b34610d795761014051600319360112610d795760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6020600319360112610d795760043563ffffffff8116808203610d795733610140515261014051602052611d546dffffffffffffffffffffffffffff6040610140512093611bb960018601549163ffffffff8360781c1690611bb082828915156125ec565b818710156125ec565b60081c1692611bf1611bcb348661262d565b94611bd98134881515612667565b346dffffffffffffffffffffffffffff871115612667565b5460405190611bff826123e3565b815265ffffffffffff602082019160018352604081016dffffffffffffffffffffffffffff87168152606082019086825260016080840193610140518552336101405152610140516020526040610140512090518155019451151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008754169116178555517fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff6effffffffffffffffffffffffffff008087549360081b16169116178455517fffffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffff72ffffffff0000000000000000000000000000008086549360781b1616911617835551167fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff78ffffffffffff0000000000000000000000000000000000000083549260981b169116179055565b60405191825260208201527fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c0160403392a26101405180f35b34610d79576020600319360112610d79576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610d7957807fd9934b3f0000000000000000000000000000000000000000000000000000000060209214908115611e96575b8115611e6c575b8115611e42575b8115611e18575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482611e0d565b7f3e84f0210000000000000000000000000000000000000000000000000000000081149150611e06565b7fcf28ef970000000000000000000000000000000000000000000000000000000081149150611dff565b7f283f54890000000000000000000000000000000000000000000000000000000081149150611df8565b346122ba576102006003193601126122ba5760043567ffffffffffffffff81116122ba57366023820112156122ba57611f039036906024816004013591016124a4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36016101c081126122ba5761014060405191611f3f836123e3565b126122ba57604051611f508161242c565b6024356001600160a01b03811681036122ba57815260443560208201526064356040820152608435606082015260a435608082015260c43560a082015260e43560c0820152610104356001600160a01b03811681036122ba5760e082015261012435610100820152610144356101208201528152602081019161016435835260408201906101843582526101a435606084015260808301916101c43583526101e43567ffffffffffffffff81116122ba5761200f9036906004016124f0565b955a903033036123bb578651606081015195603f5a0260061c61271060a084015189010111612393575f96815191826122f3575b50505050509061205b915a90038551019636916124a4565b925a93855161010081015161012082015148018082105f146122eb5750975b61209a6001600160a01b0360e08401511694518203606084015190613ff3565b01925f9281612196575050516001600160a01b0316945b5a900301019485029051928184105f1461214f575050600381101561211c576002036120ee57602092816118a392936120e9816140e0565b614012565b7fdeadaa51000000000000000000000000000000000000000000000000000000006101405152602061014051fd5b7f4e487b710000000000000000000000000000000000000000000000000000000061014051526021600452602461014051fd5b8161217892959496939603906001600160a01b03165f525f60205260405f209081540180915590565b50600384101561211c5782612191926020951590614079565b6118a3565b9096918782516121a9575b5050506120b1565b90919293505a9260038810156122be57600288036121df575b505060a06121d6925a900391015190613ff3565b908880806121a1565b60a083015191803b156122ba578b925f928361223b938c8b88604051998a98899788957f7c627b2100000000000000000000000000000000000000000000000000000000875260048701526080602487015260848601906125ad565b9202604484015260648301520393f190816122a5575b5061229b57610993612261612cba565b6040519182917fad7954bc0000000000000000000000000000000000000000000000000000000083526020600484015260248301906125ad565b60a06121d66121c2565b5f6122af91612465565b5f610140528a612251565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b90509761207a565b915f929183809360206001600160a01b03885116910192f115612319575b808080612043565b61205b939295506040519161232c612cba565b908151612345575b505050604052600193909188612311565b7f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a20190519160206001600160a01b03855116940151612388604051928392836125d2565b0390a3888080612334565b7fdeaddead000000000000000000000000000000000000000000000000000000005f5260205ffd5b7f9fbdaa09000000000000000000000000000000000000000000000000000000005f5260045ffd5b60a0810190811067ffffffffffffffff8211176123ff57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610140810190811067ffffffffffffffff8211176123ff57604052565b6060810190811067ffffffffffffffff8211176123ff57604052565b90601f601f19910116810190811067ffffffffffffffff8211176123ff57604052565b67ffffffffffffffff81116123ff57601f01601f191660200190565b9291926124b082612488565b916124be6040519384612465565b8294818452818301116122ba578281602093845f960137010152565b600435906001600160a01b03821682036122ba57565b9181601f840112156122ba5782359167ffffffffffffffff83116122ba57602083818601950101116122ba57565b6024359077ffffffffffffffffffffffffffffffffffffffffffffffff821682036122ba57565b9060406003198301126122ba5760043567ffffffffffffffff81116122ba5760040182601f820112156122ba5780359267ffffffffffffffff84116122ba576020808301928560051b0101116122ba5791906024356001600160a01b03811681036122ba5790565b90601f19601f602080948051918291828752018686015e5f8582860101520116010190565b6040906125e99392815281602082015201906125ad565b90565b156125f5575050565b9063ffffffff80927fe1823bce000000000000000000000000000000000000000000000000000000005f52166004521660245260445ffd5b9190820180921161263a57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b15612670575050565b6dffffffffffffffffffffffffffff92507f0e10009c000000000000000000000000000000000000000000000000000000005f526004521660245260445ffd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461263a5760010190565b9190820391821161263a57565b3d15612714573d906126fb82612488565b916127096040519384612465565b82523d5f602084013e565b606090565b90926001600160a01b03608093816125e99796168452166020830152604082015281606082015201906125ad565b60429061275381612e1b565b61275b612ce7565b9161276581612b3e565b91801561285657905b60c061277d6060830183612b52565b9081604051918237209161279d61279760e0830183612b52565b90614488565b92604051946001600160a01b0360208701977f29a0bca4af4be3421398da00295e58e6d7de38cb492214754cb6a47507dd6f8e895216604087015260208301356060870152608086015260a085015260808101358285015260a081013560e08501520135610100830152610120820152610120815261281e61014082612465565b519020604051917f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201522090565b506128646040820182612b52565b9081604051918237209061276e565b67ffffffffffffffff81116123ff5760051b60200190565b9061289582612873565b6128a26040519182612465565b828152601f196128b28294612873565b01905f5b8281106128c257505050565b6020906040516128d1816123e3565b6040516128dd8161242c565b5f81525f848201525f60408201525f60608201525f60808201525f60a08201525f60c08201525f60e08201525f6101008201525f61012082015281525f838201525f60408201525f60608201525f6080820152828285010152016128b6565b919081101561297c5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1813603018212156122ba570190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b805182101561297c5760209160051b010190565b908160209103126122ba57516001600160a01b03811681036122ba5790565b601f8260209493601f1993818652868601375f8582860101520116010190565b7f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460206001600160a01b03612a4934856001600160a01b03165f525f60205260405f209081540180915590565b936040519485521692a2565b15612a5f57505050565b906dffffffffffffffffffffffffffff63ffffffff927f8421e8e5000000000000000000000000000000000000000000000000000000005f521660045216602452151560445260645ffd5b919081101561297c5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1813603018212156122ba570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156122ba570180359067ffffffffffffffff82116122ba57602001918160051b360383136122ba57565b356001600160a01b03811681036122ba5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156122ba570180359067ffffffffffffffff82116122ba576020019181360383136122ba57565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156122ba57016020813591019167ffffffffffffffff82116122ba5781360383136122ba57565b8035916001600160a01b03831683036122ba576001600160a01b036125e99316815260208201356020820152612cab612c9f612c66612c4b612c386040870187612ba3565b61012060408801526101208701916129dc565b612c586060870187612ba3565b9086830360608801526129dc565b6080850135608085015260a085013560a085015260c085013560c0850152612c9160e0860186612ba3565b9085830360e08701526129dc565b92610100810190612ba3565b916101008185039101526129dc565b3d6108008111612cde575b604051906020818301016040528082525f602083013e90565b50610800612cc5565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016301480612dda575b15612d42577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a08152612dd460c082612465565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614612d19565b909392938483116122ba5784116122ba578101920390565b612e286040820182612b52565b9091612e348284614123565b15612f1457612e45612e4a91612b3e565b614178565b9160148211612e935750506040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000602082019260601b16825260148152612dd4603482612465565b816014116122ba576020612dd4916040519384917fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008484019760601b16875260147fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec83019101603484013781015f838201520301601f198101835282612465565b5050505f90565b92919092835f5b818110612f2f5750505050565b612f3981856129a9565b51612f4582848661293c565b5f915a8151926001600160a01b03612f5c82612b3e565b168452602081013560208501526080810135936fffffffffffffffffffffffffffffffff8560801c951694604082019060608301968752815260c0820160a0840135815260c0840135906fffffffffffffffffffffffffffffffff8260801c92169161012085019061010086019384528152612fdb60e0870187612b52565b90816138aa575b5050604051612ff087612747565b9960208a019a8b528160405285519586855117825117926effffffffffffffffffffffffffffff60808a01948551179560a08b019687511789511790511711613861575051905101905101905101905101905102956040860191878352896001600160a01b0360e089516130788b848351169561307060408d018d612b52565b9290916147c5565b015116985f99801561383a575b8951604081015190516001600160a01b031680916040519d8e808d8b519360208301947f19822f7c00000000000000000000000000000000000000000000000000000000865260248401926130d993614bd2565b03601f19810182526130eb9082612465565b51905f6020948194f15f519c3d602003613832575b604052156137605750156136ff575b50506001600160a01b038451166020850151905f52600160205260405f2077ffffffffffffffffffffffffffffffffffffffffffffffff8260401c165f5260205267ffffffffffffffff60405f209182549261316a846126b0565b905516036136b3575a860311613667576001600160a01b0360e06060940151166133e0575b50506001600160a01b03949260a0859360809360606131b99801520135905a90030191015261453e565b92909116613394576132fa57506131d76001600160a01b039161453e565b929091166132ae576131ec5750600101612f22565b6132625760a49060405190631101335b60e11b8252600482015260406024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560648201527f65000000000000000000000000000000000000000000000000000000000000006084820152fd5b60849060405190631101335b60e11b8252600482015260406024820152602060448201527f41413337207061796d617374657220696e76616c20626c6f636b2072616e67656064820152fd5b60848360405190631101335b60e11b8252600482015260406024820152601460448201527f41413334207369676e6174757265206572726f720000000000000000000000006064820152fd5b8260849161334b5760405190631101335b60e11b8252600482015260406024820152601760448201527f414132322065787069726564206f72206e6f74206475650000000000000000006064820152fd5b60405190631101335b60e11b8252600482015260406024820152601e60448201527f41413237206f7574736964652076616c696420626c6f636b2072616e676500006064820152fd5b60848460405190631101335b60e11b8252600482015260406024820152601460448201527f41413234207369676e6174757265206572726f720000000000000000000000006064820152fd5b909c9b9a99989796505a9085519d60e08f01516001600160a01b0316815161340791614bf4565b1561361b5761345a7f52b7512c00000000000000000000000000000000000000000000000000000000999a9b9c9d9e9f608001519261084360405193849251905190602084019d8e528960248501614bd2565b5f8088518b8260806001600160a01b0360e08501511693015192865193f1983d90815f843e519482519a604084019b8c51911561359d5760401490811591613589575b5061350c5750601f601f199101160191826040525a9003116134c35750948260a061318f565b8088631101335b60e11b60849352600482015260406024820152602060448201527f41413336206f76657220706d566572696669636174696f6e4761734c696d69746064820152fd5b8b610993613518612cba565b6040519384937f65c8fd4d00000000000000000000000000000000000000000000000000000000855260048501526024840152601d60648401527f41413335206d616c666f726d6564207061796d61737465722064617461000000608484015260a0604484015260a48301906125ad565b601f199150601f011681018214155f61349d565b828e6109936135aa612cba565b6040519384937f65c8fd4d00000000000000000000000000000000000000000000000000000000855260048501526024840152600d60648401527f4141333320726576657274656400000000000000000000000000000000000000608484015260a0604484015260a48301906125ad565b60848960405190631101335b60e11b8252600482015260406024820152601e60448201527f41413331207061796d6173746572206465706f73697420746f6f206c6f7700006064820152fd5b60848960405190631101335b60e11b8252600482015260406024820152601e60448201527f41413236206f76657220766572696669636174696f6e4761734c696d697400006064820152fd5b60848a60405190631101335b60e11b8252600482015260406024820152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152fd5b61370891614bf4565b15613714575f8061310f565b60848a60405190631101335b60e11b8252600482015260406024820152601760448201527f41413231206469646e2774207061792070726566756e640000000000000000006064820152fd5b8d903b6137b35760849060405190631101335b60e11b8252600482015260406024820152601960448201527f41413230206163636f756e74206e6f74206465706c6f796564000000000000006064820152fd5b6137bb612cba565b906109936040519283927f65c8fd4d000000000000000000000000000000000000000000000000000000008452600484015260606024840152600d60648401527f4141323320726576657274656400000000000000000000000000000000000000608484015260a0604484015260a48301906125ad565b5f9150613100565b9950815f525f60205260405f20548181115f1461385a57505f5b99613085565b8103613854565b808f631101335b60e11b60849352600482015260406024820152601860448201527f41413934206761732076616c756573206f766572666c6f7700000000000000006064820152fd5b6034821061393b57816014116122ba57803560601c91602481106122ba576014820135906034116122ba576fffffffffffffffffffffffffffffffff60248193013560801c1660a089015260801c16608087015280156139105760e08601525f80612fe2565b7fd8ccb292000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f120aaab5000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9092915a6020820180515f5d606083015190604051968761398b6060830183612b52565b5f60038211613f4b575b7fffffffff00000000000000000000000000000000000000000000000000000000167f8dd7712f0000000000000000000000000000000000000000000000000000000003613e15575050505f613a82613b5c613a2e613a4260209587516040519384927f8dd7712f000000000000000000000000000000000000000000000000000000008a850152604060248501526064840190612bf3565b90604483015203601f198101835282612465565b6108436040519384927e42dc53000000000000000000000000000000000000000000000000000000008885015261020060248501526102248401906125ad565b613b2b604484018c60806101a09161012081516001600160a01b038151168652602081015160208701526040810151604087015260608101516060870152838101518487015260a081015160a087015260c081015160c08701526001600160a01b0360e08201511660e087015261010081015161010087015201516101208501526020810151610140850152604081015161016085015260608101516101808501520151910152565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc83820301610204840152886125ad565b828151910182305af15f519760405215613b78575b5050505050565b909192939495505f3d602014613e08575b7fdeaddead000000000000000000000000000000000000000000000000000000008103613bfc5760848660405190631101335b60e11b8252600482015260406024820152600f60448201527f41413935206f7574206f662067617300000000000000000000000000000000006064820152fd5b7fdeadaa5100000000000000000000000000000000000000000000000000000000919293949550145f14613c64575050613c48613c3d613c58925a906126dd565b60808401519061262d565b6040830151836120e982956140e0565b905b5f80808080613b71565b91613cc8919260405190518551907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479260206001600160a01b03845116930151613cab612cba565b90613cbb604051928392836125d2565b0390a36040525a906126dd565b613cd8608084019182519061262d565b915f905a92855161010081015161012082015148018082105f14613e005750955b613d196001600160a01b0360e08401511693518203606084015190613ff3565b01925f9280613dd1575050516001600160a01b0316935b5a900301019283026040850151928184105f14613d9257505080613d6557509081613d5f92936120e9816140e0565b90613c5a565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526021600452fd5b613dba90828493979503906001600160a01b03165f525f60205260405f209081540180915590565b50613d65575090825f613dcc93614079565b613d5f565b95919051613de0575b50613d30565b93509050613df95a9360a05f955a900391015190613ff3565b905f613dda565b905095613cf9565b5060205f803e5f51613b89565b613f429350613f3491613e5a917e42dc5300000000000000000000000000000000000000000000000000000000602086015261020060248601526102248501916129dc565b613f03604484018960806101a09161012081516001600160a01b038151168652602081015160208701526040810151604087015260608101516060870152838101518487015260a081015160a087015260c081015160c08701526001600160a01b0360e08201511660e087015261010081015161010087015201516101208501526020810151610140850152604081015161016085015260608101516101808501520151910152565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc83820301610204840152856125ad565b03601f198101895288612465565b60205f88613b5c565b508135613995565b6001600160a01b03168015613fc8575f805d5f80808085855af1613f756126ea565b9015613f8057505050565b610993906040519384937f40848e61000000000000000000000000000000000000000000000000000000008552600485015260248401526060604484015260648301906125ad565b7f1a3b45fd000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b90619c40820181111561400c57606491600a9103020490565b50505f90565b9190917f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f608060208301519251946001600160a01b038651169460206001600160a01b0360e089015116970151916040519283525f602084015260408301526060820152a4565b9060807f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f9160208401519351956001600160a01b038751169560206001600160a01b0360e08a015116980151926040519384521515602084015260408301526060820152a4565b60208101519051907f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e6020806001600160a01b03855116940151604051908152a3565b9060021161417357357fffffffffffffffffffffffffffffffffffffffff000000000000000000000000167f77020000000000000000000000000000000000000000000000000000000000001490565b505f90565b60175f80833c5f51907fef010000000000000000000000000000000000000000000000000000000000007fffffff00000000000000000000000000000000000000000000000000000000008316036141da575060481c6001600160a01b031690565b806001600160a01b03913b15614216577f9f4e4cc9000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b7fe5819b95000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b60ff81146142a15760ff811690601f82116142795760405191614266604084612465565b6020808452838101919036833783525290565b7fb3512b0c000000000000000000000000000000000000000000000000000000005f5260045ffd5b506040515f6002548060011c91600182169182156143ae575b60208410831461438157838552849290811561434457506001146142e5575b6125e992500382612465565b5060025f90815290917f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8183106143285750509060206125e9928201016142d9565b6020919350806001915483858801015201910190918392614310565b602092506125e99491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b8201016142d9565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b92607f16926142ba565b60ff81146143dc5760ff811690601f82116142795760405191614266604084612465565b506040515f6003548060011c916001821691821561447e575b602084108314614381578385528492908115614344575060011461441f576125e992500382612465565b5060035f90815290917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8183106144625750509060206125e9928201016142d9565b602091935080600191548385880101520191019091839261444a565b92607f16926143f5565b614492828261462d565b806144a35750816040519182372090565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe919203604051927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff682019084377f22e325a2974396560000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6828501015201902090565b8015614624575f6040805161455281612449565b82815282602082015201526001600160a01b0381169065ffffffffffff8160a01c16908115614616575b60409060d01c91815161458e81612449565b84815283602082015265ffffffffffff821692839101526580000000000083101580614606575b156145e957657fffffffffff91501643119081156145d6575b509060019092565b657fffffffffff9150164311155f6145ce565b5042119081156145fb575b50905f9092565b90504211155f6145f4565b50658000000000008210156145b5565b65ffffffffffff915061457c565b505f905f905f90565b603e821061400c577f22e325a2974396560000000000000000000000000000000000000000000000007fffffffffffffffff0000000000000000000000000000000000000000000000006146a5847ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff881018186612e03565b903582811691600881106147b0575b5050160361400c57816146eb91817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6810191612e03565b90357fffff0000000000000000000000000000000000000000000000000000000000008116916002811061477b575b505060f01c907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc28101821161474d575090565b7f07b9a191000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b7fffff0000000000000000000000000000000000000000000000000000000000009250829060020360031b1b16165f8061471a565b839250829060080360031b1b16165f806146b4565b929091925f826147d6575050505050565b8351946001600160a01b03865116956147ef8583614123565b614a96575060148410614a4a5783601411614a4657803560601c93863b614a105761485b9160209160408851015190856040518096819582947f570e1a3600000000000000000000000000000000000000000000000000000000845288600485015260248401916129dc565b03926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690f1918215614a0457916149e5575b506001600160a01b038116801561499957850361494d573b15614901575060407fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d916001600160a01b0360e06020860151955101511682519182526020820152a35f80808080613b71565b60849060405190631101335b60e11b8252600482015260406024820152602060448201527f4141313520696e6974436f6465206d757374206372656174652073656e6465726064820152fd5b60848260405190631101335b60e11b8252600482015260406024820152602060448201527f4141313420696e6974436f6465206d7573742072657475726e2073656e6465726064820152fd5b60848360405190631101335b60e11b8252600482015260406024820152601b60448201527f4141313320696e6974436f6465206661696c6564206f72204f4f4700000000006064820152fd5b6149fe915060203d602011611414576114068183612465565b5f614896565b604051903d90823e3d90fd5b50505050906020807fa39bcda08ffd11bafb11c4f170ef24fc6dc1a9d1b0394d90dbd19e0b919050e992015192604051908152a3565b5080fd5b60848360405190631101335b60e11b8252600482015260406024820152601760448201527f4141393920696e6974436f646520746f6f20736d616c6c0000000000000000006064820152fd5b9195949390925060148111614aae575b505050505050565b60406001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016920151816014116122ba57823b156122ba57614b5c935f80946040518097819682957fc09ad0d90000000000000000000000000000000000000000000000000000000084528c60048501526040602485015260147fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec60448601930191016129dc565b0393f18015614bc757614bb2575b507f7c9f9ade6a03a0bba484e52df872467a270e798ffc1adab9dfaa8d0e627f05446001600160a01b036020614b9f85614178565b93015192169380a45f8080808080614aa6565b614bbf9193505f90612465565b5f915f614b6a565b6040513d5f823e3d90fd5b614bea60409295949395606083526060830190612bf3565b9460208201520152565b6001600160a01b03165f525f60205260405f20908154818110612f145703905560019056fea264697066735822122042a9122003ddaf427b826536bf23a9cc94c2e0ac6c100a4a9f9a9170c93357a564736f6c6343000821003360a08060405234602f57336080526104ba9081610034823960805181818160c30152818161023701526102cf0152f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c8063570e1a361461025b578063b0d691fe146101ed5763c09ad0d91461003a575f80fd5b346101e95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e95760043573ffffffffffffffffffffffffffffffffffffffff811681036101e95760243567ffffffffffffffff81116101e957366023820112156101e9575f916100bd8392369060248160040135910161038a565b906101027f0000000000000000000000000000000000000000000000000000000000000000303373ffffffffffffffffffffffffffffffffffffffff8316331461042c565b82602083519301915af11561011357005b3d61080081116101e0575b60c460405160208382010160405282815260208101925f843e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6040519485937f65c8fd4d0000000000000000000000000000000000000000000000000000000085525f6004860152606060248601528260648601527f4141313320454950373730322073656e64657220696e6974206661696c656400608486015260a060448601525180918160a48701528686015e5f85828601015201168101030190fd5b5061080061011e565b5f80fd5b346101e9575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e957602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101e95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e95760043567ffffffffffffffff81116101e957366023820112156101e95780600401359067ffffffffffffffff82116101e95736602483830101116101e9575f9161030e7f0000000000000000000000000000000000000000000000000000000000000000303373ffffffffffffffffffffffffffffffffffffffff8316331461042c565b806014116101e95760209161034b5f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec3691016038840161038a565b90826024858451940192013560601c5af1610382575b60209073ffffffffffffffffffffffffffffffffffffffff60405191168152f35b505f51610361565b92919267ffffffffffffffff82116103ff57604051917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f8401160116830183811067ffffffffffffffff8211176103ff576040528294818452818301116101e9578281602093845f960137010152565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b1561043657505050565b73ffffffffffffffffffffffffffffffffffffffff92918380927ffe34a6d3000000000000000000000000000000000000000000000000000000005f5216600452166024521660445260645ffdfea2646970667358221220e9e7afecea4a69b36e49284a4d2974b57bbe45ab5f9443377e13e1304ec438ff64736f6c63430008210033"` diff --git a/api/@aastar/sdk/variables/FAUCET_API_URL.md b/api/@aastar/sdk/variables/FAUCET_API_URL.md new file mode 100644 index 000000000..01d40a8b0 --- /dev/null +++ b/api/@aastar/sdk/variables/FAUCET_API_URL.md @@ -0,0 +1,5 @@ +> `const` **FAUCET\_API\_URL**: `"https://faucet-aastar.vercel.app"` = `"https://faucet-aastar.vercel.app"` + +Defined in: [packages/core/src/constants.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L85) + +Common Constants diff --git a/api/@aastar/sdk/variables/ForceExitModuleABI.md b/api/@aastar/sdk/variables/ForceExitModuleABI.md new file mode 100644 index 000000000..d32fe3e10 --- /dev/null +++ b/api/@aastar/sdk/variables/ForceExitModuleABI.md @@ -0,0 +1,3 @@ +> `const` **ForceExitModuleABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L197) diff --git a/api/@aastar/sdk/variables/ForceExitModuleArtifact.md b/api/@aastar/sdk/variables/ForceExitModuleArtifact.md new file mode 100644 index 000000000..91082a5eb --- /dev/null +++ b/api/@aastar/sdk/variables/ForceExitModuleArtifact.md @@ -0,0 +1,3 @@ +> `const` **ForceExitModuleArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `ForceExitModuleABIData` + +Defined in: [packages/core/src/abis/index.ts:198](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L198) diff --git a/api/@aastar/sdk/variables/GTOKEN_ADDRESS.md b/api/@aastar/sdk/variables/GTOKEN_ADDRESS.md new file mode 100644 index 000000000..772eac406 --- /dev/null +++ b/api/@aastar/sdk/variables/GTOKEN_ADDRESS.md @@ -0,0 +1,3 @@ +> **GTOKEN\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L30) diff --git a/api/@aastar/sdk/variables/GTOKEN_EIP712_DOMAIN.md b/api/@aastar/sdk/variables/GTOKEN_EIP712_DOMAIN.md new file mode 100644 index 000000000..20eb1ce06 --- /dev/null +++ b/api/@aastar/sdk/variables/GTOKEN_EIP712_DOMAIN.md @@ -0,0 +1,13 @@ +> `const` **GTOKEN\_EIP712\_DOMAIN**: `object` + +Defined in: [packages/x402/src/eip3009.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L44) + +## Type Declaration + +### name + +> `readonly` **name**: `"GToken"` = `'GToken'` + +### version + +> `readonly` **version**: `"1"` = `'1'` diff --git a/api/@aastar/sdk/variables/GTOKEN_STAKING_ADDRESS.md b/api/@aastar/sdk/variables/GTOKEN_STAKING_ADDRESS.md new file mode 100644 index 000000000..b3dba75c4 --- /dev/null +++ b/api/@aastar/sdk/variables/GTOKEN_STAKING_ADDRESS.md @@ -0,0 +1,3 @@ +> **GTOKEN\_STAKING\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:31](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L31) diff --git a/api/@aastar/sdk/variables/GTokenABI.md b/api/@aastar/sdk/variables/GTokenABI.md new file mode 100644 index 000000000..783dc7be8 --- /dev/null +++ b/api/@aastar/sdk/variables/GTokenABI.md @@ -0,0 +1,3 @@ +> `const` **GTokenABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L62) diff --git a/api/@aastar/sdk/variables/GTokenArtifact.md b/api/@aastar/sdk/variables/GTokenArtifact.md new file mode 100644 index 000000000..09f8ef2dc --- /dev/null +++ b/api/@aastar/sdk/variables/GTokenArtifact.md @@ -0,0 +1,13 @@ +> `const` **GTokenArtifact**: `object` = `GTokenABIData` + +Defined in: [packages/core/src/abis/index.ts:63](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L63) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a0604052346103c657610e076020813803918261001c816103ca565b9384928339810103126103c6575161003460406103ca565b90601082526f23b7bb32b93730b731b2902a37b5b2b760811b602083015261005c60406103ca565b600681526523aa37b5b2b760d11b602082015282519091906001600160401b0381116102cc57600354600181811c911680156103bc575b60208210146102ae57601f811161034e575b506020601f82116001146102eb57819293945f926102e0575b50508160011b915f199060031b1c1916176003555b81516001600160401b0381116102cc57600454600181811c911680156102c2575b60208210146102ae57601f8111610240575b50602092601f82116001146101df57928192935f926101d4575b50508160011b915f199060031b1c1916176004555b80156101c15760805233156101ae5760058054336001600160a01b03198216811790925560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3610a1790816103f082396080518181816104db01528181610559015261058e0152f35b631e4fbdf760e01b5f525f60045260245ffd5b63392e1e2760e01b5f525f60045260245ffd5b015190505f80610120565b601f1982169360045f52805f20915f5b8681106102285750836001959610610210575b505050811b01600455610135565b01515f1960f88460031b161c191690555f8080610202565b919260206001819286850151815501940192016101ef565b818111156101065760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b602084106102a6575b81601f9101920160051c03905f5b828110610299575050610106565b5f8282015560010161028b565b5f915061027d565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100f4565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100be565b601f1982169060035f52805f20915f5b8181106103365750958360019596971061031e575b505050811b016003556100d3565b01515f1960f88460031b161c191690555f8080610310565b9192602060018192868b0151815501940192016102fb565b818111156100a55760035f52601f820160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b602084106103b4575b81601f9101920160051c03905f5b8281106103a75750506100a5565b5f82820155600101610399565b5f915061038b565b90607f1690610093565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102cc5760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106dc57508063095ea7b31461063457806318160ddd1461061757806323b872dd146105df578063313ce567146105c4578063349f0b901461057c578063355274ea1461054257806340c10f191461045657806342966c681461043957806354fd4d50146103ce57806370a0823114610397578063715018a61461034557806379cc6790146103135780638da5cb5b146102ed57806395d89b41146101e9578063a9059cbb146101b8578063dd62ed3e146101645763f2fde38b146100e2575f80fd5b34610160576020366003190112610160576001600160a01b036101036107be565b61010b61095f565b16801561014d576001600160a01b03600554828219821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b346101605760403660031901126101605761017d6107be565b6001600160a01b0361018d6107d4565b91165f5260016020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b34610160576040366003190112610160576101de6101d46107be565b60243590336108b5565b602060405160018152f35b34610160575f366003190112610160576040515f6004548060011c906001811680156102e3575b6020831081146102cf578285529081156102ab575060011461024d575b6102498361023d818503826107ea565b60405191829182610794565b0390f35b91905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b915f905b8082106102915750909150810160200161023d61022d565b919260018160209254838588010152019101909291610279565b60ff191660208086019190915291151560051b8401909101915061023d905061022d565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610210565b34610160575f3660031901126101605760206001600160a01b0360055416604051908152f35b346101605760403660031901126101605761034361032f6107be565b6024359061033e82338361080c565b610986565b005b34610160575f3660031901126101605761035d61095f565b5f6001600160a01b0360055481198116600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610160576020366003190112610160576001600160a01b036103b86107be565b165f525f602052602060405f2054604051908152f35b34610160575f36600319011261016057604051604081019080821067ffffffffffffffff8311176104255761024991604052600c81526b23aa37b5b2b716991718971960a11b602082015260405191829182610794565b634e487b7160e01b5f52604160045260245ffd5b346101605760203660031901126101605761034360043533610986565b346101605760403660031901126101605761046f6107be565b6001600160a01b036024359161048361095f565b1690811561052f576002549080820180921161051b5760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a37f000000000000000000000000000000000000000000000000000000000000000060025481811161050657005b63279e7e1560e21b5f5260045260245260445ffd5b634e487b7160e01b5f52601160045260245ffd5b63ec442f0560e01b5f525f60045260245ffd5b34610160575f3660031901126101605760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610160575f366003190112610160577f0000000000000000000000000000000000000000000000000000000000000000600254810390811161051b57602090604051908152f35b34610160575f36600319011261016057602060405160128152f35b34610160576060366003190112610160576101de6105fb6107be565b6106036107d4565b6044359161061283338361080c565b6108b5565b34610160575f366003190112610160576020600254604051908152f35b346101605760403660031901126101605761064d6107be565b6024359033156106c9576001600160a01b03169081156106b657335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b34610160575f366003190112610160575f6003548060011c9060018116801561078a575b6020831081146102cf578285529081156102ab575060011461072c576102498361023d818503826107ea565b91905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b915f905b8082106107705750909150810160200161023d61022d565b919260018160209254838588010152019101909291610758565b91607f1691610700565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361016057565b602435906001600160a01b038216820361016057565b90601f8019910116810190811067ffffffffffffffff82111761042557604052565b6001600160a01b03909291921691825f52600160205260405f206001600160a01b0382165f5260205260405f2054925f19840361084a575b50505050565b8284106108915780156106c9576001600160a01b038216156106b6575f5260016020526001600160a01b0360405f2091165f5260205260405f20910390555f808080610844565b506001600160a01b038391637dc7a0d960e11b5f521660045260245260445260645ffd5b6001600160a01b031690811561094c576001600160a01b031691821561052f57815f525f60205260405f205481811061093357817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b634b637e8f60e11b5f525f60045260245ffd5b6001600160a01b0360055416330361097357565b63118cdaa760e01b5f523360045260245ffd5b9091906001600160a01b0316801561094c57805f525f60205260405f20548381106109f0576020845f94957fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef938587528684520360408620558060025403600255604051908152a3565b915063391434e360e21b5f5260045260245260445260645ffdfea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/GTokenAuthorizationABI.md b/api/@aastar/sdk/variables/GTokenAuthorizationABI.md new file mode 100644 index 000000000..3e6e335a5 --- /dev/null +++ b/api/@aastar/sdk/variables/GTokenAuthorizationABI.md @@ -0,0 +1,3 @@ +> `const` **GTokenAuthorizationABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L69) diff --git a/api/@aastar/sdk/variables/GTokenAuthorizationArtifact.md b/api/@aastar/sdk/variables/GTokenAuthorizationArtifact.md new file mode 100644 index 000000000..9feb5b46f --- /dev/null +++ b/api/@aastar/sdk/variables/GTokenAuthorizationArtifact.md @@ -0,0 +1,3 @@ +> `const` **GTokenAuthorizationArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `GTokenAuthorizationABIData` + +Defined in: [packages/core/src/abis/index.ts:70](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L70) diff --git a/api/@aastar/sdk/variables/GTokenStakingABI.md b/api/@aastar/sdk/variables/GTokenStakingABI.md new file mode 100644 index 000000000..627d4a98b --- /dev/null +++ b/api/@aastar/sdk/variables/GTokenStakingABI.md @@ -0,0 +1,3 @@ +> `const` **GTokenStakingABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L72) diff --git a/api/@aastar/sdk/variables/GTokenStakingArtifact.md b/api/@aastar/sdk/variables/GTokenStakingArtifact.md new file mode 100644 index 000000000..8b1fe7e1f --- /dev/null +++ b/api/@aastar/sdk/variables/GTokenStakingArtifact.md @@ -0,0 +1,13 @@ +> `const` **GTokenStakingArtifact**: `object` = `GTokenStakingABIData` + +Defined in: [packages/core/src/abis/index.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L73) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60c03461019e57601f61253038819003918201601f19168301916001600160401b038311848410176101a25780849260609460405283398101031261019e57610047816101b6565b906100606040610059602084016101b6565b92016101b6565b9060015f55331561018b5760018054336001600160a01b0319821681179092556040519491906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160a01b031690811561017c576001600160a01b031690811561017c576001600160a01b0383161561017c57608052600280546001600160a01b03191691909117905560a05261236590816101cb82396080518181816109c701528181610abb01528181610edb0152818161127f015281816115530152818161158e01528181611bef0152611c58015260a0518181816103c9015281816105ca01528181610cab0152818161121e015281816113b2015281816117c0015281816120e101526121b40152f35b63e6c4247b60e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361019e5756fe6080806040526004361015610012575f80fd5b5f3560e01c90816306433b1b146117a35750806316934fc41461173d57806330b039ee146116aa57806336cb2b821461162c578063374e4d73146113845780634bcb80a2146111d957806354fd4d501461118657806361d027b314611160578063678b3ee214610c5a5780636d265c1114610c0b5780636da12d0c14610bb657806370a0823114610b7e578063715018a614610b2c5780637c50309f14610adf5780637f6b337b14610a9c578063817b1cd214610a7f57806384747ba814610a5a5780638da5cb5b14610a345780638f7648481461087f57806391b65cd61461065657806394e2b21e146106235780639e9093da1461058b578063a0821be314610567578063aed2d9081461052a578063b4d81fb314610476578063d64c66aa146103a5578063f0f4426014610317578063f2fde38b146102995763f50102c01461015b575f80fd5b346102955760403660031901126102955760806001600160a01b0361017e6117e4565b5f606060405161018d8161187e565b828152826020820152826040820152015216805f52600460205260405f206024355f5260205260405f2090604051906101c582611862565b82546001600160801b0381168352841c6020830152610204600365ffffffffffff600186015416946040850195865260028101546060860152016118bc565b848301525f52600360205265ffffffffffff6001600160801b0360405f209260405161022f8161187e565b8454815260606003600187015496876020850152600281015460408501520154910152511692511660606040516102658161187e565b848152602081019384526040810192835201915f8352604051938452516020840152516040830152516060820152f35b5f80fd5b34610295576020366003190112610295576001600160a01b036102ba6117e4565b6102c2611f60565b168015610304576001600160a01b03600154828219821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610295576020366003190112610295576001600160a01b036103386117e4565b610340611f60565b16801561039657600254816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a5f80a373ffffffffffffffffffffffffffffffffffffffff191617600255005b63e6c4247b60e01b5f5260045ffd5b34610295576060366003190112610295576004356024356044356001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633141580610461575b610453576107d08211610444577fc80e6b66eb58558814d2cbd504bae3d3ed4eb316287800124c793081728599ad91604091845f526006602052806001845f20848155015582519182526020820152a2005b63cd4e616760e01b5f5260045ffd5b6282b42960e81b5f5260045ffd5b506001600160a01b03600154163314156103f2565b346102955760403660031901126102955760406104916117e4565b6001600160a01b0360243591165f526004602052815f20815f526020526001600160801b03825f205416905f526006602052815f20906127106104f08451936104d985611832565b6020600182549283885201549501948552836119f2565b049151808310610522575b5080821161051a575b8161050e91611a05565b82519182526020820152f35b905080610504565b9150836104fb565b34610295576020366003190112610295576001600160a01b0361054b6117e4565b165f526008602052602060ff60405f2054166040519015158152f35b34610295576020366003190112610295576105806117e4565b5060206040515f8152f35b346102955760a0366003190112610295576105a46117e4565b608435906001600160a01b0382168203610295576105c0611f87565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633036106145760209161060891606435906044359060243590611a9e565b60015f55604051908152f35b6310f5403960e31b5f5260045ffd5b34610295576020366003190112610295576004355f5260066020526040805f206001815491015482519182526020820152f35b34610295576020366003190112610295576001600160a01b036106776117e4565b16805f52600560205260405f2090604051808360208295549384815201905f5260205f20925f5b8181106108665750506106b39250038361189a565b8151916106bf83611a1f565b926106cd604051948561189a565b8084526106dc601f1991611a1f565b015f5b8181106108305750505f5b815181101561078057600190835f52600460205260405f2061070c8285611a57565b515f5260205260405f2061075f60036040519261072884611862565b80546001600160801b038116855260801c602085015265ffffffffffff8682015416604085015260028101546060850152016118bc565b608082015261076e8287611a57565b526107798186611a57565b50016106ea565b836040518091602082016020835281518091526040830190602060408260051b8601019301915f905b8282106107b857505050500390f35b919360019193955060206108208192603f198a820301865260a060808a516001600160801b0381511684526001600160801b0386820151168685015265ffffffffffff604082015116604085015260608101516060850152015191816080820152019061195c565b96019201920185949391926107a9565b60209060405161083f81611862565b5f81525f838201525f60408201525f606082015260606080820152828288010152016106df565b845483526001948501948794506020909301920161069e565b34610295576080366003190112610295576108986117e4565b60443560243560643567ffffffffffffffff8111610295576108be903690600401611980565b6108c9949194611f87565b335f52600860205260ff60405f20541615610a25576001600160a01b03821690815f52600460205260405f20845f5260205260405f20906001600160801b03825416868110610a16576109276001600160801b039182891690611a37565b166001600160801b0319835416178255825f52600360205260405f2096875497878910610a16576001600160801b037f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa074948261099a8b610a019d60016109f99701610993838254611a12565b9055611a05565b90556109a88a600754611a05565b6007555416978815610a07575b6109eb816001600160a01b03600254167f000000000000000000000000000000000000000000000000000000000000000061205c565b604051938493429285611a6b565b0390a26121a8565b60015f55005b610a118888611fe0565b6109b5565b6378de4a6960e11b5f5260045ffd5b63a4bc77a760e01b5f5260045ffd5b34610295575f3660031901126102955760206001600160a01b0360015416604051908152f35b34610295575f3660031901126102955760206040516a115eec47f6cf7e350000008152f35b34610295575f366003190112610295576020600754604051908152f35b34610295575f3660031901126102955760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610295576040366003190112610295576001600160a01b03610b006117e4565b165f52600460205260405f206024355f5260205260206001600160801b0360405f205416604051908152f35b34610295575f36600319011261029557610b44611f60565b5f6001600160a01b0360015481198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610295576020366003190112610295576001600160a01b03610b9f6117e4565b165f526003602052602060405f2054604051908152f35b3461029557604036600319011261029557610bcf6117e4565b6001600160a01b0360243591165f52600560205260405f20805482101561029557602091610bfc916119ae565b90549060031b1c604051908152f35b34610295576040366003190112610295576001600160a01b03610c2c6117e4565b165f52600460205260405f206024355f5260205260206001600160801b0360405f2054161515604051908152f35b3461029557606036600319011261029557610c736117e4565b60243560443567ffffffffffffffff811161029557610c96903690600401611980565b610ca1939193611f87565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633141580611149575b61113a576001600160a01b03821691825f52600360205260405f20908154948581115f146111345750845b85610d4e575b5050506020937f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa07491610d3f60405192839242918885611a6b565b0390a260015f55604051908152f35b85610d6791600185989796949501610993838254611a12565b8555610d7584600754611a05565b600755825f526005602052610d8f8460405f209654611a12565b855490610d9b82611a1f565b96610da9604051988961189a565b828852601f19610db884611a1f565b013660208a0137610dc883611a1f565b92610dd6604051948561189a565b808452610de5601f1991611a1f565b0136602085013781158015610f66575b505050835f52600560205260405f20955f955b875480881015610ebf57865f52600460205260405f20610e28898b6119ae565b90549060031b1c5f526020526001600160801b0360405f205416155f14610eac575f198101908111610e9857610e5e90896119ae565b90549060031b1c610e88610e72898b6119ae565b819391549060031b91821b915f19901b19161790565b9055610e9388611fa5565b610e08565b634e487b7160e01b5f52601160045260245ffd5b50955f198114610e985760010195610e08565b50939791955093919550610eff836001600160a01b03600254167f000000000000000000000000000000000000000000000000000000000000000061205c565b5f5b8451811015610f335780610f2d610f1a60019388611a57565b51610f25838a611a57565b51908b6121a8565b01610f01565b50955090939092509050837f6951689eba99e77d7e3b622f276c0ad8e36126c3c510f181b86d05d685eaa0746020610d05565b9296989791949590935f965f5b8654811015611043578b90845f52600460205260405f20610f94828a6119ae565b90549060031b1c5f5260205260405f2099610fba6001600160801b038c541693846119f2565b8861102f576001936001600160801b03928d8d610ff7940492808411611027575b610fe9869182861690611a37565b168519825416179055611a12565b9a611002838b6119ae565b90549060031b1c611013848a611a57565b525416611020828d611a57565b5201610f73565b925082610fdb565b634e487b7160e01b5f52601260045260245ffd5b5096909992935061105991955097939782611a05565b9487545b8015158061112b575b1561111857855f52600460205260405f205f19820190828211610e985761108d828c6119ae565b90549060031b1c5f5260205260405f20906001600160801b0382541691826110c1575b5050508015610e98575f190161105d565b906110ff6001600160801b03611105959b93858511155f1461110e57816110ed86975b82891690611a37565b1682198254161781555416918c611a57565b52611a05565b958a80806110b0565b816110ed876110e4565b5093945094909550959095878080610df5565b50861515611066565b94610cff565b6338796dcd60e11b5f5260045ffd5b50335f52600860205260ff60405f20541615610cd4565b34610295575f3660031901126102955760206001600160a01b0360025416604051908152f35b34610295575f366003190112610295576111d56040516111a760408261189a565b600d81526c05374616b696e672d342e322e3609c1b602082015260405191829160208352602083019061195c565b0390f35b34610295576080366003190112610295576111f26117e4565b604435906024356064356001600160a01b038116810361029557611214611f87565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610614576001600160a01b03831690815f52600460205260405f20835f5260205260405f20906001600160801b038254161561137557856112a39130907f0000000000000000000000000000000000000000000000000000000000000000612248565b6112af85600754611a12565b946a115eec47f6cf7e350000008611611366576001600160801b0381166001600160801b0383541601926001600160801b038411610e98577fe4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c60608693610a01996001600160801b038098168819885416178755845f52600360205260405f2061133a838254611a12565b905560075565ffffffffffff6001870154166040519182525f60208301526040820152a35416916121a8565b6301d0b12b60e11b5f5260045ffd5b63454c458960e11b5f5260045ffd5b346102955760403660031901126102955761139d6117e4565b6024356113a8611f87565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610614576001600160a01b038216805f52600460205260405f20825f5260205260405f209165ffffffffffff6001840154161561161d5760209381610608937f9cadbc33680e22a2f04ed8eb0d7cc7f218ee9231b3473ed05904c7ec5e2d483d6001600160801b03611544975416825f526004895260405f20845f528952600360405f205f81555f60018201555f60028201550161147281546117fa565b90816115db575b50506114858486611fe0565b825f526003895260405f2061149b828254611a05565b9055825f526003895260405f2054156115c6575b6114bb81600754611a05565b600755835f526006895260405f206127106114f2604051926114dc84611832565b8c600182549283875201549401938452846119f2565b0490518082106115be575b508181116115b7575b6115108183611a05565b9889928261157c575b8361154c575b6040519384934292859094939260609260808301968352602083015260408201520152565b0390a36120d7565b61157784897f000000000000000000000000000000000000000000000000000000000000000061205c565b61151f565b6115b2836001600160a01b03600254167f000000000000000000000000000000000000000000000000000000000000000061205c565b611519565b5080611506565b90508a6114fd565b825f52600389525f60016040822001556114af565b81601f5f93116001146115f25750555b8980611479565b8183528b832061160e91601f0160051c841901906001016119d7565b808252818b81209155556115eb565b63f90e998d60e01b5f5260045ffd5b34610295576040366003190112610295576116456117e4565b602435908115158092036102955760206001600160a01b037fe0a56452e1e2337147f048c582bc931e7c341d221b44961f32dec8b73fd669bc92611687611f60565b1692835f526008825260405f2060ff1981541660ff8316179055604051908152a2005b34610295576040366003190112610295576001600160a01b036116cb6117e4565b165f52600460205260405f206024355f5260205260405f2080546111d565ffffffffffff600184015416926117076003600283015492016118bc565b9060405194846001600160801b03879616865260801c60208601526040850152606084015260a0608084015260a083019061195c565b34610295576020366003190112610295576001600160a01b0361175e6117e4565b165f52600360205260405f2080546111d56001830154926003600282015491015490604051948594859094939260609260808301968352602083015260408201520152565b34610295575f366003190112610295576020906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600435906001600160a01b038216820361029557565b90600182811c92168015611828575b602083101461181457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611809565b6040810190811067ffffffffffffffff82111761184e57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761184e57604052565b6080810190811067ffffffffffffffff82111761184e57604052565b90601f8019910116810190811067ffffffffffffffff82111761184e57604052565b9060405191825f8254926118cf846117fa565b808452936001811690811561193a57506001146118f6575b506118f49250038361189a565b565b90505f9291925260205f20905f915b81831061191e5750509060206118f4928201015f6118e7565b6020919350806001915483858901015201910190918492611905565b9050602092506118f494915060ff191682840152151560051b8201015f6118e7565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156102955782359167ffffffffffffffff8311610295576020838186019501011161029557565b80548210156119c3575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b5f5b8281106119e557505050565b5f828201556001016119d9565b81810292918115918404141715610e9857565b91908203918211610e9857565b91908201809211610e9857565b67ffffffffffffffff811161184e5760051b60200190565b906001600160801b03809116911603906001600160801b038211610e9857565b80518210156119c35760209160051b010190565b94939280604093608093885260606020890152816060890152838801375f828288010152601f8019910116850101930152565b9390809392611aad8482611a12565b93811594851594859182611c81575b80611be4575b5082611b9d575b50611b55575b505050611b1d575b611b1757600754604051916001600160a01b0360208401941684526040830152436060830152608082015260808152611b1160a08261189a565b51902090565b50505f90565b6001600160a01b0383165f52600460205260405f20825f52602052611b506001600160801b0360405f20541683856121a8565b611ad7565b60405191825260208201524260408201527fe4c76dcad70ec0bf6b921afbe6bb7b4950aedf705245ec68942ea9ecf00f8a0c60606001600160a01b03881692a3825f80611acf565b846001600160a01b036040519285845216917ffd8455407fc2a5f2a6f1ea576385d9201fe1b9bd1b3ecb8bdab57d320cfbb47560206001600160a01b038d1692a45f611ac9565b8215611c4457611c177f000000000000000000000000000000000000000000000000000000000000000091308484612248565b8380611c27575b50505b5f611ac2565b611c3d916001600160a01b03600254169061205c565b5f83611c1e565b50611c7c836001600160a01b0360025416837f0000000000000000000000000000000000000000000000000000000000000000612248565b611c21565b915093506001600160a01b038816805f52600460205260405f20885f526020526001600160801b0360405f205416611f51576001600160801b038411611f42576001600160801b038311611f4257611cdb84600754611a12565b6a115eec47f6cf7e35000000811161136657600755805f52600360205260405f20611d07858254611a12565b9055805f526003602052600260405f20015415611f2c575b60405190611d2c82611862565b6001600160801b038516825288600360208401936001600160801b03871685526040810165ffffffffffff42168152606082019084825260209660405195611d74898861189a565b5f808852608086810198895289825260048b526040808320938352928b5291902094519151901b6fffffffffffffffffffffffffffffffff19166001600160801b03919091161783555160018301805465ffffffffffff191665ffffffffffff9290921691909117905551600282015591518051919092019167ffffffffffffffff821161184e57611e0683546117fa565b601f8111611eeb575b508490601f8311600114611e8457600595949392915f9183611e79575b50508160011b915f199060031b1c19161790555b5f525260405f20938454916801000000000000000083101561184e5788611e72610e7285839960018c980181556119ae565b9055611abc565b015190505f80611e2c565b90601f19831691845f52865f20925f5b818110611ed457509160019391856005999897969410611ebc575b505050811b019055611e40565b01515f1960f88460031b161c191690555f8080611eaf565b929388600181928786015181550195019301611e94565b82811115611e0f57611f1e90845f52865f2090601f850160051c90888610611f24575b601f82910160051c0391016119d7565b5f611e0f565b5f9150611f0e565b805f52600360205242600260405f200155611d1f565b6354ada05560e01b5f5260045ffd5b631c9493ab60e31b5f5260045ffd5b6001600160a01b03600154163303611f7457565b63118cdaa760e01b5f523360045260245ffd5b60025f5414611f965760025f55565b633ee5aeb560e01b5f5260045ffd5b80548015611fcc575f190190611fbb82826119ae565b8154905f199060031b1b1916905555565b634e487b7160e01b5f52603160045260245ffd5b6001600160a01b03165f52600560205260405f20905f5b825480821015612056578261200c83866119ae565b90549060031b1c146120215750600101611ff7565b5f1981019392508311610e985761204f610e726120416118f495856119ae565b90549060031b1c92846119ae565b9055611fa5565b50505050565b6118f4926001600160a01b036040519363a9059cbb60e01b602086015216602484015260448301526044825261209360648361189a565b612289565b3d156120d2573d9067ffffffffffffffff821161184e57604051916120c7601f8201601f19166020018461189a565b82523d5f602084013e565b606090565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169182156121a357823b15610295576001600160a01b0360405192637d960e3760e01b845216600483015260248201525f60448201525f8160648183865af19081612193575b50612190577fb095d4d7990b498e886fe544495d08fafb40e2675fd41d78e8abf3778ebcada461218b612177612098565b60405191829160208352602083019061195c565b0390a2565b50565b5f61219d9161189a565b5f612146565b505050565b90916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692831561205657833b15610295576001600160a01b0360405193637d960e3760e01b8552166004840152602483015260448201525f8160648183865af190816121935750612190577fb095d4d7990b498e886fe544495d08fafb40e2675fd41d78e8abf3778ebcada461218b612177612098565b9091926001600160a01b036118f49481604051956323b872dd60e01b602088015216602486015216604484015260648301526064825261209360848361189a565b5f806001600160a01b036122b293169360208151910182865af16122ab612098565b90836122fe565b80519081151591826122da575b50506122c85750565b635274afe760e01b5f5260045260245ffd5b81925090602091810103126102955760200151801590811503610295575f806122bf565b90612322575080511561231357805190602001fd5b630a12f52160e11b5f5260045ffd5b8151158061234f575b612333575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b1561232b56fea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/HEADER_PAYMENT_REQUIRED.md b/api/@aastar/sdk/variables/HEADER_PAYMENT_REQUIRED.md new file mode 100644 index 000000000..83e503328 --- /dev/null +++ b/api/@aastar/sdk/variables/HEADER_PAYMENT_REQUIRED.md @@ -0,0 +1,5 @@ +> `const` **HEADER\_PAYMENT\_REQUIRED**: `"PAYMENT-REQUIRED"` = `'PAYMENT-REQUIRED'` + +Defined in: [packages/x402/src/payment-header.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L9) + +v2 header names (standard) diff --git a/api/@aastar/sdk/variables/HEADER_PAYMENT_RESPONSE.md b/api/@aastar/sdk/variables/HEADER_PAYMENT_RESPONSE.md new file mode 100644 index 000000000..96d82db91 --- /dev/null +++ b/api/@aastar/sdk/variables/HEADER_PAYMENT_RESPONSE.md @@ -0,0 +1,3 @@ +> `const` **HEADER\_PAYMENT\_RESPONSE**: `"PAYMENT-RESPONSE"` = `'PAYMENT-RESPONSE'` + +Defined in: [packages/x402/src/payment-header.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L11) diff --git a/api/@aastar/sdk/variables/HEADER_PAYMENT_SIGNATURE.md b/api/@aastar/sdk/variables/HEADER_PAYMENT_SIGNATURE.md new file mode 100644 index 000000000..46e077725 --- /dev/null +++ b/api/@aastar/sdk/variables/HEADER_PAYMENT_SIGNATURE.md @@ -0,0 +1,3 @@ +> `const` **HEADER\_PAYMENT\_SIGNATURE**: `"PAYMENT-SIGNATURE"` = `'PAYMENT-SIGNATURE'` + +Defined in: [packages/x402/src/payment-header.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L10) diff --git a/api/@aastar/sdk/variables/HEADER_V1_PAYMENT.md b/api/@aastar/sdk/variables/HEADER_V1_PAYMENT.md new file mode 100644 index 000000000..7f89cb3d3 --- /dev/null +++ b/api/@aastar/sdk/variables/HEADER_V1_PAYMENT.md @@ -0,0 +1,5 @@ +> `const` **HEADER\_V1\_PAYMENT**: `"X-PAYMENT"` = `'X-PAYMENT'` + +Defined in: [packages/x402/src/payment-header.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L14) + +v1 header names (backward compat) diff --git a/api/@aastar/sdk/variables/HEADER_V1_PAYMENT_RESPONSE.md b/api/@aastar/sdk/variables/HEADER_V1_PAYMENT_RESPONSE.md new file mode 100644 index 000000000..38f9f6ee5 --- /dev/null +++ b/api/@aastar/sdk/variables/HEADER_V1_PAYMENT_RESPONSE.md @@ -0,0 +1,3 @@ +> `const` **HEADER\_V1\_PAYMENT\_RESPONSE**: `"X-PAYMENT-RESPONSE"` = `'X-PAYMENT-RESPONSE'` + +Defined in: [packages/x402/src/payment-header.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L15) diff --git a/api/@aastar/sdk/variables/INITIAL_ROLE_STAKES.md b/api/@aastar/sdk/variables/INITIAL_ROLE_STAKES.md new file mode 100644 index 000000000..62726a043 --- /dev/null +++ b/api/@aastar/sdk/variables/INITIAL_ROLE_STAKES.md @@ -0,0 +1,13 @@ +> `const` **INITIAL\_ROLE\_STAKES**: `object` + +Defined in: [packages/core/src/roles.ts:172](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L172) + +Exact stake requirements from Registry.sol constructor (lines 92-100) + +## Index Signature + +\[`key`: `string`\]: \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `92`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; `ticketPrice`: `"3 GT"`; \} \| \{ `additionalRequirement`: `"aPNTs collateral in SuperPaymaster"`; `exitFeePercent`: `"10%"`; `line`: `93`; `lockDuration`: `"30 days"`; `minExitFee`: `"2 GT"`; `minStake`: `"50 GT"`; `ticketPrice`: `"5 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `94`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; `ticketPrice`: `"3 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `95`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"20 GT"`; `ticketPrice`: `"2 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"10%"`; `line`: `98`; `lockDuration`: `"30 days"`; `minExitFee`: `"5 GT"`; `minStake`: `"100 GT"`; `ticketPrice`: `"10 GT"`; \} \| \{ `additionalRequirement?`: `undefined`; `exitFeePercent`: `"5%"`; `line`: `99`; `lockDuration`: `"30 days"`; `minExitFee`: `"1 GT"`; `minStake`: `"30 GT"`; `ticketPrice`: `"3 GT"`; \} \| \{ `additionalRequirement`: `"Must hold MySBT from community"`; `exitFeePercent`: `"10%"`; `line`: `100`; `lockDuration`: `"7 days"`; `minExitFee`: `"0.05 GT"`; `minStake`: `"0.3 GT"`; `ticketPrice`: `"0.05 GT"`; \} + +## Warning + +These are initial values, always query contract for current configuration diff --git a/api/@aastar/sdk/variables/LINKS.md b/api/@aastar/sdk/variables/LINKS.md new file mode 100644 index 000000000..39674226f --- /dev/null +++ b/api/@aastar/sdk/variables/LINKS.md @@ -0,0 +1,33 @@ +> `const` **LINKS**: `object` + +Defined in: [packages/core/src/branding.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/branding.ts#L24) + +## Type Declaration + +### airAccount + +> `readonly` **airAccount**: `"https://airAccount.aastar.io"` = `"https://airAccount.aastar.io"` + +### demo + +> `readonly` **demo**: `"https://aastar.io/demo"` = `"https://aastar.io/demo"` + +### discord + +> `readonly` **discord**: `"https://discord.gg/aastar"` = `"https://discord.gg/aastar"` + +### github + +> `readonly` **github**: `"https://github.com/AAStarCommunity"` = `"https://github.com/AAStarCommunity"` + +### main + +> `readonly` **main**: `"https://aastar.io"` = `"https://aastar.io"` + +### superPaymaster + +> `readonly` **superPaymaster**: `"https://superpaymaster.aastar.io"` = `"https://superpaymaster.aastar.io"` + +### twitter + +> `readonly` **twitter**: `"https://twitter.com/AAStarCommunity"` = `"https://twitter.com/AAStarCommunity"` diff --git a/api/@aastar/sdk/variables/MAX_SERVICE_FEE.md b/api/@aastar/sdk/variables/MAX_SERVICE_FEE.md new file mode 100644 index 000000000..eb2a8308c --- /dev/null +++ b/api/@aastar/sdk/variables/MAX_SERVICE_FEE.md @@ -0,0 +1,3 @@ +> `const` **MAX\_SERVICE\_FEE**: `1000` = `1000` + +Defined in: [packages/core/src/constants.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L87) diff --git a/api/@aastar/sdk/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md b/api/@aastar/sdk/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md new file mode 100644 index 000000000..1524754bc --- /dev/null +++ b/api/@aastar/sdk/variables/MICRO_PAYMENT_CHANNEL_ADDRESS.md @@ -0,0 +1,3 @@ +> **MICRO\_PAYMENT\_CHANNEL\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L44) diff --git a/api/@aastar/sdk/variables/MONITORING_ADDRESSES.md b/api/@aastar/sdk/variables/MONITORING_ADDRESSES.md new file mode 100644 index 000000000..c30c1f8be --- /dev/null +++ b/api/@aastar/sdk/variables/MONITORING_ADDRESSES.md @@ -0,0 +1,15 @@ +> `const` **MONITORING\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L84) + +Monitoring System Addresses + +## Type Declaration + +### blsAggregator + +> `readonly` **blsAggregator**: `` `0x${string}` `` = `BLS_AGGREGATOR_ADDRESS` + +### dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` diff --git a/api/@aastar/sdk/variables/MicroPaymentChannelABI.md b/api/@aastar/sdk/variables/MicroPaymentChannelABI.md new file mode 100644 index 000000000..eabe62132 --- /dev/null +++ b/api/@aastar/sdk/variables/MicroPaymentChannelABI.md @@ -0,0 +1,3 @@ +> `const` **MicroPaymentChannelABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:111](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L111) diff --git a/api/@aastar/sdk/variables/MicroPaymentChannelArtifact.md b/api/@aastar/sdk/variables/MicroPaymentChannelArtifact.md new file mode 100644 index 000000000..42a0088bd --- /dev/null +++ b/api/@aastar/sdk/variables/MicroPaymentChannelArtifact.md @@ -0,0 +1,13 @@ +> `const` **MicroPaymentChannelArtifact**: `object` = `MicroPaymentChannelABIData` + +Defined in: [packages/core/src/abis/index.ts:112](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L112) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x61012060405234610190576117ab6020813803918261001d81610194565b93849283398101031261019057516001600160a01b0381169081900361019057306080524660a05260a06100516040610194565b6013815260208101907f4d6963726f5061796d656e744368616e6e656c0000000000000000000000000082526100876040610194565b91600583526020830191640312e302e360dc1b8352519020915190208160c0528060e052604051917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260208301526040820152466060820152306080820152206101005260015f55801561017d5760015460405191806001600160a01b0383167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160e01b03199091161760e160a21b176001556115dd90816101ce8239608051816111f8015260a0518161121b015260c051816112fc015260e05181611322015261010051816111d70152f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f3560e01c80630771c1d114610dff5780633545a60814610de35780633ab95af914610cb357806343d41c9e14610a7357806354fd4d5014610a105780636221a1f514610902578063715018a6146108b0578063783c29bb14610893578063831c2b821461076957806384b0196e1461068157806389ff9d781461062c5780638da5cb5b146106065780638ef66e271461036357806394739e8714610329578063dd573587146101ba578063e7084b7e14610190578063e8a5a066146101615763f2fde38b146100df575f80fd5b3461015d57602036600319011261015d576001600160a01b0361010061101c565b610108611358565b16801561014a576001600160a01b03600154828219821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b3461015d57602036600319011261015d576004355f526003602052602060ff60405f2054166040519015158152f35b3461015d575f36600319011261015d57602067ffffffffffffffff60015460a01c16604051908152f35b3461015d57604036600319011261015d576004356024356001600160801b0381169081810361015d576101eb611125565b825f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57825f52600260205260405f206001600160a01b0381541633036102fc5782156102ed5760048101836001600160801b03825416016001600160801b0381116102d9577f73f79dc74e3752c88c5b0df459fdf3239308f420f0ead3f9fddbdf296dc35f0e946001600160a01b0360026001600160801b0395866102a6951687198754161786550154163090339061137f565b5416906102d0604051928392839092916001600160801b0360209181604085019616845216910152565b0390a260015f55005b634e487b7160e01b5f52601160045260245ffd5b63162908e360e11b5f5260045ffd5b6309f9fa4f60e21b5f5260045ffd5b63c9f3b55960e01b5f5260045ffd5b630781f76560e21b5f5260045ffd5b3461015d575f36600319011261015d5760206040517fe97c93f01d3ef8eaba1586553df13308f236815bf4ea49c7b696895d8f5ea68a8152f35b3461015d5760a036600319011261015d5761037c61101c565b6024356001600160a01b03811680910361015d57604435906001600160801b03821680920361015d57608435926001600160a01b03841680940361015d576103c2611125565b82156102ed576001600160a01b03169182156102ed5781156102ed573383146105f757604051602081019033825284604082015283606082015260643560808201528560a08201523060c08201524660e082015260e0815261042661010082611083565b51902093845f5260026020526001600160a01b0360405f2054166105e857845f52600360205260ff60405f2054166105d95760405161046481611052565b338152602080820186815260408084018781526060850195865260808086018881525f60a0880181815260c0890182815260e08a018381528f84526002998a9052969092209851895473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03928316178b55975160018b0180548a1691831691909117905594519789018054881698861698909817909755975160038801805490961693169290921790935551925190911b6fffffffffffffffffffffffffffffffff19166001600160801b0390921691909117600483015590600501915167ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1983541617825551151581549060401b68ff0000000000000000169068ff0000000000000000191617905530813391610597928561137f565b604051918252602082015282339160407f63c68527db63abeeb27e8ea4a2417a032ac5cd83b3ffaf2700c15ba4f6c15cf091a460015f55604051908152602090f35b6323b87dad60e01b5f5260045ffd5b630ec0f14960e01b5f5260045ffd5b6376f5af9f60e11b5f5260045ffd5b3461015d575f36600319011261015d5760206001600160a01b0360015416604051908152f35b3461015d57602036600319011261015d57600435610648611125565b805f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b5761067b906110a5565b60015f55005b3461015d575f36600319011261015d5761070b60406107188151916106a68184611083565b601383527f4d6963726f5061796d656e744368616e6e656c00000000000000000000000000602084015280516106dc8282611083565b60058152640312e302e360dc1b60208201528151948594600f60f81b865260e0602087015260e0860190610ff8565b9184830390850152610ff8565b4660608301523060808301525f60a083015281810360c083015260206060519182815201906080905f5b818110610750575050500390f35b8251845285945060209384019390920191600101610742565b3461015d57602036600319011261015d575f60e060405161078981611052565b8281528260208201528260408201528260608201528260808201528260a08201528260c082015201526004355f52600260205261010060405f206040516107cf81611052565b67ffffffffffffffff806001600160801b0360a081856001600160a01b0380895416988983528180600183015416602085019081528180600285015416916040870192835260ff60e06005846003890154169760608b0198895260048101549c8b8d8f9d6080019d168d52019c60801c8d5201549e8f60c082019e8f91169052019d60401c1615158d526040519d8e52511660208d0152511660408b01525116606089015251166080870152511660a0850152511660c083015251151560e0820152f35b3461015d575f36600319011261015d576020604051620151808152f35b3461015d575f36600319011261015d576108c8611358565b5f6001600160a01b0360015481198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461015d57602036600319011261015d5760043567ffffffffffffffff81169081810361015d57610931611358565b61012c82108015610a04575b6109be577fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff907fca899dbf080b3238e556d3924f56a15f7af0a4de975d19ae28431de5754f754260406001549481519067ffffffffffffffff8760a01c1682526020820152a1911660a09190911b67ffffffffffffffff60a01b1617600155005b6040516305519d6f60e51b815260206004820152601960248201527f636c6f736554696d656f7574206f7574206f662072616e6765000000000000006044820152606490fd5b5062015180821161093d565b3461015d575f36600319011261015d57610a6f604051610a31604082611083565b601981527f4d6963726f5061796d656e744368616e6e656c2d312e322e30000000000000006020820152604051918291602083526020830190610ff8565b0390f35b3461015d57610a8136610f8f565b90610a8a611125565b835f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57835f52600260205260405f2090600182016001600160a01b038154163303610ca45760048301918254958660801c956001600160801b03821697878910610c95576001600160801b03168811610c8657610b47876001600160801b0394610b73937f3900aaf06a211844dfd71554da2fb6d449fb270e7b4b3a3c624d02329e5703259a8d9c11610c73575b505083611032565b85546001600160801b031660809390931b6fffffffffffffffffffffffffffffffff1916929092178555565b60058501805468ff00000000000000001916680100000000000000001790551680610c50575b5050610bb381546001600160801b038160801c9116611032565b916001600160801b03831680610c2d575b5050546040805160809290921c82526001600160801b03929092166020820152a2805f52600360205260405f20600160ff198254161790555f52600260205261067b60405f2060055f918281558260018201558260028201558260038201558260048201550155565b816001600160a01b03806002610c499501541691541690611143565b8580610bc4565b610c6c916001600160a01b038060028701541691541690611143565b8580610b99565b610c7f91868d8c611181565b8b80610b3f565b63770d1ccb60e01b5f5260045ffd5b6340e63d1160e11b5f5260045ffd5b630f9f8bb160e21b5f5260045ffd5b3461015d57610cc136610f8f565b91610cca611125565b835f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57835f52600260205260405f20600181016001600160a01b038154163303610ca45760048201938454908160801c916001600160801b0386169083821115610c95576001600160801b031610610c8657600284610daa87610d8f6001600160a01b0396610d897fca804f3663aaa109bfb233841bc2956ef23bf9a64db0183b7387e04c48d322b19d8f98858b9a610dc09e611181565b82611032565b99906001600160801b0382549181199060801b169116179055565b0154169154166001600160801b03851691611143565b604080516001600160801b039283168152929091166020830152819081016102d0565b3461015d575f36600319011261015d57602060405161012c8152f35b3461015d57602036600319011261015d57600435610e1b611125565b805f52600260205260405f206001600160a01b038154161561031a576005015460401c60ff1661030b57805f52600260205260405f206001600160a01b038154168033036102fc57600582019081549067ffffffffffffffff82168015610f805767ffffffffffffffff60015460a01c1681018091116102d957421115610f715784937ffca9fa5eb605eef37bc81f65aa2978fdab527c2da02ea18e1b9847445f6eca0f936801000000000000000060209468ff000000000000000019161790556001600160801b03610ef86004830154828160801c9116611032565b16809281610f53575b505050604051908152a2805f52600360205260405f20600160ff198254161790555f52600260205261067b60405f2060055f918281558260018201558260028201558260038201558260048201550155565b6001600160a01b036002610f6994015416611143565b858181610f01565b631568cfcb60e21b5f5260045ffd5b63f15dbef360e01b5f5260045ffd5b90606060031983011261015d57600435916024356001600160801b038116810361015d579160443567ffffffffffffffff811161015d578260238201121561015d5780600401359267ffffffffffffffff841161015d576024848301011161015d576024019190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361015d57565b906001600160801b03809116911603906001600160801b0382116102d957565b610100810190811067ffffffffffffffff82111761106f57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff82111761106f57604052565b805f52600260205260405f206001600160a01b0381541633036102fc5760050167ffffffffffffffff81541661112157805467ffffffffffffffff19164267ffffffffffffffff169081179091556040519081527f9fd5c1db29e4aeb4f968f62fc18602aad1cca0f99be64b456a6c4f4052d63b1490602090a2565b5050565b60025f54146111345760025f55565b633ee5aeb560e01b5f5260045ffd5b61117f926001600160a01b036040519363a9059cbb60e01b602086015216602484015260448301526044825261117a606483611083565b6113c0565b565b9392916001600160801b036040519160208301937fe97c93f01d3ef8eaba1586553df13308f236815bf4ea49c7b696895d8f5ea68a85526040840152166060820152606081526111d2608082611083565b5190207f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000030147f0000000000000000000000000000000000000000000000000000000000000000461416156112d1575b6719010000000000005f52601a52603a5260426018205f603a526112738383836001600160a01b03885416611472565b938415806112bb575b61129b575b505050501561128c57565b638baa579f60e01b5f5260045ffd5b600301546112b294506001600160a01b0316611472565b5f808080611281565b506001600160a01b03600382015416151561127c565b5060a06040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f000000000000000000000000000000000000000000000000000000000000000060208201527f0000000000000000000000000000000000000000000000000000000000000000604082015246606082015230608082015220611243565b6001600160a01b0360015416330361136c57565b63118cdaa760e01b5f523360045260245ffd5b9091926001600160a01b0361117f9481604051956323b872dd60e01b602088015216602486015216604484015260648301526064825261117a608483611083565b5f6001600160a01b038192169260208151910182855af13d15611466573d67ffffffffffffffff811161106f5760405161141a92909161140a601f8201601f191660200184611083565b82523d5f602084013e5b83611576565b8051908115159182611442575b50506114305750565b635274afe760e01b5f5260045260245ffd5b819250906020918101031261015d576020015180159081150361015d575f80611427565b61141a90606090611414565b90919392935f906001600160a01b0383161561156d576040519160048301602484019560448501916064860193873b156114dc5750936064938a80948a9b9c9460209b9a9998630b135d3f60e11b8a525260408a52523701915afa9051630b135d3f60e11b141690565b999350509395505080604014611529576041146114f95750505050565b60408092939496508101355f1a60205281375b5f526020600160805f825afa511860601b3d11915f606052604052565b507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9192939550602081013590601b8260ff1c01602052356040521660605261150c565b505f9450505050565b9061159a575080511561158b57805190602001fd5b630a12f52160e11b5f5260045ffd5b815115806115c7575b6115ab575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156115a356fea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/MySBTABI.md b/api/@aastar/sdk/variables/MySBTABI.md new file mode 100644 index 000000000..c513ec7d7 --- /dev/null +++ b/api/@aastar/sdk/variables/MySBTABI.md @@ -0,0 +1,3 @@ +> `const` **MySBTABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L107) diff --git a/api/@aastar/sdk/variables/MySBTArtifact.md b/api/@aastar/sdk/variables/MySBTArtifact.md new file mode 100644 index 000000000..d282e3df7 --- /dev/null +++ b/api/@aastar/sdk/variables/MySBTArtifact.md @@ -0,0 +1,13 @@ +> `const` **MySBTArtifact**: `object` = `MySBTABIData` + +Defined in: [packages/core/src/abis/index.ts:108](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L108) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60e060405234610487576134146080813803918261001c8161048b565b93849283398101031261048757610032816104b0565b9061003f602082016104b0565b6100576060610050604085016104b0565b93016104b0565b92610062604061048b565b601981527f4d7963656c69756d20536f756c20426f756e6420546f6b656e000000000000006020820152610096604061048b565b6005815264135e54d09560da1b6020820152815190916001600160401b038211610386575f5490600182811c9216801561047d575b60208310146103685781601f849311610408575b50602090601f83116001146103a5575f9261039a575b50508160011b915f199060031b1c1916175f555b8051906001600160401b0382116103865760015490600182811c9216801561037c575b60208310146103685781601f8493116102f2575b50602090601f831160011461028c575f92610281575b50508160011b915f199060031b1c1916176001555b600160068190556007805460ff19169055601055670429d069189e000060115567016345785d8a00006012556001600160a01b038116158015610270575b801561025f575b801561024e575b61023f5760805260a05260c052600d80546001600160a01b0319166001600160a01b0392909216919091179055604051612f4f90816104c5823960805181610d88015260a05181610d0d015260c05181818161033a0152818161069c01528181610ffc015281816114e5015281816115470152818161187701528181611cc20152612c240152f35b63e6c4247b60e01b5f5260045ffd5b506001600160a01b038416156101b7565b506001600160a01b038316156101b0565b506001600160a01b038216156101a9565b015190505f80610156565b60015f9081528281209350601f198516905b8181106102da57509084600195949392106102c2575b505050811b0160015561016b565b01515f1960f88460031b161c191690555f80806102b4565b9293602060018192878601518155019501930161029e565b828111156101405760015f52909150601f830160051c7fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660208510610360575b849392601f0160051c82900391015f5b828110610350575050610140565b5f81830155859450600101610342565b5f9150610332565b634e487b7160e01b5f52602260045260245ffd5b91607f169161012c565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100f5565b5f8080528281209350601f198516905b8181106103f057509084600195949392106103d8575b505050811b015f55610109565b01515f1960f88460031b161c191690555f80806103cb565b929360206001819287860151815501950193016103b5565b828111156100df575f8052909150601f830160051c7f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56360208510610475575b849392601f0160051c82900391015f5b8281106104655750506100df565b5f81830155859450600101610457565b5f9150610447565b91607f16916100cb565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761038657604052565b51906001600160a01b03821682036104875756fe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714611ce65750806306433b1b14611ca357806306fdde0314611c01578063081812fc14611bc45780630880427514611ba7578063095ea7b314611abb5780630f68ae4014611a3457806313966db514611a1757806323b872dd14611a005780632d5a7f4f14610d315780632f7c88f514611785578063374e7fa3146115145780633e3e6842146114bb5780633f4ba83a1461141f57806342842e0e146113f65780634f8cc0651461136c57806354fd4d501461131f578063556697da1461124957806355f804b31461102b5780635afc4b5c14610fd95780635bb5bf0c14610fa35780635c975abb14610f815780636352211e14610f5257806370a0823114610f0157806371eb90a114610e2757806375794a3c14610e0a578063776fafac14610dac5780637f6b337b14610d6957806380f4b8c814610d31578063826600ce14610cee5780638456cb5914610c5f5780638ceebd8f14610ad9578063908c101814610a9457806395d89b41146109ca578063a1141b0714610985578063a22cb465146108e1578063a610965014610861578063a9eb37ba14610846578063b88d4fde146107e6578063bead0513146107ad578063bf1fb0f214610708578063c0d0aa69146106e2578063c580163e14610672578063c87b56dd146103a0578063ccbc10d01461037a578063d977b66b1461030f578063e985e9c5146102b65763eddd0d9c1461022c575f80fd5b346102b25760203660031901126102b2576004356001600160a01b03600d541633036102a3577fd3950a5507479ea19c5c7766f5191546ace60f0a00dc360d52ce083b58f2233190601254908060125561029e6040519283924291846040919493926060820195825260208201520152565b0390a1005b630999802f60e41b5f5260045ffd5b5f80fd5b346102b25760403660031901126102b2576102cf611d75565b6001600160a01b036102df611d8b565b91165f5260056020526001600160a01b0360405f2091165f52602052602060ff60405f2054166040519015158152f35b346102b25760403660031901126102b257610328611d75565b610330611d8b565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b5761036991612e6f565b005b6310f5403960e31b5f5260045ffd5b346102b2575f3660031901126102b25760206001600160a01b03600e5416604051908152f35b346102b25760203660031901126102b2576004356103bd81612bcc565b50604051600f5490915f836103d184611f33565b9182825260208201946001811690815f1461065657506001146105f7575b6103fb92500384611ebf565b8251156105db578092815f927a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008110156105b0575b50806d04ee2d6d415b85acef8100000000600a921015610595575b662386f26fc10000811015610581575b6305f5e100811015610570575b612710811015610561575b6064811015610553575b1015610549575b6001820193600a60216104aa61049488611ee1565b976104a2604051998a611ebf565b808952611ee1565b602088019590601f19013687378701015b5f1901917f30313233343536373839616263646566000000000000000000000000000000008282061a8353049081156104f657600a906104bb565b5050602061053192610545956040519586945180918587015e840190838201905f8252519283915e01015f815203601f198101835282611ebf565b604051918291602083526020830190611d51565b0390f35b906001019061047f565b606460029104930192610478565b6127106004910493019261046e565b6305f5e10060089104930192610463565b662386f26fc1000060109104930192610456565b6d04ee2d6d415b85acef810000000060209104930192610446565b604093507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000090049050600a61042b565b5050506105456040516105ef602082611ebf565b5f8152610531565b50600f5f90815290917f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8025b81831061063a5750509060206103fb928201016103ef565b6020919350806001915483858a01015201910190918592610622565b60ff19168652506103fb92151560051b820160200190506103ef565b346102b25761068036611e1d565b915061068a612bff565b610692612ccb565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576106cb92612a2b565b600160065560408051928352901515602083015290f35b346102b2575f3660031901126102b25760206001600160a01b03600d5416604051908152f35b346102b25760203660031901126102b2575f606060405161072881611ea3565b82815282602082015282604082015201526004355f526009602052608060405f2060405161075581611ea3565b6001600160a01b03825416918282526001600160a01b03806001830154166020840190815260606003600285015494604087019586520154940193845260405194855251166020840152516040830152516060820152f35b346102b25760203660031901126102b2576107df6107c9611d75565b6107d1612bff565b6107d9612ccb565b33612e6f565b6001600655005b346102b25760803660031901126102b2576107ff611d75565b610807611d8b565b6064359167ffffffffffffffff83116102b257366023840112156102b25761083c610369933690602481600401359101611efd565b91604435916128f1565b346102b2575f3660031901126102b257602060405160328152f35b346102b25760203660031901126102b25761087a611d75565b6001600160a01b03600d541633036102a3576001600160a01b03600e54911690816001600160a01b0319821617600e557fb71a92720c720f655d24a8ebbeeb4c9875d85189ca58d32cb0e6997aa5e6c29160206001600160a01b03604051934285521692a3005b346102b25760403660031901126102b2576108fa611d75565b60243590811515908183036102b2576001600160a01b03169182156109725761094490335f52600560205260405f20845f5260205260405f209060ff801983541691151516179055565b6040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b82630b61174360e31b5f5260045260245ffd5b346102b25760403660031901126102b25761099e611d8b565b6004355f52600b6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102b2575f3660031901126102b2576040515f6001546109ea81611f33565b8084529060018116908115610a705750600114610a12575b6105458361053181850382611ebf565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b808210610a5657509091508101602001610531610a02565b919260018160209254838588010152019101909291610a3e565b60ff191660208086019190915291151560051b840190910191506105319050610a02565b346102b25760403660031901126102b257610aad611d8b565b6004355f52600c6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102b25760203660031901126102b2576004355f52600a60205260405f208054610b0381612693565b91610b116040519384611ebf565b81835260208301905f5260205f205f915b838310610c41575f85815b8151811015610b66576040610b4282846128dd565b510151610b52575b600101610b2d565b91610b5e600191612313565b929050610b4a565b50610b89610b7383612693565b92610b816040519485611ebf565b808452612693565b602083019190601f19013683375f5f5b8251811015610bf2576040610bae82856128dd565b510151610bbe575b600101610b99565b90610bea6001916001600160a01b03610bd785876128dd565b515116610be482896128dd565b52612313565b919050610bb6565b50505090604051918291602083019060208452518091526040830191905f5b818110610c1f575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610c11565b60046020600192610c51856126ab565b815201920192019190610b22565b346102b2575f3660031901126102b2576001600160a01b03600d541633036102a357610c89612bff565b600160ff1960075416176007557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a16040514281527f80170b5fcdd2bf1e0660ef4b8851f86685f64d41b1a19de1471947ece8725aac60203392a2005b346102b2575f3660031901126102b25760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b25760203660031901126102b2576001600160a01b03610d52611d75565b165f526008602052602060405f2054604051908152f35b346102b2575f3660031901126102b25760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b25760203660031901126102b2576004355f526009602052608060405f206001600160a01b03815416906001600160a01b03600182015416906003600282015491015491604051938452602084015260408301526060820152f35b346102b2575f3660031901126102b2576020601054604051908152f35b346102b25760403660031901126102b257600435610e43611d8b565b90606080604051610e5381611ea3565b5f81525f60208201525f60408201520152805f52600b60205260405f206001600160a01b0383165f5260205260405f205490805f52600a60205260405f2054821015610ef257610eb791610eb1915f52600a60205260405f20612130565b506126ab565b906001600160a01b0380835116911603610ee35761054590604051918291602083526020830190611e64565b637554bad360e01b5f5260045ffd5b6363df817160e01b5f5260045ffd5b346102b25760203660031901126102b2576001600160a01b03610f22611d75565b168015610f3f575f526003602052602060405f2054604051908152f35b6322718ad960e21b5f525f60045260245ffd5b346102b25760203660031901126102b2576020610f70600435612bcc565b6001600160a01b0360405191168152f35b346102b2575f3660031901126102b257602060ff600754166040519015158152f35b346102b25760403660031901126102b2576020610fcf610fc1611d75565b610fc9611d8b565b90612843565b6040519015158152f35b346102b25760203660031901126102b257610ff2611d75565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576103699061278a565b346102b25760203660031901126102b25760043567ffffffffffffffff81116102b25761105c903690600401611def565b6001600160a01b03600d541633036102a35767ffffffffffffffff811161123557611088600f54611f33565b601f81116111c7575b505f91601f8211600114611123576060906110e383807fce8257866c47f4cae1c27b1b0190cb5d26540e5a908cbf35974d6f300c63e11c965f91611118575b508160011b915f199060031b1c19161790565b600f555b8260405193849260408452816040850152848401375f828201840152426020830152601f01601f19168101030190a1005b9050830135876110d0565b601f198216600f5f527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802905f5b8181106111af5750907fce8257866c47f4cae1c27b1b0190cb5d26540e5a908cbf35974d6f300c63e11c94846060949310611196575b5050600183811b01600f556110e7565b8201355f19600386901b60f8161c191690558480611186565b83860135835560209586019560019093019201611150565b8181111561109157600f5f52601f820160051c7f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8026020841061122d575b81601f9101920160051c03905f5b828110611220575050611091565b5f82820155600101611212565b5f9150611204565b634e487b7160e01b5f52604160045260245ffd5b346102b25760203660031901126102b2576004355f52600a60205260405f2080549061127482612693565b916112826040519384611ebf565b8083526020830180925f5260205f205f915b83831061130157848660405191829160208301906020845251809152604083019060408160051b85010192915f905b8282106112d257505050500390f35b919360019193955060206112f18192603f198a82030186528851611e64565b96019201920185949391926112c3565b60046020600192611311856126ab565b815201920192019190611294565b346102b2575f3660031901126102b257610545604051611340604082611ebf565b600b81526a04d795342542d332e322e360ac1b6020820152604051918291602083526020830190611d51565b346102b25760203660031901126102b257611385611d75565b600d54906001600160a01b038216908133036102a3576001600160a01b03169182156113e75782906001600160a01b03191617600d557f90de8705b1aaf3966be0e8ec8acf9aed10a6d3d0d572ec8f96112409e2820c616020604051428152a3005b63e6c4247b60e01b5f5260045ffd5b346102b25761036961140736611db5565b9060405192611417602085611ebf565b5f84526128f1565b346102b2575f3660031901126102b2576001600160a01b03600d541633036102a35760075460ff8116156114ac5760ff19166007557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a16040514281527f107553d8191d85b405879cf752997865edd48d94e20bda4dd27223c94b31a7cc60203392a2005b638dfc202b60e01b5f5260045ffd5b346102b2576114c936611e1d565b91506114d3612bff565b6114db612ccb565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576106cb9261233d565b346102b25760203660031901126102b25761152d611d75565b611535612bff565b61153d612ccb565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361036b576001600160a01b0316805f52600860205260405f2054908115801561176a575b61175b57815f52600a60205260405f205f5b8154811015611623578060ff60026115b960019486612130565b500154166115c8575b0161159f565b60026115d48285612130565b5001805460ff191690556001600160a01b036115f08285612130565b505416857fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a36115c2565b5050805f5260086020525f6040812055815f5260026020526001600160a01b0360405f205416151580611754575b61174557815f5260026020526001600160a01b0360405f205416801590811561170e575b835f52600260205260405f206001600160a01b03198154169055835f827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4506116fb577f108d98610c6944880c68d31a01ab6252b635e7c7a9728687f31e68a76538c86560606011546040519081525f6020820152426040820152a36001600655005b50637e27328960e01b5f5260045260245ffd5b61172d845f52600460205260405f206001600160a01b03198154169055565b805f52600360205260405f205f198154019055611675565b639cbe235760e01b5f5260045ffd5b505f611651565b6304fc726b60e41b5f5260045ffd5b50806001600160a01b0361177d84612bcc565b16141561158d565b346102b25760203660031901126102b25761179e611d75565b6117a6612bff565b6117af33612c1a565b156119f1576001600160a01b0316805f52600860205260405f205490811561175b57815f52600b60205260405f206001600160a01b0333165f5260205260405f2054825f52600a60205260405f205481108015906119c8575b610ee357600261182560ff92855f52600a60205260405f20612130565b50015416156119b95760405190632474521560e21b82527f0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3a600483015260248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156119ae575f9161197f575b501561197057805f52600c60205260405f206001600160a01b0333165f5260205260405f20548015159081611946575b5061193857805f52600c60205260405f206001600160a01b0333165f5260205260405f204290556040519062093a80420482524260208301527f0bd2c5444bc0126737809a3970e1c3bc8cf29e5efb7d5448cbaa6a9c1af8120760403393a3005b62b161e760e41b5f5260045ffd5b905061012c810180911161195c574210826118d7565b634e487b7160e01b5f52601160045260245ffd5b6359f1a2a160e01b5f5260045ffd5b6119a1915060203d6020116119a7575b6119998183611ebf565b81019061215d565b826118a7565b503d61198f565b6040513d5f823e3d90fd5b63e44ae7c960e01b5f5260045ffd5b50825f52600a6020526119de8160405f20612130565b50546001600160a01b0316331415611808565b630f95018760e01b5f5260045ffd5b346102b257610369611a1136611db5565b91611f6b565b346102b2575f3660031901126102b2576020601254604051908152f35b346102b25760203660031901126102b2576004356001600160a01b03600d541633036102a3578015611aac577f5d1f56e31e5dc1f29354822b887b1463ececf7edfad7c39216980b7dfd7ea97d90601154908060115561029e6040519283924291846040919493926060820195825260208201520152565b63162908e360e11b5f5260045ffd5b346102b25760403660031901126102b257611ad4611d75565b602435611ae081612bcc565b33151580611b94575b80611b61575b611b4e5781906001600160a01b0380851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f5260046020526001600160a01b0360405f2091166001600160a01b03198254161790555f80f35b63a9fbf51f60e01b5f523360045260245ffd5b506001600160a01b0381165f52600560205260405f206001600160a01b0333165f5260205260ff60405f20541615611aef565b50336001600160a01b0382161415611ae9565b346102b2575f3660031901126102b2576020601154604051908152f35b346102b25760203660031901126102b257600435611be181612bcc565b505f52600460205260206001600160a01b0360405f205416604051908152f35b346102b2575f3660031901126102b2576040515f5f54611c2081611f33565b8084529060018116908115610a705750600114611c47576105458361053181850382611ebf565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210611c8957509091508101602001610531610a02565b919260018160209254838588010152019101909291611c71565b346102b2575f3660031901126102b25760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102b25760203660031901126102b2576004359063ffffffff60e01b82168092036102b2576020916380ac58cd60e01b8114908115611d40575b8115611d2f575b5015158152f35b6301ffc9a760e01b14905083611d28565b635b5e139f60e01b81149150611d21565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036102b257565b602435906001600160a01b03821682036102b257565b35906001600160a01b03821682036102b257565b60609060031901126102b2576004356001600160a01b03811681036102b257906024356001600160a01b03811681036102b2579060443590565b9181601f840112156102b25782359167ffffffffffffffff83116102b257602083818601950101116102b257565b60606003198201126102b2576004356001600160a01b03811681036102b25791602435916044359067ffffffffffffffff82116102b257611e6091600401611def565b9091565b9060806060611ea0936001600160a01b038151168452602081015160208501526040810151151560408501520151918160608201520190611d51565b90565b6080810190811067ffffffffffffffff82111761123557604052565b90601f8019910116810190811067ffffffffffffffff82111761123557604052565b67ffffffffffffffff811161123557601f01601f191660200190565b929192611f0982611ee1565b91611f176040519384611ebf565b8294818452818301116102b2578281602093845f960137010152565b90600182811c92168015611f61575b6020831014611f4d57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691611f42565b91906001600160a01b0316801561211d57815f5260026020526001600160a01b0360405f205416151580612115575b61174557815f5260026020526001600160a01b0360405f20541692823315159283612079575b6001600160a01b03935085612042575b805f52600360205260405f2060018154019055815f52600260205260405f20818519825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a41680830361202a57505050565b6364283d7b60e01b5f5260045260245260445260645ffd5b612061825f52600460205260405f206001600160a01b03198154169055565b855f52600360205260405f205f198154019055611fd0565b91929050806120be575b1561209057828291611fc0565b82846120a857637e27328960e01b5f5260045260245ffd5b63177e802f60e01b5f523360045260245260445ffd5b5033841480156120ec575b806120835750825f526004602052336001600160a01b0360405f20541614612083565b50835f52600560205260405f206001600160a01b0333165f5260205260ff60405f2054166120c9565b506001611f9a565b633250574960e11b5f525f60045260245ffd5b8054821015612149575f5260205f209060021b01905f90565b634e487b7160e01b5f52603260045260245ffd5b908160209103126102b2575180151581036102b25790565b9190918054680100000000000000008110156112355761219a91600182018155612130565b6123005760036060916001600160a01b0380865116166001600160a01b0319825416178155602085015160018201556121e860408601511515600283019060ff801983541691151516179055565b0192015191825167ffffffffffffffff8111611235576122088254611f33565b601f81116122af575b506020601f82116001146122515781906122429394955f92612246575b50508160011b915f199060031b1c19161790565b9055565b015190505f8061222e565b601f19821690835f52805f20915f5b8181106122975750958360019596971061227f575b505050811b019055565b01515f1960f88460031b161c191690555f8080612275565b9192602060018192868b015181550194019201612260565b8181111561221157825f5260205f20601f830160051c90602084106122f8575b81601f9101920160051c03905f5b8281106122eb575050612211565b5f828201556001016122dd565b5f91506122cf565b634e487b7160e01b5f525f60045260245ffd5b5f19811461195c5760010190565b929190612338602091604086526040860190611d51565b930152565b92906001600160a01b0384169283156126845761236790845f52600860205260405f205492612ceb565b9390918061248b57506010549061237d82612313565b60105561245f82809761244260019860405161239881611ea3565b86815260036001600160a01b03602083019a16998a8152604083014281528d6001600160a01b038060608701948386528b5f526009602052818060405f20995116168219895416178855511691860191166001600160a01b031982541617905551600284015551910155855f5260086020528360405f2055835f52600a60205260405f206040519161242983611ea3565b8983524260208401528b60408401526060830152612175565b815f52600b60205260405f20865f526020525f6040812055612d6f565b7ff5491bdb765a4be5a1bdc9bfd09cf61e1b89962ac33ed2e928f11a59a5e723316020604051428152a4565b9450505f92845f52600b60205260405f206001600160a01b0383165f5260205260405f2054855f52600a60205260405f2054811080612653575b6125b55750845f52600a602052603260405f205410156125a657845f52600a60205261252160405f20926001600160a01b036040519161250483611ea3565b169384825242602083015260016040830152836060830152612175565b845f52600a60205260405f2054905f19820191821161195c576125a17fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db10918793845f52600b60205260405f20865f5260205260405f2055835f526009602052600360405f20016125918154612313565b9055604051918291429083612321565b0390a3565b633467d59d60e21b5f5260045ffd5b919294935050825f52600a60205260ff60026125d48360405f20612130565b50015416156125e5575b5050905f90565b6125fc600291845f52600a60205260405f20612130565b5001600160ff19825416179055817fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db1060606001600160a01b0360405194604086525f60408701524260208701521693a35f806125de565b50855f52600a6020526001600160a01b036126718260405f20612130565b5054166001600160a01b038416146124c5565b63fd684c3b60e01b5f5260045ffd5b67ffffffffffffffff81116112355760051b60200190565b906040516126b881611ea3565b600381936001600160a01b0381541683526001810154602084015260ff60028201541615156040840152019060405180925f908054906126f782611f33565b80855291600181169081156127635750600114612724575b505060609291612720910384611ebf565b0152565b5f908152602081209092505b81831061274757505081016020018161272061270f565b6020919350806001915483858901015201910190918492612730565b60ff191660208681019190915292151560051b85019092019250839150612720905061270f565b6001600160a01b03165f52600860205260405f205490811561283f57815f52600a60205260405f20915f5b8354811015612839578060ff60026127cf60019488612130565b500154166127de575b016127b5565b60026127ea8287612130565b5001805460ff191690556001600160a01b036128068287612130565b505416837fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a36127d8565b50509050565b9050565b6001600160a01b03165f52600860205260405f205480156128d757805f52600b60205260405f206001600160a01b0383165f5260205260405f205490805f52600a60205260405f20548210156128d0576128ab91610eb1915f52600a60205260405f20612130565b906001600160a01b038083511691161490816128c5575090565b604091500151151590565b5050505f90565b50505f90565b80518210156121495760209160051b010190565b906128fd838284611f6b565b803b61290a575b50505050565b6020916129506001600160a01b03809316956040519586948594630a85bd0160e11b86523360048701521660248501526044840152608060648401526084830190611d51565b03815f865af15f91816129e6575b506129b357503d156129ac573d61297481611ee1565b906129826040519283611ebf565b81523d5f602083013e5b805190816129a75782633250574960e11b5f5260045260245ffd5b602001fd5b606061298c565b6001600160e01b03191663757a42ff60e11b016129d457505f808080612904565b633250574960e11b5f5260045260245ffd5b9091506020813d602011612a23575b81612a0260209383611ebf565b810103126102b257516001600160e01b0319811681036102b257905f61295e565b3d91506129f5565b92906001600160a01b03841692831561268457612a5590845f52600860205260405f205492612ceb565b93909180612a6b57506010549061237d82612313565b9450505f92845f52600b60205260405f206001600160a01b0383165f5260205260405f2054855f52600a60205260405f2054811080612b9b575b612ae45750845f52600a602052603260405f205410156125a657845f52600a60205261252160405f20926001600160a01b036040519161250483611ea3565b858095505f969392949652600a60205260ff6002612b058360405f20612130565b50015416612b92577fdce074e613075d639af3f726477d52ac48d3fbdb03f4aa8a9b1e6cede312db1091612b706001600160a01b0392855f52600a6020526002612b528260405f20612130565b5001600160ff19825416179055855f52600a60205260405f20612130565b50600142910155612b8a6040519283921695429083612321565b0390a3905f90565b50505050905f90565b50855f52600a6020526001600160a01b03612bb98260405f20612130565b5054166001600160a01b03841614612aa5565b805f5260026020526001600160a01b0360405f205416908115612bed575090565b637e27328960e01b5f5260045260245ffd5b60ff60075416612c0b57565b63d93c066560e01b5f5260045ffd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169081156128d7576001600160a01b0360446020926040519485938492632474521560e21b84527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048501521660248301525afa5f9181612caa575b50611ea057505f90565b612cc491925060203d6020116119a7576119998183611ebf565b905f612ca0565b600260065414612cdc576002600655565b633ee5aeb560e01b5f5260045ffd5b9060606020821115612d4c575081016040828203126102b257612d0d82611da1565b9160208101359067ffffffffffffffff82116102b2570181601f820112156102b2576001600160a01b0391816020612d4793359101611efd565b911691565b919081602091810103126102b257612d6b6001600160a01b0391611da1565b1691565b6001600160a01b031690811561211d57805f5260026020526001600160a01b0360405f205416151580612e67575b61174557805f5260026020526001600160a01b0360405f205416908115159283612e30575b805f52600360205260405f2060018154019055815f52600260205260405f20816001600160a01b0319825416179055827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a450612e1d57565b6339e3563760e11b5f525f60045260245ffd5b612e4f825f52600460205260405f206001600160a01b03198154169055565b825f52600360205260405f205f198154019055612dc2565b506001612d9d565b6001600160a01b03165f52600860205260405f20548015612f3e57805f52600b60205260405f206001600160a01b0383165f5260205260405f2054815f52600a60205260405f2054811015612f3957612ed390825f52600a60205260405f20612130565b506001600160a01b0380825416931680931480612f2b575b612ef457505050565b60020160ff1981541690557fee0396c067d25a2fde86b8e1c13e3995b0940b5f98651052d79fada14ea7dba56020604051428152a3565b5060ff600282015416612eeb565b505050565b505056fea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/NETWORKS.md b/api/@aastar/sdk/variables/NETWORKS.md new file mode 100644 index 000000000..75b4f12ab --- /dev/null +++ b/api/@aastar/sdk/variables/NETWORKS.md @@ -0,0 +1,151 @@ +> `const` **NETWORKS**: `object` + +Defined in: [packages/core/src/networks.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/networks.ts#L5) + +Blockchain Network Configuration + +## Type Declaration + +### anvil + +> `readonly` **anvil**: `object` + +#### anvil.blockExplorer + +> `readonly` **blockExplorer**: `""` = `''` + +#### anvil.chainId + +> `readonly` **chainId**: `31337` = `31337` + +#### anvil.name + +> `readonly` **name**: `"Anvil"` = `'Anvil'` + +#### anvil.nativeCurrency + +> `readonly` **nativeCurrency**: `object` + +#### anvil.nativeCurrency.decimals + +> `readonly` **decimals**: `18` = `18` + +#### anvil.nativeCurrency.name + +> `readonly` **name**: `"ETH"` = `'ETH'` + +#### anvil.nativeCurrency.symbol + +> `readonly` **symbol**: `"ETH"` = `'ETH'` + +#### anvil.rpcUrl + +> `readonly` **rpcUrl**: `"http://127.0.0.1:8545"` = `'http://127.0.0.1:8545'` + +### op-sepolia + +> `readonly` **op-sepolia**: `object` + +#### op-sepolia.blockExplorer + +> `readonly` **blockExplorer**: `"https://sepolia-optimism.etherscan.io"` = `'https://sepolia-optimism.etherscan.io'` + +#### op-sepolia.chainId + +> `readonly` **chainId**: `11155420` = `11155420` + +#### op-sepolia.name + +> `readonly` **name**: `"Optimism Sepolia"` = `'Optimism Sepolia'` + +#### op-sepolia.nativeCurrency + +> `readonly` **nativeCurrency**: `object` + +#### op-sepolia.nativeCurrency.decimals + +> `readonly` **decimals**: `18` = `18` + +#### op-sepolia.nativeCurrency.name + +> `readonly` **name**: `"Sepolia Ether"` = `'Sepolia Ether'` + +#### op-sepolia.nativeCurrency.symbol + +> `readonly` **symbol**: `"ETH"` = `'ETH'` + +#### op-sepolia.rpcUrl + +> `readonly` **rpcUrl**: `"https://sepolia.optimism.io"` = `'https://sepolia.optimism.io'` + +### optimism + +> `readonly` **optimism**: `object` + +#### optimism.blockExplorer + +> `readonly` **blockExplorer**: `"https://optimistic.etherscan.io"` = `'https://optimistic.etherscan.io'` + +#### optimism.chainId + +> `readonly` **chainId**: `10` = `10` + +#### optimism.name + +> `readonly` **name**: `"Optimism"` = `'Optimism'` + +#### optimism.nativeCurrency + +> `readonly` **nativeCurrency**: `object` + +#### optimism.nativeCurrency.decimals + +> `readonly` **decimals**: `18` = `18` + +#### optimism.nativeCurrency.name + +> `readonly` **name**: `"Ether"` = `'Ether'` + +#### optimism.nativeCurrency.symbol + +> `readonly` **symbol**: `"ETH"` = `'ETH'` + +#### optimism.rpcUrl + +> `readonly` **rpcUrl**: `"https://mainnet.optimism.io"` = `'https://mainnet.optimism.io'` + +### sepolia + +> `readonly` **sepolia**: `object` + +#### sepolia.blockExplorer + +> `readonly` **blockExplorer**: `"https://sepolia.etherscan.io"` = `'https://sepolia.etherscan.io'` + +#### sepolia.chainId + +> `readonly` **chainId**: `11155111` = `11155111` + +#### sepolia.name + +> `readonly` **name**: `"Sepolia"` = `'Sepolia'` + +#### sepolia.nativeCurrency + +> `readonly` **nativeCurrency**: `object` + +#### sepolia.nativeCurrency.decimals + +> `readonly` **decimals**: `18` = `18` + +#### sepolia.nativeCurrency.name + +> `readonly` **name**: `"Sepolia ETH"` = `'Sepolia ETH'` + +#### sepolia.nativeCurrency.symbol + +> `readonly` **symbol**: `"ETH"` = `'ETH'` + +#### sepolia.rpcUrl + +> `readonly` **rpcUrl**: `"https://rpc.sepolia.org"` = `'https://rpc.sepolia.org'` diff --git a/api/@aastar/sdk/variables/NODE_STAKE_AMOUNTS.md b/api/@aastar/sdk/variables/NODE_STAKE_AMOUNTS.md new file mode 100644 index 000000000..19e06ca80 --- /dev/null +++ b/api/@aastar/sdk/variables/NODE_STAKE_AMOUNTS.md @@ -0,0 +1,21 @@ +> `const` **NODE\_STAKE\_AMOUNTS**: `object` + +Defined in: [packages/core/src/constants.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L93) + +## Type Declaration + +### ENTERPRISE + +> `readonly` **ENTERPRISE**: `1000` = `1000` + +### LITE + +> `readonly` **LITE**: `30` = `30` + +### STANDARD + +> `readonly` **STANDARD**: `100` = `100` + +### SUPER + +> `readonly` **SUPER**: `300` = `300` diff --git a/api/@aastar/sdk/variables/OFFICIAL_ADDRESSES.md b/api/@aastar/sdk/variables/OFFICIAL_ADDRESSES.md new file mode 100644 index 000000000..2f968034b --- /dev/null +++ b/api/@aastar/sdk/variables/OFFICIAL_ADDRESSES.md @@ -0,0 +1,11 @@ +> `const` **OFFICIAL\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L92) + +Official Contract Addresses + +## Type Declaration + +### entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` diff --git a/api/@aastar/sdk/variables/PAYMASTER_ADDRESSES.md b/api/@aastar/sdk/variables/PAYMASTER_ADDRESSES.md new file mode 100644 index 000000000..a3f9ea08f --- /dev/null +++ b/api/@aastar/sdk/variables/PAYMASTER_ADDRESSES.md @@ -0,0 +1,15 @@ +> `const` **PAYMASTER\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L76) + +Paymaster Addresses + +## Type Declaration + +### paymasterV4\_1 + +> `readonly` **paymasterV4\_1**: `` `0x${string}` `` + +### paymasterV4\_1iImplementation + +> `readonly` **paymasterV4\_1iImplementation**: `` `0x${string}` `` = `PAYMASTER_V4_IMPL_ADDRESS` diff --git a/api/@aastar/sdk/variables/PAYMASTER_FACTORY_ADDRESS.md b/api/@aastar/sdk/variables/PAYMASTER_FACTORY_ADDRESS.md new file mode 100644 index 000000000..4e3ff51f9 --- /dev/null +++ b/api/@aastar/sdk/variables/PAYMASTER_FACTORY_ADDRESS.md @@ -0,0 +1,3 @@ +> **PAYMASTER\_FACTORY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L35) diff --git a/api/@aastar/sdk/variables/PAYMASTER_V4_ADDRESS.md b/api/@aastar/sdk/variables/PAYMASTER_V4_ADDRESS.md new file mode 100644 index 000000000..b1f8332d1 --- /dev/null +++ b/api/@aastar/sdk/variables/PAYMASTER_V4_ADDRESS.md @@ -0,0 +1,3 @@ +> **PAYMASTER\_V4\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L36) diff --git a/api/@aastar/sdk/variables/PAYMASTER_V4_IMPL_ADDRESS.md b/api/@aastar/sdk/variables/PAYMASTER_V4_IMPL_ADDRESS.md new file mode 100644 index 000000000..1f5413c42 --- /dev/null +++ b/api/@aastar/sdk/variables/PAYMASTER_V4_IMPL_ADDRESS.md @@ -0,0 +1,3 @@ +> **PAYMASTER\_V4\_IMPL\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L37) diff --git a/api/@aastar/sdk/variables/PaymasterABI.md b/api/@aastar/sdk/variables/PaymasterABI.md new file mode 100644 index 000000000..ff67dc69b --- /dev/null +++ b/api/@aastar/sdk/variables/PaymasterABI.md @@ -0,0 +1,3 @@ +> `const` **PaymasterABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L82) diff --git a/api/@aastar/sdk/variables/PaymasterArtifact.md b/api/@aastar/sdk/variables/PaymasterArtifact.md new file mode 100644 index 000000000..a728cb853 --- /dev/null +++ b/api/@aastar/sdk/variables/PaymasterArtifact.md @@ -0,0 +1,13 @@ +> `const` **PaymasterArtifact**: `object` = `PaymasterABIData` + +Defined in: [packages/core/src/abis/index.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L83) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a03461018957601f612abf38819003918201601f19168301916001600160401b0383118484101761018d5780849260209460405283398101031261018957516001600160a01b03811690819003610189573315610176575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600180558015610167576080525f516020612a9f5f395f51905f525460ff8160401c16610158576002600160401b03196001600160401b03821601610105575b6040516128fd90816101a28239608051818181610dfd0152818161101101526123250152f35b6001600160401b0319166001600160401b039081175f516020612a9f5f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f806100df565b63f92ee8a960e01b5f5260045ffd5b632462edf160e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f5f3560e01c80630396cb6014611f9a578063083e91c414611e5a5780630879c41214611e3c57806314d90e1b14611e1f578063204120bc14611de7578063205c287814611d745780633272668414610b375780633400ba5214611d5857806336f897e714611d3757806339788cd914611d165780633f4ba83a14611cf557806342f6fb2914611cce578063431f63c914611b3b5780634915a85814611abc5780634a58db1914611a6857806352b7512c1461173e57806354fd4d50146116dd5780635c975abb146116ba5780635dbfc94d146114365780635fa7b584146112a057806361d027b31461127957806361d1bc941461125b578063673a7e28146110e65780636f374b0f146110c1578063715018a61461106f57806375151b63146110355780637b10399914610ff15780637c627b2114610f4e5780638456cb5914610f2d57806384b863a814610f0c5780638da5cb5b14610ee65780638ee573ac14610eab578063975dd5be14610e8f5780639b1d309114610e23578063a032f4b814610ddd578063aa51e01514610dc1578063b0d691fe14610d9a578063b3db428b14610ca3578063bb9fe6bf14610c4e578063bd11187014610c30578063c23a5cea14610ba5578063c23f001f14610b57578063c7c6bd2c14610b37578063c9929dad14610ab4578063ce6771c914610a97578063d3c7c2c714610a01578063db110a071461085e578063dbcd429c1461083d578063e68b52e714610819578063e77fc7a414610494578063f0f4426014610404578063f2fde38b146103b3578063f3fef3a3146102a85763f60fdcb314610277575061000e565b346102a557806003193601126102a55760406005548151906001600160d01b038116825260d01c6020820152f35b80fd5b50346102a55760403660031901126102a5576102c261201a565b602435906102ce6126d6565b60ff600954166103a457338352600a602052604083206001600160a01b0382165f526020528160405f205410610395576001600160a01b0390338452600a602052604084208282165f5260205260405f2061032a84825461210c565b9055169061036260405163a9059cbb60e01b60208201523360248201528260448201526044815261035c6064826120ea565b836127ed565b6040519081527fa92ff919b850e4909ab2261d907ef955f11bc1716733a6cbece38d163a69af8a60203392a36001805580f35b630a18ee5560e41b8352600483fd5b63026ee64160e51b8352600483fd5b50346102a55760203660031901126102a5576103cd61201a565b6103d56126b0565b6001600160a01b038116156103f0576103ed90612707565b80f35b631e4fbdf760e01b82526004829052602482fd5b50346102a55760203660031901126102a5576001600160a01b0361042661201a565b61042e6126b0565b16801561048557600654816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8580a373ffffffffffffffffffffffffffffffffffffffff19161760065580f35b632462edf160e01b8252600482fd5b50346102a55760e03660031901126102a5576104ae61201a565b6104b6612030565b6044356001600160a01b03811680910361081557606435906001600160a01b0382168092036108115760843560a4359060c435927ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549660ff8860401c16159767ffffffffffffffff811680159081610809575b60011490816107ff575b1590816107f6575b506107e75767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556001600160a01b039190896107a8575b5016948515610799576001600160a01b03871695861561078a57821561078a57811561078a576103e8841161077b5784158015610769575b61075a576001600160a01b0319600254161760025560035490806001600160a01b031983161760035560405163313ce56760e01b8152602081600481855afa8b9181610729575b506106f95750506003805460ff60a01b1916600160a31b179055505b6001600160a01b031960065416176006556007556008558015155f146106f0575b60045560ff196009541660095561065482612707565b33036106e1575b506106635780f35b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6106ea90612707565b5f61065b565b50610e1061063e565b74ffffffffffffffffffffffffffffffffffffffffff199092161760a09190911b60ff60a01b161760035561061d565b61074c91925060203d602011610753575b61074481836120ea565b810190612217565b905f610601565b503d61073a565b6377fc568960e01b8a5260048afd5b5068056bc75e2d6310000085116105ba565b632cbc962760e01b8a5260048afd5b632462edf160e01b8a5260048afd5b632462edf160e01b8952600489fd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f610582565b63f92ee8a960e01b8a5260048afd5b9050155f61053c565b303b159150610534565b8a915061052a565b8480fd5b8380fd5b50346102a557806003193601126102a557602060ff60035460a01c16604051908152f35b50346102a557806003193601126102a5576108566126b0565b6103ed612651565b50346102a557806003193601126102a557600c5461087b81612625565b9061088960405192836120ea565b808252601f1961089882612625565b013660208401376108a881612625565b926108b660405194856120ea565b8184526108c282612625565b602085019490601f19013686376108d883612625565b906108e660405192836120ea565b8382526108f284612625565b602083019490601f1901368637835b818110610999575050906109269591602060405197889760608952606089019061207e565b91878303828901525191828152019290845b81811061098057505050602090858303604087015251918281520192915b818110610964575050500390f35b825160ff16845285945060209384019390920191600101610956565b8251855288975060209485019490920191600101610938565b806001600160a01b036109b16001939a98999a6121eb565b90549060031b1c16806109c4838c61263d565b52808752600b60205260408720546109dc838761263d565b528652600e60205260ff6040872054166109f6828761263d565b520196959496610901565b50346102a557806003193601126102a55760405180916020600c54928381520191600c82527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7915b818110610a7857610a7485610a60818703826120ea565b60405191829160208352602083019061207e565b0390f35b82546001600160a01b0316845260209093019260019283019201610a49565b50346102a557806003193601126102a5576020604051610bb88152f35b50346102a55760203660031901126102a557600435610ad16126b0565b80158015610b25575b610b16577f49081791577ea5202d6975e5d6ad3a55a49709b1adf70fbd4fbf4b3ffda6e03160406008548151908152836020820152a160085580f35b6377fc568960e01b8252600482fd5b5068056bc75e2d631000008111610ada565b50346102a557806003193601126102a55760206040516402540be4008152f35b50346102a55760403660031901126102a5576001600160a01b036040610b7b61201a565b9282610b85612030565b94168152600a6020522091165f52602052602060405f2054604051908152f35b50346102a55760203660031901126102a55780610bc061201a565b610bc86126b0565b6001600160a01b036002541690813b15610c2c576001600160a01b036024849283604051958694859363611d2e7560e11b85521660048401525af18015610c2157610c105750f35b81610c1a916120ea565b6102a55780f35b6040513d84823e3d90fd5b5050fd5b50346102a557806003193601126102a5576020600454604051908152f35b50346102a557806003193601126102a557610c676126b0565b806001600160a01b0360025416803b15610ca05781809160046040518094819363bb9fe6bf60e01b83525af18015610c2157610c105750f35b50fd5b50346102a55760603660031901126102a557610cbd61201a565b610cc5612030565b6001600160a01b0360443591610cd96126d6565b1691828452600b602052604084205415610d8b576040516323b872dd60e01b602080830191909152336024830152306044830152606480830185905282527ff0d0e99cae184d0187b093b48894117462462379674a6e11d89c3fbb618e96b09290916001600160a01b039190610d5a90610d546084826120ea565b876127ed565b1692838652600a825260408620855f52825260405f20610d7b828254612140565b9055604051908152a36001805580f35b635f77d0bd60e01b8452600484fd5b50346102a557806003193601126102a55760206001600160a01b0360025416604051908152f35b50346102a557806003193601126102a557602060405160058152f35b50346102a557806003193601126102a55760206040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001615158152f35b50346102a55760203660031901126102a557600435610e406126b0565b6103e88111610e80577e3b413cf14a67407425bd0b5c065b2de08876554d8489ad7dd4aa95604d280c60406007548151908152836020820152a160075580f35b632cbc962760e01b8252600482fd5b50346102a557806003193601126102a5576020604051600f8152f35b50346102a55760203660031901126102a55760ff60406020926001600160a01b03610ed461201a565b168152600e8452205416604051908152f35b50346102a557806003193601126102a5576001600160a01b036020915416604051908152f35b50346102a557806003193601126102a5576020604051655af3107a40008152f35b50346102a557806003193601126102a557610f466126b0565b6103ed6125e9565b50346102a55760803660031901126102a557600360043510156102a55760243567ffffffffffffffff8111610fed5736602382011215610fed57806004013567ffffffffffffffff8111610fe9573660248284010111610fe9576001600160a01b03600254163303610fda5790610fd391610fc76126d6565b6024604435920161238e565b6001805580f35b637f3c57b560e01b8352600483fd5b8280fd5b5080fd5b50346102a557806003193601126102a55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102a55760203660031901126102a55760406020916001600160a01b0361105c61201a565b168152600d835220541515604051908152f35b50346102a557806003193601126102a5576110886126b0565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102a557806003193601126102a55760206110dc6122c7565b6040519015158152f35b50346102a557806003193601126102a557600460a06001600160a01b036003541660405192838092633fabe5a360e21b82525afa908115610c21578291839284928592611211575b5069ffffffffffffffffffff8091169116106111ea57828213156111ea5780158015611208575b6111ea576402540be400821280156111f9575b6111ea57611176814261210c565b600454106111ea57816040916001600160d01b037f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd696838941683516111b8816120ba565b818152602065ffffffffffff841691015265ffffffffffff60d01b8260d01b161760055582519182526020820152a180f35b6344e30e0360e11b8352600483fd5b506509184e72a0008213611168565b50428111611155565b905069ffffffffffffffffffff9350839250611245915060a03d60a011611254575b61123d81836120ea565b81019061227a565b9295909450919291905061112e565b503d611233565b50346102a557806003193601126102a5576020600754604051908152f35b50346102a557806003193601126102a55760206001600160a01b0360065416604051908152f35b50346102a55760203660031901126102a5576001600160a01b036112c261201a565b6112ca6126b0565b16808252600d60205260408220541561142757808252600d60205260408220545f19810181811161141357600c545f1981019081116113ff578082036113a4575b505050600c548015611390575f1901611323816121eb565b6001600160a01b0382549160031b1b19169055600c55808252600d602052816040812055808252600b602052816040812055808252600e6020526040822060ff1981541690557f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd38280a280f35b634e487b7160e01b83526031600452602483fd5b6113cc916001600160a01b036113bc6113eb936121eb565b90549060031b1c169283916121eb565b9091906001600160a01b038084549260031b9316831b921b1916179055565b8352600d60205260408320555f808061130b565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b84526011600452602484fd5b6351b3a25160e01b8252600482fd5b50346102a55760603660031901126102a557611450612030565b604435908115158203610fe9573033036116ab576001600160a01b0316808352600b6020526040832054908115610d8b57839215611668579260049360a06001600160a01b036003541660405196878092633fabe5a360e21b82525afa8015610c2157829083918497859261162e575b5069ffffffffffffffffffff8091169116106111ea57948015908115611624575b811561160f575b506115f1575b818513156115f1576402540be40085128015611600575b6115f15760ff60035460a01c169360075480612710019081612710116113ff5781926115c8575b5050611552918352600e60205261154d60ff6040852054169660043561212d565b61212d565b926127108302928304612710036115b457600a019060ff82116115a0576020611598868661159261158c88611586896126f6565b9061212d565b926126f6565b90612744565b604051908152f35b634e487b7160e01b81526011600452602490fd5b634e487b7160e01b82526011600452602482fd5b612af801915081106115dd576115525f61152c565b634e487b7160e01b83526011600452602483fd5b6344e30e0360e11b8252600482fd5b506509184e72a0008513611505565b61161a91504261210c565b600454105f6114e8565b42811191506114e1565b905069ffffffffffffffffffff9750879250611659915060a03d60a0116112545761123d81836120ea565b909950919391929190506114c0565b915060405192611677846120ba565b600554936001600160d01b038516808252602082019560d01c8652156115f157516001600160d01b031693506001926114ee565b634fd3f39560e01b8352600483fd5b50346102a557806003193601126102a557602060ff600954166040519015158152f35b50346102a557806003193601126102a55750610a746040516117006040826120ea565b601281527f504d56342d4465706f7369742d342e352e300000000000000000000000000000602082015260405191829160208352602083019061205a565b50346102a55760603660031901126102a55760043567ffffffffffffffff8111610fed5780600401906101206003198236030112610fe957604435906001600160a01b03600254163303611a595760ff60095416611a4a5760e4906117a16126d6565b019260346117af8585612230565b905010611a3b578235936001600160a01b03851692838603610fe9576008549081811115611a335750935b60486117e68383612230565b905010155f146116ab57906117fa91612230565b604811610fed576034013560601c808252600b6020526040822054909384918015610d8b576040519061182c826120ba565b600554916001600160d01b038316808252602082019360d01c845215611a2457516001600160d01b0316915084821315611a06576402540be40082128015611a15575b611a065760ff60035460a01c16916007549081612710019182612710116119f257612af8018092116119de579061154d6118b992878952600e60205260ff60408a2054169661212d565b916127108202918204612710036119ca57600a0160ff81116119ca5761158c6118ea949392611586611592936126f6565b92808352600a60205260408320825f526020528360405f205410610395578252600a60205260408220905f5260205260405f2061192883825461210c565b905560055460d01c9081156119bb57506119a19361197b61194f6119899360045490612140565b93604051958693602085016001600160a01b036040929594938160608401971683521660208201520152565b03601f1981018452836120ea565b6001805560405192839260408452604084019061205a565b60a09190911b65ffffffffffff60a01b1660208301520390f35b637d1bece760e01b8152600490fd5b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b87526011600452602487fd5b634e487b7160e01b88526011600452602488fd5b6344e30e0360e11b8552600485fd5b506509184e72a000821361186f565b6344e30e0360e11b8652600486fd5b9050936117da565b634fd3f39560e01b8152600490fd5b63026ee64160e51b8452600484fd5b637f3c57b560e01b8452600484fd5b50806003193601126102a557611a7c6126b0565b806001600160a01b0360025416803b15610ca057816024916040519283809263b760faf960e01b825230600483015234905af18015610c2157610c105750f35b50346102a55760203660031901126102a557600435611ad96126b0565b603c81108015611b2f575b611b20577f2cfed7ac4be4a0009ef1af32ea2de149e0122938cb9aa4b3f7df3be6da1055e960406004548151908152836020820152a160045580f35b633ed9025960e11b8252600482fd5b50620151808111611ae4565b50346102a55760403660031901126102a557611b5561201a565b602435611b606126b0565b6001600160a01b038216918215611cbf578115611cb057828452600d602052604084205415611c46575b5060ff601260405163313ce56760e01b8152602081600481885afa869181611c25575b50611c1d575b501660188111611c0e577fceb40be0a58aa33916c199e469842b614ef313295573c15d82f85cc9d1a89d3291602091848652600e8352604086209060ff19825416179055838552600b8252806040862055604051908152a280f35b630c70c5db60e31b8452600484fd5b90505f611bb3565b611c3f91925060203d6020116107535761074481836120ea565b905f611bad565b600c54600a811015611ca15768010000000000000000811015611c8d57906113cc826001611c779401600c556121eb565b600c54828452600d60205260408420555f611b8a565b634e487b7160e01b85526041600452602485fd5b63074f8ff960e41b8552600485fd5b6344e30e0360e11b8452600484fd5b632462edf160e01b8452600484fd5b50346102a557806003193601126102a55760206001600160a01b0360035416604051908152f35b50346102a557806003193601126102a557611d0e6126b0565b6103ed6121b1565b50346102a557806003193601126102a55760206040516509184e72a0008152f35b50346102a557806003193601126102a557611d506126b0565b6103ed61214d565b50346102a557806003193601126102a5576020604051600a8152f35b50346102a55760403660031901126102a55780611d8f61201a565b611d976126b0565b6001600160a01b036002541690813b15610c2c576001600160a01b036044849283604051958694859363040b850f60e31b855216600484015260243560248401525af18015610c2157610c105750f35b50346102a55760203660031901126102a55760406020916001600160a01b03611e0e61201a565b168152600b83522054604051908152f35b50346102a557806003193601126102a55760206040516103e88152f35b50346102a557806003193601126102a5576020600854604051908152f35b50346102a55760403660031901126102a55760043560243565ffffffffffff81169081810361081557611e8b6126b0565b8215611cb0576402540be40083108015611f8b575b611cb057428211611cb0576001600160d01b036005541680158015611f3c575b857f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683860408787876001600160d01b038316908260208651611f00816120ba565b848152015260d01b7fffffffffffff0000000000000000000000000000000000000000000000000000161760055582519182526020820152a180f35b611b58820290828204611b58148117156119de576132c883029283046132c81417156119ca5761271090048410908115611f7d575b50611cb0575f80611ec0565b61271091500483115f611f71565b50655af3107a40008311611ea0565b5060203660031901126120165760043563ffffffff811680910361201657611fc06126b0565b6001600160a01b036002541690813b15612016575f90602460405180948193621cb65b60e51b8352600483015234905af1801561200b57611fff575080f35b61001891505f906120ea565b6040513d5f823e3d90fd5b5f80fd5b600435906001600160a01b038216820361201657565b602435906001600160a01b038216820361201657565b35906001600160a01b038216820361201657565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b90602080835192838152019201905f5b81811061209b5750505090565b82516001600160a01b031684526020938401939092019160010161208e565b6040810190811067ffffffffffffffff8211176120d657604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff8211176120d657604052565b9190820391821161211957565b634e487b7160e01b5f52601160045260245ffd5b8181029291811591840414171561211957565b9190820180921161211957565b60095460ff81166121ae5760ff1916600117600955337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2307fca323d32ea3ada728fbc5a470183af7d4cc49a426cb2bdf68847d6e298576f205f80a2565b50565b60095460ff8116156121ae5760ff1916600955337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2565b600c5481101561220357600c5f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b90816020910312612016575160ff811681036120165790565b903590601e1981360301821215612016570180359067ffffffffffffffff82116120165760200191813603831361201657565b519069ffffffffffffffffffff8216820361201657565b908160a09103126120165761228e81612263565b916020820151916040810151916122ac608060608401519301612263565b90565b90816020910312612016575180151581036120165790565b60ff6009541661238a576001600160a01b035f541660405190632474521560e21b82527ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e600483015260248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa5f9181612359575b506122ac57505f90565b61237c91925060203d602011612383575b61237481836120ea565b8101906122af565b905f61234f565b503d61236a565b5f90565b90915f9280156125e3578260609181010312612016576123ad82612046565b6001600160a01b038060406123c460208701612046565b95013592169316935f60055460d01c80159081156125d9575b81156125c4575b50612554575b60405190635dbfc94d60e01b825284600483015286602483015215156044820152602081606481305afa829181612500575b5091606093917f62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae0739593155f146124fa5750815b8083116124f2575b826124619161210c565b806124c0575b5081612483575b506040519182528060208301526040820152a3565b6040906001600160a01b03600654168152600a602052206001600160a01b0387165f5260205260405f206124b8828254612140565b90555f61246e565b868252600a602052604082206001600160a01b0389165f526020526124ea60405f20918254612140565b90555f612467565b915081612457565b9161244f565b9091506020813d60201161254c575b8161251c602093836120ea565b81010312610fe95751907f62544d7f48b11c32334310ebd306b47224fca220163218d4a7264322c52ae07361241c565b3d915061250f565b50303b1561201657604051630ce74fc560e31b81525f8160048183305af190816125af575b506125aa577f2b5186a49160aeb8b14d6c82226402a1645e57be3d6219529ab397ee974134758180a15b60016123ea565b6125a3565b6125bc9192505f906120ea565b5f905f612579565b6125cf91504261210c565b600454105f6123e4565b42811191506123dd565b50505050565b60095460ff81166121ae5760ff1916600117600955337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2565b67ffffffffffffffff81116120d65760051b60200190565b80518210156122035760209160051b010190565b60095460ff8116156121ae5760ff1916600955337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2307fa802e6454d86a21ffa90efd6c93aa893bcf539fea6c1a9c8097879faccc389bb5f80a2565b6001600160a01b035f541633036126c357565b63118cdaa760e01b5f523360045260245ffd5b6002600154146126e7576002600155565b633ee5aeb560e01b5f5260045ffd5b60ff16604d811161211957600a0a90565b6001600160a01b03805f549216918282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b9091828202915f19848209938380861095039480860395146127cb57848311156127bc57829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b5050915081156127d9570490565b634e487b7160e01b5f52601260045260245ffd5b5f6001600160a01b038192169260208151910182855af13d1561288a573d67ffffffffffffffff81116120d657604051612847929091612837601f8201601f1916602001846120ea565b82523d5f602084013e5b83612896565b805190811515918261286f575b505061285d5750565b635274afe760e01b5f5260045260245ffd5b61288292506020809183010191016122af565b155f80612854565b61284790606090612841565b906128ba57508051156128ab57805190602001fd5b630a12f52160e11b5f5260045ffd5b815115806128e7575b6128cb575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156128c356fea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/sdk/variables/PaymasterFactoryABI.md b/api/@aastar/sdk/variables/PaymasterFactoryABI.md new file mode 100644 index 000000000..eb753df5b --- /dev/null +++ b/api/@aastar/sdk/variables/PaymasterFactoryABI.md @@ -0,0 +1,3 @@ +> `const` **PaymasterFactoryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:78](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L78) diff --git a/api/@aastar/sdk/variables/PaymasterFactoryArtifact.md b/api/@aastar/sdk/variables/PaymasterFactoryArtifact.md new file mode 100644 index 000000000..01fd790ae --- /dev/null +++ b/api/@aastar/sdk/variables/PaymasterFactoryArtifact.md @@ -0,0 +1,13 @@ +> `const` **PaymasterFactoryArtifact**: `object` = `PaymasterFactoryABIData` + +Defined in: [packages/core/src/abis/index.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L79) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x6080806040523460755733156062575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3600180556117cd908161007a8239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c80630618f104146112095780630cfb14b0146111ec57806314b1c401146111cf5780631798d482146111a057806341bbe5a814610e3b57806354fd4d501461113d57806364feab6414610f245780636a18943914610ee15780636b68389614610e7c5780636c583e5914610e3b578063715018a614610dd75780637563750514610b7f5780637857bce914610aad5780637b10399914610a87578063821ac3fb14610a4657806385365cbb146108065780638da5cb5b146107e1578063a87d5a7414610785578063a91ee0dc14610725578063ad384a9b146103f9578063bde9cb2a1461030c578063ce47d467146102cb578063d12553131461025f578063dc2a147214610218578063f2fde38b1461019c5763f3bcebbd14610137575f80fd5b346101985760203660031901126101985760043567ffffffffffffffff8111610198576001600160a01b03602080610174819436906004016112a6565b604051928184925191829101835e8101600281520301902054161515604051908152f35b5f80fd5b34610198576020366003190112610198576001600160a01b036101bd6113fd565b6101c561179a565b168015610205576001600160a01b035f548282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610198576020366003190112610198576001600160a01b036102396113fd565b165f52600460205260406001600160a01b03815f20541681519080825215156020820152f35b346101985760403660031901126101985761027e60243560043561158f565b6040518091602082016020835281518091526020604084019201905f5b8181106102a9575050500390f35b82516001600160a01b031684528594506020938401939092019160010161029b565b34610198576020366003190112610198576001600160a01b036102ec6113fd565b165f52600460205260206001600160a01b0360405f205416604051908152f35b346101985760403660031901126101985760043567ffffffffffffffff81116101985761033d9036906004016112a6565b6001600160a01b03604051602081845180838701835e8101600281520301902054169081156103d05760206055604384604051903060388301526f5af43d82803e903d91602b57fd5bf3ff60248301526014820152733d602d80600a3d3981f3363d3d373d3d3d363d73815260243560588201526037600c820120607882015201206001600160a01b0360405191168152f35b60405163ed4fac3760e01b8152602060048201529081906103f59060248301906113d9565b0390fd5b346101985760603660031901126101985760043567ffffffffffffffff81116101985761042a9036906004016112a6565b60443567ffffffffffffffff81116101985761044a9036906004016112a6565b9061045361165c565b6001600160a01b0360085416806105fa575b50335f5260036020526001600160a01b0360405f2054166105e757604051602081835180838601835e81016002815203019020546001600160a01b038116156105c55780763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39360881c16175f526effffffffffffffffffffffffffffff199060781b1617602052602435603760095ff56001600160a01b0381169182156105b657610567839261052360209633836116ab565b335f526003865260405f20846001600160a01b0319825416179055835f526004865260405f206001600160a01b0333166001600160a01b0319825416179055611499565b610572600754611510565b6007557fa1ff1ed230517376e0a7481a00b4dfc8f2f2e212bccebd933d567bf5640494c0604051806105a73394429083611532565b0390a360018055604051908152f35b6330be1a3d60e21b5f5260045ffd5b60405163ed4fac3760e01b815260206004820152806103f560248201856113d9565b6369e496ad60e01b5f523360045260245ffd5b604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0746004820152336024820152602081604481855afa9081156106ec575f91610706575b50156106f757602060449160405192838092632474521560e21b82527ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e60048301523360248301525afa9081156106ec575f916106bd575b50156106ae5782610465565b63707fda8f60e11b5f5260045ffd5b6106df915060203d6020116106e5575b6106d78183611268565b810190611481565b836106a2565b503d6106cd565b6040513d5f823e3d90fd5b6317746e1b60e31b5f5260045ffd5b61071f915060203d6020116106e5576106d78183611268565b8461064a565b346101985760203660031901126101985761073e6113fd565b61074661179a565b6001600160a01b0380600854921691828219821617600855167f482b97c53e48ffa324a976e2738053e9aff6eee04d8aac63b10e19411d869b825f80a3005b34610198576020366003190112610198576001600160a01b036107a66113fd565b16805f5260046020526001600160a01b0360405f20541680156107ce57602090604051908152f35b50630a36f2b760e31b5f5260045260245ffd5b34610198575f3660031901126101985760206001600160a01b035f5416604051908152f35b346101985760203660031901126101985760043567ffffffffffffffff8111610198576108379036906004016112a6565b61083f61179a565b6001600160a01b03604051602081845180838701835e810160028152030190205416156103d05761086e611322565b81519167ffffffffffffffff8311610a325761088b6006546112ea565b601f81116109c4575b50602092601f811160011461091c576108fe92918161090c927ff2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a965f91610911575b508160011b915f199060031b1c1916176006555b6040519384936040855260408501906113d9565b9083820360208501526113d9565b0390a1005b9050820151876108d6565b601f19811660065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f905f5b8181106109ac5750826108fe9594927ff2d0bf91625d9d6f0875b7d42914fd44597c078083d98cb3619c009136be9f6a9761090c9560019410610994575b5050811b016006556108ea565b8401515f1960f88460031b161c191690558780610987565b84870151835560209687019660019093019201610949565b838111156108945760065f52601f840160051c9060208510610a2a575b601f82910160051c03905f5b8281106109fb575050610894565b5f8282017ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01556001016109ed565b5f91506109e1565b634e487b7160e01b5f52604160045260245ffd5b3461019857602036600319011261019857600435600554811015610198576001600160a01b03610a77602092611455565b90549060031b1c16604051908152f35b34610198575f3660031901126101985760206001600160a01b0360085416604051908152f35b3461019857610abb36611413565b90610ac461179a565b6001600160a01b038216918215908115610b75575b50610b6257604051906001600160a01b03815192602081818501958087835e8101600281520301902054169182156105c55790610b3c916020604051809284518091835e81016002815203019020846001600160a01b031982541617905561154e565b7f2255c4b39068cc7208e9c29b0fc9a3d106b3a41ada38999656d54aa44a6dc9e85f80a4005b50630c76093760e01b5f5260045260245ffd5b90503b1583610ad9565b3461019857610b8d36611413565b610b9561179a565b6001600160a01b038116908115908115610dcd575b50610dbb576040516001600160a01b03835191602081818701948086835e810160028152030190205416610d99576020604051809285518091835e81016002815203019020816001600160a01b031982541617905560065491610c0c836112ea565b15610c41575b610c1b9061154e565b7f9aa81ca4174435962ad1571b0a59c4440cf6de4a12ba4ed96d6fdf5d346742785f80a3005b80519267ffffffffffffffff8411610a3257610c5c906112ea565b601f8111610d2b575b50602092601f8111600114610ca85780610c1b93945f91610c9d575b508160011b915f199060031b1c1916176006555b829150610c12565b905082015185610c81565b601f19811660065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f905f5b818110610d13575090610c1b9495836001949310610cfb575b5050811b01600655610c95565b8401515f1960f88460031b161c191690558580610cee565b84870151835560209687019660019093019201610cd5565b83811115610c655760065f52601f840160051c9060208510610d91575b601f82910160051c03905f5b828110610d62575050610c65565b5f8282017ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0155600101610d54565b5f9150610d48565b60405163b94f32dd60e01b815260206004820152806103f560248201866113d9565b630c76093760e01b5f5260045260245ffd5b90503b1583610baa565b34610198575f36600319011261019857610def61179a565b5f805473ffffffffffffffffffffffffffffffffffffffff19811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610198576020366003190112610198576001600160a01b03610e5c6113fd565b165f52600360205260206001600160a01b0360405f205416604051908152f35b346101985760203660031901126101985760043567ffffffffffffffff811161019857610ead9036906004016112a6565b6001600160a01b03604051602081845180838701835e8101600281520301902054169081156103d057602082604051908152f35b34610198576020366003190112610198576001600160a01b03610f026113fd565b165f52600360205260206001600160a01b0360405f2054161515604051908152f35b346101985760403660031901126101985760043567ffffffffffffffff811161019857610f559036906004016112a6565b60243567ffffffffffffffff811161019857610f759036906004016112a6565b90610f7e61165c565b6001600160a01b03600854168061104b575b50335f5260036020526001600160a01b0360405f2054166105e757604051602081835180838601835e81016002815203019020546001600160a01b038116156105c55780763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff6e5af43d82803e903d91602b57fd5bf39360881c16175f526effffffffffffffffffffffffffffff199060781b1617602052603760095ff06001600160a01b0381169182156105b657610567839261052360209633836116ab565b604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0746004820152336024820152602081604481855afa9081156106ec575f9161111e575b50156106f757602060449160405192838092632474521560e21b82527ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70e60048301523360248301525afa9081156106ec575f916110ff575b50156106ae5782610f90565b611118915060203d6020116106e5576106d78183611268565b836110f3565b611137915060203d6020116106e5576106d78183611268565b8461109b565b34610198575f3660031901126101985761119c60405161115e604082611268565b601681527f5061796d6173746572466163746f72792d312e302e320000000000000000000060208201526040519182916020835260208301906113d9565b0390f35b34610198575f3660031901126101985761119c6111bb611322565b6040519182916020835260208301906113d9565b34610198575f366003190112610198576020600554604051908152f35b34610198575f366003190112610198576020600754604051908152f35b346101985760203660031901126101985760043567ffffffffffffffff8111610198576001600160a01b03602080611246819436906004016112a6565b604051928184925191829101835e810160028152030190205416604051908152f35b90601f8019910116810190811067ffffffffffffffff821117610a3257604052565b67ffffffffffffffff8111610a3257601f01601f191660200190565b81601f82011215610198576020813591016112c08261128a565b926112ce6040519485611268565b8284528282011161019857815f92602092838601378301015290565b90600182811c92168015611318575b602083101461130457565b634e487b7160e01b5f52602260045260245ffd5b91607f16916112f9565b604051905f8260065491611335836112ea565b80835292600181169081156113ba575060011461135b575b61135992500383611268565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b81831061139e5750509060206113599282010161134d565b6020919350806001915483858901015201910190918492611386565b6020925061135994915060ff191682840152151560051b82010161134d565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361019857565b6040600319820112610198576004359067ffffffffffffffff82116101985761143e916004016112a6565b906024356001600160a01b03811681036101985790565b60055481101561146d5760055f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b90816020910312610198575180151581036101985790565b60055468010000000000000000811015610a32576001810160055560055481101561146d5760055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b5f19811461151e5760010190565b634e487b7160e01b5f52601160045260245ffd5b9291906115496020916040865260408601906113d9565b930152565b602090604051918183925191829101835e81015f815203902090565b67ffffffffffffffff8111610a325760051b60200190565b9190820180921161151e57565b91906005549081841015611640576115a79084611582565b90808211611638575b5082810390811161151e576115c48161156a565b906115d26040519283611268565b808252601f196115e18261156a565b0136602084013781935f5b8281106115f95750505050565b6001600160a01b0361161361160e8385611582565b611455565b90549060031b1c1690845181101561146d5760019160208260051b87010152016115ec565b90505f6115b0565b50509050604051611652602082611268565b5f81525f36813790565b60026001541461166d576002600155565b633ee5aeb560e01b5f5260045ffd5b3d156116a6573d9061168d8261128a565b9161169b6040519384611268565b82523d5f602084013e565b606090565b9091600481511061178b575f816020829351910182855af16116cb61167c565b901561175b57505f80916040516020810190638da5cb5b60e01b8252600481526116f6602482611268565b51915afa61170261167c565b90158015611780575b61175b576020818051810103126101985760200151906001600160a01b038216809203610198576001600160a01b0316808203611746575050565b632767cb4760e11b5f5260045260245260445ffd5b60405163044ba14b60e31b8152602060048201529081906103f59060248301906113d9565b50602081511061170b565b6307ce216360e51b5f5260045ffd5b6001600160a01b035f541633036117ad57565b63118cdaa760e01b5f523360045260245ffdfea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/PolicyRegistryABI.md b/api/@aastar/sdk/variables/PolicyRegistryABI.md new file mode 100644 index 000000000..40a7246c0 --- /dev/null +++ b/api/@aastar/sdk/variables/PolicyRegistryABI.md @@ -0,0 +1,3 @@ +> `const` **PolicyRegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L131) diff --git a/api/@aastar/sdk/variables/PolicyRegistryArtifact.md b/api/@aastar/sdk/variables/PolicyRegistryArtifact.md new file mode 100644 index 000000000..a14148726 --- /dev/null +++ b/api/@aastar/sdk/variables/PolicyRegistryArtifact.md @@ -0,0 +1,13 @@ +> `const` **PolicyRegistryArtifact**: `object` = `PolicyRegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L132) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a03461018957601f611a8338819003918201601f19168301916001600160401b0383118484101761018d5780849260609460405283398101031261018957610047816101a1565b906100606040610059602084016101a1565b92016101a1565b916001600160a01b038116158015610178575b61016957608052600780546001600160a01b0319166001600160a01b0392909216918217905560405191905f7f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad9098180a36001600160a01b03169081610123575b6040516118cd90816101b6823960805181818161016001528181610466015281816104a7015281816108630152818161095801528181610a5d01528181610b9d01528181610c6301526112bd0152f35b60207f5f7c8bcc9fe1f59809d268c8cf6b63a36c4aedb54e3a40628113344d5620dd4591835f526006825260405f20600160ff1982541617905560018152a25f806100d3565b63d92e233d60e01b5f5260045ffd5b506001600160a01b03821615610073565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101895756fe60806040526004361015610011575f80fd5b5f3560e01c8063055b8e7b146110b857806329210a4b14610fe357806335cefaa814610f0d5780633ef43aff14610c4957806343a0c39f14610c2c578063452a932014610c0657806353d8cb6814610b7a57806354fd4d5014610ae05780636ef778ee14610a2b578063715904dd146109bd5780637df732ea146109805780637e19482e146108d35780638a0dac4a14610840578063969cb5da146107f9578063a1a4a180146106e4578063b16559191461066d578063b743be941461063f578063be29f4911461048e578063ccd7129f14610184578063d33219b4146101415763e583983614610100575f80fd5b3461013d57602036600319011261013d576001600160a01b036101216112e5565b165f526003602052602060ff60405f2054166040519015158152f35b5f80fd5b3461013d575f36600319011261013d5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461013d5761019236611356565b906001600160a01b03600754163314158061045b575b61044c576001600160a01b031691821561043d576001600160a01b031691825f52600160205260405f20815f5260205260405f20805460ff8160d01c1615610410576101f38461146f565b80610432575b6104105760ff8160081c168061041f575b6104105760408401906001600160801b038061022584611415565b9260101c16911611610410577f92249bcccf66629d53d2829a1c6769f4d5d74bc9d8bc6aa08ab9f00c7f89fcfc859184936102746102628861146f565b829060ff801983541691151516179055565b610347602088019161029e6102888461146f565b825461ff00191690151560081b61ff0016178255565b6102e06102aa85611415565b825471ffffffffffffffffffffffffffffffff0000191660109190911b71ffffffffffffffffffffffffffffffff000016178255565b67ffffffffffffffff6103046102fe6102f88c61146f565b9561146f565b95611415565b915460901c16906040519485948592936001600160801b0367ffffffffffffffff9296956060946080870198151587521515602087015216604085015216910152565b0390a3608082016103588184611491565b9390505f5b84811061038c5733867f4d156b5f26f59392a109b67021b0a170f0ea10ac562c1538dee681f1727151e65f80a3005b806103ab6103a66001936103a08787611491565b906114c7565b6114eb565b875f52600260205260405f20865f5260205260405f209063ffffffff60e01b1690815f5260205260405f2060ff19815416905585887fdae56faaf89f401e21b133aee83453dde734ae5b8d6d672919900921f1e6278060206040515f8152a40161035d565b63c892292160e01b5f5260045ffd5b5061042c6020850161146f565b1561020a565b5060ff8116156101f9565b63d92e233d60e01b5f5260045ffd5b63954afe2760e01b5f5260045ffd5b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314156101a8565b3461013d5761049c36611311565b916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576104d682611779565b6104df83611415565b9160208401936104ee85611415565b936040820135936105016060840161147c565b9161050a611429565b6001600160801b03918216815296811660208089019182526040808a0189815267ffffffffffffffff90961660608b0190815260016080808d019182526001600160a01b039788165f818152808752858120998d16815298909552929096209a51935190911b6fffffffffffffffffffffffffffffffff191692909316919091178855969092516001820155600201915167ffffffffffffffff1682549151151560401b68ff0000000000000000169168ffffffffffffffffff1916171790556105d390611415565b936105dd90611415565b604080516001600160801b039687168152919095166020820152938401919091526001600160a01b0316917f9984473f7cade7b75b6eb54c38d7958684489452a04379c6d91de87da74375fe90606090a3005b63656a6d1560e11b5f5260045ffd5b3461013d575f36600319011261013d57602060405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b3461013d57606036600319011261013d576106866112e5565b61068e6112fb565b6044359163ffffffff60e01b831680930361013d576001600160a01b03165f5260026020526001600160a01b0360405f2091165f5260205260405f20905f52602052602060ff60405f2054166040519015158152f35b3461013d576106f2366113b2565b9193929092335f52600660205260ff60405f205416156107ea576001600160a01b03807fc8e3d7812ff5ee9233152255de3b82224861baad07a1550a51ccd7174f1e7f8893816040946107448a611779565b1695865f525f602052845f20838a165f5260205261078a88865f20895f526004602052875f20868d165f5260205267ffffffffffffffff6002895f2092015416906117ce565b865f526001602052845f208383165f526020526107cf88865f20895f526005602052875f208686165f5260205267ffffffffffffffff885f20915460901c16906117ce565b84519788526001600160e01b031916602088015216951693a4005b634b95b20b60e11b5f5260045ffd5b3461013d5761081361080a366113b2565b93929092611521565b60405190600383101561082c5760409282526020820152f35b634e487b7160e01b5f52602160045260245ffd5b3461013d57602036600319011261013d576108596112e5565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b0316801561043d576001600160a01b03600754828219821617600755167f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad9095f80a3005b3461013d57602036600319011261013d576108ec6112e5565b6001600160a01b03600754163314158061094d575b61044c576001600160a01b0316805f52600360205260405f20600160ff1982541617905533907fbcc778b1735935d8f1de4988aa99c5a443739e2fb826dc7aa3f3bf64bb115fb85f80a3005b506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016331415610901565b3461013d57602036600319011261013d576001600160a01b036109a16112e5565b165f526006602052602060ff60405f2054166040519015158152f35b3461013d57604036600319011261013d576109d66112e5565b6001600160a01b036109e66112fb565b91165f5260046020526001600160a01b0360405f2091165f526020526040805f205467ffffffffffffffff8251916001600160801b038116835260801c166020820152f35b3461013d57604036600319011261013d57610a446112e5565b602435908115159081830361013d576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b031691821561043d577f5f7c8bcc9fe1f59809d268c8cf6b63a36c4aedb54e3a40628113344d5620dd4591610ad7602092855f526006845260405f209060ff801983541691151516179055565b604051908152a2005b3461013d575f36600319011261013d576040516040810181811067ffffffffffffffff821117610b665760405260148152604060208201917f506f6c69637952656769737472792d312e302e3000000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b634e487b7160e01b5f52604160045260245ffd5b3461013d57602036600319011261013d57610b936112e5565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b0316805f52600360205260405f2060ff1981541690557ff70670b858d56ee8e00bdc112191de0411959259f47dcbc6977aace0aee117655f80a2005b3461013d575f36600319011261013d5760206001600160a01b0360075416604051908152f35b3461013d575f36600319011261013d576020604051620151808152f35b3461013d57610c5736611356565b91906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610630576001600160a01b031690811561043d5781807f92249bcccf66629d53d2829a1c6769f4d5d74bc9d8bc6aa08ab9f00c7f89fcfc610cc58661146f565b60208701610e72610cd58261146f565b9660408a0193610ce485611415565b9160608c0192610dc46001600160801b03610cfe8661147c565b92610d07611429565b951515865260208601809e1515905281604087019116815267ffffffffffffffff6060870194168452610d8e6001600160a01b03608088019660018852169e8f9d8e5f52600160205260405f20905f52602052610d7760405f2098511515899060ff801983541691151516179055565b51875461ff00191690151560081b61ff0016178755565b51855471ffffffffffffffffffffffffffffffff00001916911660101b71ffffffffffffffffffffffffffffffff000016178455565b51907fffffffffff000000000000000000ffffffffffffffffffffffffffffffffffff79ffffffffffffffff00000000000000000000000000000000000084549260ff60d01b9051151560d01b169360901b16911617179055610e35610e2f6102fe6102f88d61146f565b9161147c565b906040519485948592936001600160801b0367ffffffffffffffff9296956060946080870198151587521515602087015216604085015216910152565b0390a36080830191610e848385611491565b9390505f5b848110610e9257005b80610ea66103a66001936103a0868b611491565b855f52600260205260405f20855f5260205260405f209063ffffffff60e01b1690815f5260205260405f208360ff1982541617905584867fdae56faaf89f401e21b133aee83453dde734ae5b8d6d672919900921f1e627806020604051878152a401610e89565b3461013d57604036600319011261013d57610f266112e5565b6001600160a01b03610f366112fb565b91610f3f611449565b50165f5260016020526001600160a01b0360405f2091165f5260205260a060405f20610f69611429565b905467ffffffffffffffff60ff82161515928381526001600160801b036020820160ff8560081c16151581526040830190828660101c16825260ff60806060860195878960901c168752019660d01c1615158652604051968752511515602087015251166040850152511660608301525115156080820152f35b3461013d57604036600319011261013d57610ffc6112e5565b6001600160a01b0361100c6112fb565b91611015611449565b50165f525f6020526001600160a01b0360405f2091165f5260205260a060405f2061103e611429565b67ffffffffffffffff8254916001600160801b03831693848252602082019360801c84526001600160801b0360026001830154926040850193845201549460ff608060608601958789168752019660401c161515865260405196875251166020860152516040850152511660608301525115156080820152f35b3461013d576110c636611311565b916001600160a01b0360075416331415806112b2575b61044c576001600160a01b03906110f283611779565b1691825f525f60205260405f206001600160a01b0383165f5260205260405f209160ff600284015460401c16156104105782546001600160801b038116806112ad57505f195b6001600160801b0361114985611415565b16611296575f195b11908115611273575b508015611262575b610410576001600160a01b037f9984473f7cade7b75b6eb54c38d7958684489452a04379c6d91de87da74375fe91611237600161120d611207876001600160801b036111ae8c9a611415565b166001600160801b03198b5416178a5560208101996111f86111cf8c611415565b82546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff1916178255565b60408201359485910155611415565b97611415565b6040519485941697846001600160801b036040929594938160608401971683521660208201520152565b0390a333907f4d156b5f26f59392a109b67021b0a170f0ea10ac562c1538dee681f1727151e65f80a3005b506001830154604083013511611162565b90506001600160801b0361128960208501611415565b9160801c9116118561115a565b6001600160801b036112a785611415565b16611151565b611138565b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314156110dc565b600435906001600160a01b038216820361013d57565b602435906001600160a01b038216820361013d57565b60c060031982011261013d576004356001600160a01b038116810361013d57916024356001600160a01b038116810361013d5760809092604319011261013d57604490565b606060031982011261013d576004356001600160a01b038116810361013d57916024356001600160a01b038116810361013d57916044359067ffffffffffffffff821161013d5760a090829003600319011261013d5760040190565b60a090600319011261013d576004356001600160a01b038116810361013d57906024356001600160a01b038116810361013d57906044356001600160a01b038116810361013d5790606435906084356001600160e01b03198116810361013d5790565b356001600160801b038116810361013d5790565b6040519060a0820182811067ffffffffffffffff821117610b6657604052565b611451611429565b905f82525f60208301525f60408301525f60608301525f6080830152565b35801515810361013d5790565b3567ffffffffffffffff8116810361013d5790565b903590601e198136030182121561013d570180359067ffffffffffffffff821161013d57602001918160051b3603831361013d57565b91908110156114d75760051b0190565b634e487b7160e01b5f52603260045260245ffd5b356001600160e01b03198116810361013d5790565b9190820180921161150d57565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b039095949293919561153985611779565b16805f52600360205260ff60405f20541661176c575f19955f94825f525f60205260405f206001600160a01b0382165f5260205260405f20600281015460ff8160401c166116b5575b505050815f52600160205260405f206001600160a01b0382165f5260205260405f20549360ff8560d01c166115c6575b50505050506115c0575f9190565b60019190565b60ff8516156116a657825f52600260205260405f206001600160a01b0383165f5260205260405f209063ffffffff60e01b165f5260205260ff60405f205416156116985767ffffffffffffffff8460901c169182611640575b5050505060081c60ff16611638575b5f808080806115b2565b50600161162e565b9161166d9161167294935f5260056020526001600160a01b0360405f2091165f5260205260405f20611789565b611500565b6001600160801b038260101c161061168d575f80808061161f565b505090506002905f90565b505050505090506002905f90565b50505050505090506002905f90565b908092995054988960801c861161175b578561166d60019361170193885f5260046020526001600160a01b0360405f2091165f5260205267ffffffffffffffff60405f20911690611789565b9101549081811161174b57810390811161150d57966001600160801b03168015159081611740575b50611737575b5f8080611582565b6001945061172f565b90508310155f611729565b5050505050505090506002905f90565b505050505050505090506002905f90565b5050505090506002905f90565b6001600160a01b03161561043d57565b9067ffffffffffffffff61179f6117b6926118a6565b9254921667ffffffffffffffff8360801c16611500565b4210156117c9576001600160801b031690565b505f90565b916117db61184d926118a6565b6117fe67ffffffffffffffff8554921667ffffffffffffffff8360801c16611500565b4210611898577fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff164260801b77ffffffffffffffff00000000000000000000000000000000161783555f611500565b6001600160801b0381116118815781546fffffffffffffffffffffffffffffffff19166001600160801b0391909116179055565b6306dfcc6560e41b5f52608060045260245260445ffd5b6001600160801b0316611500565b67ffffffffffffffff81166118bd57506201518090565b9056fea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/REGISTRY_ADDRESS.md b/api/@aastar/sdk/variables/REGISTRY_ADDRESS.md new file mode 100644 index 000000000..6b65081bf --- /dev/null +++ b/api/@aastar/sdk/variables/REGISTRY_ADDRESS.md @@ -0,0 +1,3 @@ +> **REGISTRY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L29) diff --git a/api/@aastar/sdk/variables/REPUTATION_SYSTEM_ADDRESS.md b/api/@aastar/sdk/variables/REPUTATION_SYSTEM_ADDRESS.md new file mode 100644 index 000000000..4cab293a4 --- /dev/null +++ b/api/@aastar/sdk/variables/REPUTATION_SYSTEM_ADDRESS.md @@ -0,0 +1,3 @@ +> **REPUTATION\_SYSTEM\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:33](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L33) diff --git a/api/@aastar/sdk/variables/ROLE_ANODE.md b/api/@aastar/sdk/variables/ROLE_ANODE.md new file mode 100644 index 000000000..96eb18d69 --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_ANODE.md @@ -0,0 +1,29 @@ +> `const` **ROLE\_ANODE**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L84) + +ANODE Role (Anonymous Node) + +## Description + +Anonymous infrastructure node operator + +## Permission + +Infrastructure operator + +## Requirement + +minStake: 20 GT, ticketPrice: 2 GT (line 95) + +## Exit Fee + +10% (1000 basis points), min 1 GT + +## Lock Duration + +30 days + +## Source + +Registry.sol line 37: ROLE_ANODE = keccak256("ANODE") diff --git a/api/@aastar/sdk/variables/ROLE_COMMUNITY.md b/api/@aastar/sdk/variables/ROLE_COMMUNITY.md new file mode 100644 index 000000000..34ad3d6b2 --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_COMMUNITY.md @@ -0,0 +1,29 @@ +> `const` **ROLE\_COMMUNITY**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L27) + +Community Role + +## Description + +Community administrator, can issue xPNTs, configure SBT rules + +## Permission + +Community-level governance + +## Requirement + +minStake: 30 GT, ticketPrice: 3 GT (line 99) + +## Exit Fee + +5% (500 basis points), min 1 GT + +## Lock Duration + +30 days + +## Source + +Registry.sol line 32: ROLE_COMMUNITY = keccak256("COMMUNITY") diff --git a/api/@aastar/sdk/variables/ROLE_DVT.md b/api/@aastar/sdk/variables/ROLE_DVT.md new file mode 100644 index 000000000..32d61d389 --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_DVT.md @@ -0,0 +1,29 @@ +> `const` **ROLE\_DVT**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:73](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L73) + +DVT Role (Distributed Validator Technology) + +## Description + +DVT node operator for consensus validation + +## Permission + +Infrastructure operator + +## Requirement + +minStake: 30 GT, ticketPrice: 3 GT (line 94) + +## Exit Fee + +10% (1000 basis points), min 1 GT + +## Lock Duration + +30 days + +## Source + +Registry.sol line 36: ROLE_DVT = keccak256("DVT") diff --git a/api/@aastar/sdk/variables/ROLE_ENDUSER.md b/api/@aastar/sdk/variables/ROLE_ENDUSER.md new file mode 100644 index 000000000..329b3d4b1 --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_ENDUSER.md @@ -0,0 +1,33 @@ +> `const` **ROLE\_ENDUSER**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:39](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L39) + +End User Role + +## Description + +Community member, can participate and use gasless transactions + +## Permission + +Basic user level + +## Requirement + +minStake: 0.3 GT, ticketPrice: 0.05 GT (line 100) + +## Additional Requirement + +Must hold MySBT from community + +## Exit Fee + +10% (1000 basis points), min 0.05 GT + +## Lock Duration + +7 days + +## Source + +Registry.sol line 33: ROLE_ENDUSER = keccak256("ENDUSER") diff --git a/api/@aastar/sdk/variables/ROLE_KMS.md b/api/@aastar/sdk/variables/ROLE_KMS.md new file mode 100644 index 000000000..9026ebb23 --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_KMS.md @@ -0,0 +1,29 @@ +> `const` **ROLE\_KMS**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L95) + +KMS Role (Key Management Service) + +## Description + +KMS operator for secure key storage and management + +## Permission + +Infrastructure operator (highest stake) + +## Requirement + +minStake: 100 GT, ticketPrice: 10 GT (line 98) + +## Exit Fee + +10% (1000 basis points), min 5 GT + +## Lock Duration + +30 days + +## Source + +Registry.sol line 38: ROLE_KMS = keccak256("KMS") diff --git a/api/@aastar/sdk/variables/ROLE_NAMES.md b/api/@aastar/sdk/variables/ROLE_NAMES.md new file mode 100644 index 000000000..1f1cd549c --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_NAMES.md @@ -0,0 +1,3 @@ +> `const` **ROLE\_NAMES**: `Record`\<`string`, `string`\> + +Defined in: [packages/core/src/roles.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L128) diff --git a/api/@aastar/sdk/variables/ROLE_PAYMASTER_AOA.md b/api/@aastar/sdk/variables/ROLE_PAYMASTER_AOA.md new file mode 100644 index 000000000..fc82f143d --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_PAYMASTER_AOA.md @@ -0,0 +1,29 @@ +> `const` **ROLE\_PAYMASTER\_AOA**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:50](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L50) + +Paymaster AOA Role (Account Ownership Authentication) + +## Description + +Basic Paymaster node operator with account-based auth + +## Permission + +Infrastructure operator + +## Requirement + +minStake: 30 GT, ticketPrice: 3 GT (line 92) + +## Exit Fee + +10% (1000 basis points), min 1 GT + +## Lock Duration + +30 days + +## Source + +Registry.sol line 34: ROLE_PAYMASTER_AOA = keccak256("PAYMASTER_AOA") diff --git a/api/@aastar/sdk/variables/ROLE_PAYMASTER_SUPER.md b/api/@aastar/sdk/variables/ROLE_PAYMASTER_SUPER.md new file mode 100644 index 000000000..716c459dc --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_PAYMASTER_SUPER.md @@ -0,0 +1,33 @@ +> `const` **ROLE\_PAYMASTER\_SUPER**: [`Hash`](https://viem.sh/docs/index.html) + +Defined in: [packages/core/src/roles.ts:62](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L62) + +Paymaster Super Role + +## Description + +Advanced Paymaster operator, can use SuperPaymaster with aPNTs collateral + +## Permission + +Infrastructure operator (higher tier) + +## Requirement + +minStake: 50 GT, ticketPrice: 5 GT (line 93) + +## Additional Requirement + +aPNTs collateral in SuperPaymaster contract + +## Exit Fee + +10% (1000 basis points), min 2 GT + +## Lock Duration + +30 days + +## Source + +Registry.sol line 35: ROLE_PAYMASTER_SUPER = keccak256("PAYMASTER_SUPER") diff --git a/api/@aastar/sdk/variables/ROLE_PERMISSION_LEVELS.md b/api/@aastar/sdk/variables/ROLE_PERMISSION_LEVELS.md new file mode 100644 index 000000000..e5b105d53 --- /dev/null +++ b/api/@aastar/sdk/variables/ROLE_PERMISSION_LEVELS.md @@ -0,0 +1,3 @@ +> `const` **ROLE\_PERMISSION\_LEVELS**: `Record`\<`string`, [`RolePermissionLevel`](../enumerations/RolePermissionLevel.md)\> + +Defined in: [packages/core/src/roles.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/roles.ts#L157) diff --git a/api/@aastar/sdk/variables/RegistryABI.md b/api/@aastar/sdk/variables/RegistryABI.md new file mode 100644 index 000000000..486d076e4 --- /dev/null +++ b/api/@aastar/sdk/variables/RegistryABI.md @@ -0,0 +1,3 @@ +> `const` **RegistryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L59) diff --git a/api/@aastar/sdk/variables/RegistryArtifact.md b/api/@aastar/sdk/variables/RegistryArtifact.md new file mode 100644 index 000000000..06c67d50f --- /dev/null +++ b/api/@aastar/sdk/variables/RegistryArtifact.md @@ -0,0 +1,13 @@ +> `const` **RegistryArtifact**: `object` = `RegistryABIData` + +Defined in: [packages/core/src/abis/index.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L60) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `never`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a08060405234610123573315610110575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055306080525f5160206160a55f395f51905f525460ff8160401c16610101576002600160401b03196001600160401b038216016100ae575b604051615f7d9081610128823960805181818161437801526144140152f35b6001600160401b0319166001600160401b039081175f5160206160a55f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f8061008f565b63f92ee8a960e01b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306a36aee14614e735750806311c85b0b14614e3b57806315de32ca14614ddf57806317e1c59514614b1257806319c46e8114614aec5780631b02e44f146147a35780632c333e25146146f65780633cd01548146146b1578063424a3d77146146285780634b8b8a6e146145fe5780634f1ef286146143d757806352d1902d1461435e57806354fd4d50146142ff5780635c445412146142c75780635ee05b1714613cab5780636229738c14613c2b57806364c39a4314613bd0578063669d776214613751578063715018a6146136ff578063727b52a514612f215780637d960e3714612ebe578063826600ce14612e975780638da5cb5b14612e715780638ff39099146124d7578063913e6779146124a7578063919d1e2c1461248057806391d1485414612435578063ad3cb1cc146123e8578063af5eda02146123be578063b198899514612363578063b5e936ab1461217f578063bb2ae6bf14612013578063bb8ca25914611efa578063bc95910114611e8d578063be30742f14611e66578063bf28c98a14611e29578063c0c53b8b146105a7578063cd5d1e7414610525578063ce830e7b146102d9578063e20bce2e146102bb578063e79e97391461023f5763f2fde38b146101ec575f80fd5b3461023c57602036600319011261023c57610205614f24565b61020d615512565b6001600160a01b038116156102285761022590615d51565b80f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b503461023c57602036600319011261023c576001600160a01b03610261614f24565b610269615512565b1680156102ac576001600160a01b03600454828219821617600455167f1f7cd67c986d0cce4aa6f69075b5278a05438ef2a5d1abf6eeded51ba81232458380a380f35b63e481c26960e01b8252600482fd5b503461023c578060031936011261023c576020601754604051908152f35b503461023c57608036600319011261023c576102f3614f24565b906024356001600160401b03811161052157610313903690600401614fd7565b906044356001600160401b03811161051d57610333903690600401614fd7565b9190926064356001600160401b038111610519579061035e6001600160a01b03923690600401614f64565b929097610369615538565b1694851561050a576001600160a01b036005541633036104fb578482036104ec5760c882116104dd576001600160a01b03600454169283156104ce5780156104bf57601754600181018091116104ab5798610421918a8a9b601755604051602081019146835260408201528a606082015260a060808201526104188161040a6103f78c8b60c085019161524c565b828103601f190160a08401528d8a6154d8565b03601f198101835282615052565b51902091615bdd565b823b156104a75761045e956104708896928793604051998a9889978896632fa66a7f60e11b8852600488015260606024880152606487019161524c565b848103600319016044860152916154d8565b03925af1801561049c57610487575b506001805580f35b8161049191615052565b61023c57805f61047f565b6040513d84823e3d90fd5b8680fd5b634e487b7160e01b89526011600452602489fd5b635599c7cb60e11b8852600488fd5b63cf8d29eb60e01b8852600488fd5b6305beb17160e11b8752600487fd5b638b140a8160e01b8752600487fd5b635cfb0e7f60e01b8752600487fd5b633494a40d60e21b8752600487fd5b8580fd5b8380fd5b5080fd5b503461023c57602036600319011261023c5761053f614f24565b610547615512565b6001600160a01b03811690811590811561059d575b506102ac576001600160a01b03600354828219821617600355167f171f7dbde35aed7cddf3ece2dad8f4eb62443a3d6bf8616586da6fd03c6b4ed98380a380f35b90503b155f61055c565b503461023c57606036600319011261023c576105c1614f24565b6105c9614f3a565b6044356001600160a01b03811680910361051d577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549160ff8360401c1615926001600160401b03811680159081611e21575b6001149081611e17575b159081611e0e575b50611dff5767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005583611dc0575b5061067484615d51565b6001600160a01b03166001600160a01b031960025416176002556001600160a01b03196003541617600355826040516106ac81615007565b6801a055690d9db800008152602081016729a2241af62c000081526040820194600a865260608301916002835260808401966001885260a0850190600a825260c086016103e8815260e087019060018252610100880193670de0b6b3a7640000855260209b8c98604051976107218b8a615052565b8c89526101208c019889526101408c01996001600160a01b03169c8d8b526101608d019b62278d008d525f516020615f515f395f51905f52825260069052604090209b518c555160018c015560028b01955163ffffffff1663ffffffff1663ffffffff198754161786555163ffffffff166107b990869067ffffffff0000000082549160201b169067ffffffff000000001916179055565b51845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b5761085b826108558554615144565b85615305565b88908a601f8411600114611d505792806001600160a01b039593610898936006999896926117e0575b50508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611d46575b611ce5575b50506040516108e781615007565b6802b5e3af16b188000081528385818301674563918244f40000815260408401600a8152606085019060028252608086016001815260a08701600a815260c08801906103e8825260e0890192600184526101008a0195671bc16d674ec800008752604051976109568b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081525f516020615f315f395f51905f528c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b57610a6b826108558554615144565b88908a601f8411600114611c755792806001600160a01b039593610aa7936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611c6b575b611c0a575b5050604051610af681615007565b6801a055690d9db80000815283858183016729a2241af62c0000815260408401600a8152606085019060028252608086016001815260a08701600a815260c08801906103e8825260e0890192600184526101008a0195670de0b6b3a7640000875260405197610b658b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081527f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d8c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b57610c8d826108558554615144565b88908a601f8411600114611b9a5792806001600160a01b039593610cc9936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611b90575b611b1c575b5050604051610d1881615007565b6801158e460913d0000081528385818301671bc16d674ec80000815260408401600f8152606085019060018252608086016001815260a087016005815260c08801906103e8825260e0890192600184526101008a0195670de0b6b3a7640000875260405197610d878b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081527f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a8c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b57610eaf826108558554615144565b88908a601f8411600114611aac5792806001600160a01b039593610eeb936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b036002541680151580611aa2575b611a2e575b5050604051610f3a81615007565b68056bc75e2d6310000081528385818301678ac7230489e8000081526040840160058152606085019060058252608086016002815260a087016014815260c08801906103e8825260e0890192600184526101008a0195674563918244f40000875260405197610fa98b8a615052565b8989526101208c019889526101408c018d815262278d006101608e019081527f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f88c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b576110d1826108558554615144565b88908a601f84116001146119be5792806001600160a01b03959361110d936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b0360025416801515806119b4575b611940575b505060405161115c81615007565b84815283858183016801a055690d9db8000081526040840182815260608501908382526080860184815260a0870185815260c088019086825260e0890192600184526101008a0195888752604051976111b58b8a615052565b8989526101208c019889526101408c018d81526101608d018b81525f516020615f115f395f51905f528c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b576112c6826108558554615144565b88908a601f84116001146118d05792806001600160a01b039593611302936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b0360025416801515806118c6575b61186f575b505060405161135181615007565b8481528385818301670429d069189e000081526040840182815260608501908382526080860184815260a0870185815260c088019086825260e0890192600184526101008a0195888752604051976113a98b8a615052565b8989526101208c019889526101408c018d81526101608d018b81525f516020615ef15f395f51905f528c526006909c526040909a209b518c555160018c0155945160028b018054965167ffffffff0000000060209190911b1663ffffffff90921667ffffffffffffffff199097169690961717855551845463ffffffff60401b191660409190911b63ffffffff60401b1617845551835463ffffffff60601b191660609190911b63ffffffff60601b1617835551825461ffff60801b191660809190911b61ffff60801b1617825551815460ff60901b191690151560901b60ff60901b1617905551600385015551805160048501916001600160401b03821161185b576114ba826108558554615144565b88908a601f84116001146117eb5792806001600160a01b0395936114f6936006999896926117e05750508160011b915f199060031b1c19161790565b90555b51166001600160a01b036005850191166001600160a01b031982541617905551910155836001600160a01b0360025416801515806117d6575b61177f575b50600190526013835268056bc75e2d631000006040852055600284526013835268056bc75e2d6310000060408520556003845260138352681043561a882930000060408520556004845260138352682086ac35105260000060408520556005845260138352683635c9adc5dea0000060408520556006845260138352686c6b935b8bbd4000006040852055601654600160401b81101561176b578060016115e392016016556016615122565b81549060031b90600d821b915f19901b1916179055601654600160401b81101561176b5780600161161992016016556016615122565b81549060031b906022821b915f19901b1916179055601654600160401b81101561176b5780600161164f92016016556016615122565b81549060031b906059821b915f19901b1916179055601654600160401b81101561176b5780600161168592016016556016615122565b81549060031b9060e9821b915f19901b1916179055601654600160401b81101561176b578060016116bb92016016556016615122565b81549060031b90610262821b915f19901b191617905583526014825260408320600160ff198254161790556116ee575080f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29068ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560405160018152a180f35b634e487b7160e01b85526041600452602485fd5b81906040518287820191636b26335560e11b83525f516020615ef15f395f51905f526024820152816044820152816064820152606481526117c1608482615052565b51925af1506117ce6153e4565b50835f611537565b50803b1515611532565b015190505f80610884565b50838b52898b209190601f1984168c5b8c82821061184557505092600192859260069998966001600160a01b0398961061182d575b505050811b0190556114f9565b01515f1960f88460031b161c191690555f8080611820565b60018596829396860151815501950193016117fb565b634e487b7160e01b8a52604160045260248afd5b81906040518287820191636b26335560e11b83525f516020615f115f395f51905f526024820152816044820152816064820152606481526118b1608482615052565b51925af1506118be6153e4565b50835f611343565b50803b151561133e565b50838b52898b209190601f1984168c5b8c82821061192a57505092600192859260069998966001600160a01b03989610611912575b505050811b019055611305565b01515f1960f88460031b161c191690555f8080611905565b60018596829396860151815501950193016118e0565b81906040518287820191636b26335560e11b83527f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f860248201526103e86044820152674563918244f4000060648201526064815261199f608482615052565b51925af1506119ac6153e4565b50835f61114e565b50803b1515611149565b50838b52898b209190601f1984168c5b8c828210611a1857505092600192859260069998966001600160a01b03989610611a00575b505050811b019055611110565b01515f1960f88460031b161c191690555f80806119f3565b60018596829396860151815501950193016119ce565b81906040518287820191636b26335560e11b83527f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a60248201526103e86044820152670de0b6b3a7640000606482015260648152611a8d608482615052565b51925af150611a9a6153e4565b50835f610f2c565b50803b1515610f27565b50838b52898b209190601f1984168c5b8c828210611b0657505092600192859260069998966001600160a01b03989610611aee575b505050811b019055610eee565b01515f1960f88460031b161c191690555f8080611ae1565b6001859682939686015181550195019301611abc565b81906040518287820191636b26335560e11b83527f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d60248201526103e86044820152670de0b6b3a7640000606482015260648152611b7b608482615052565b51925af150611b886153e4565b50835f610d0a565b50803b1515610d05565b50838b52898b209190601f1984168c5b8c828210611bf457505092600192859260069998966001600160a01b03989610611bdc575b505050811b019055610ccc565b01515f1960f88460031b161c191690555f8080611bcf565b6001859682939686015181550195019301611baa565b81906040518287820191636b26335560e11b83525f516020615f315f395f51905f5260248201526103e86044820152671bc16d674ec80000606482015260648152611c56608482615052565b51925af150611c636153e4565b50835f610ae8565b50803b1515610ae3565b50838b52898b209190601f1984168c5b8c828210611ccf57505092600192859260069998966001600160a01b03989610611cb7575b505050811b019055610aaa565b01515f1960f88460031b161c191690555f8080611caa565b6001859682939686015181550195019301611c85565b81906040518287820191636b26335560e11b83525f516020615f515f395f51905f5260248201526103e86044820152670de0b6b3a7640000606482015260648152611d31608482615052565b51925af150611d3e6153e4565b50835f6108d9565b50803b15156108d4565b50838b52898b209190601f1984168c5b8c828210611daa57505092600192859260069998966001600160a01b03989610611d92575b505050811b01905561089b565b01515f1960f88460031b161c191690555f8080611d85565b6001859682939686015181550195019301611d60565b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f61066a565b63f92ee8a960e01b8652600486fd5b9050155f61062e565b303b159150610626565b85915061061c565b503461023c57602036600319011261023c5760ff60406020926001600160a01b03611e52614f24565b168152601484522054166040519015158152f35b503461023c578060031936011261023c5760206001600160a01b0360055416604051908152f35b503461023c57602036600319011261023c576001600160a01b03611eaf614f24565b611eb7615512565b1680156102ac576001600160a01b03600554828219821617600555167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b503461023c57602036600319011261023c576004356001600160401b03811161052157611f2b903690600401614fd7565b611f33615512565b6001600160a01b036002541690835b818110611f4d578480f35b80611f5b600192848761528d565b3580875260066020528660408120600281015460ff8160901c16611f84575b5050505001611f42565b61040a611fcb60038594015460405192839161ffff6020840196636b26335560e11b885260801c16896024850161ffff604092959493606083019683521660208201520152565b519082895af1611fd96153e4565b5015611fe8575b868180611f7a565b847f3e9fc4a04e1f2759edf7001e63923124a42c59aef874442b88cdb30685c8833e8880a35f611fe0565b503461023c57602036600319011261023c576004356001600160401b03811161052157612044903690600401614fd7565b61204c615512565b6014811161217057601654836016558061212f575b50825b81811061206f578380f35b801515806120f0575b6120e15761208781838561528d565b35601654600160401b8110156120cd57906120c56120af836001809695016016556016615122565b819391549060031b91821b915f19901b19161790565b905501612064565b634e487b7160e01b86526041600452602486fd5b637342d4e360e11b8452600484fd5b506120fc81838561528d565b355f19820182811161211b5761211390848661528d565b351015612078565b634e487b7160e01b86526011600452602486fd5b60168452835b8181106121425750612061565b60019085817fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289015501612135565b63194a3c0f60e11b8352600483fd5b503461023c57602036600319011261023c578060405161219e81615007565b8181528160208201528160408201528160608201528160808201528160a08201528160c08201528160e082015281610100820152610120810160609052816101408201526101600152600435815260066020526040902060405161220181615007565b81548152600182015491602082019283526002810154604083019063ffffffff8116825260608401908060201c63ffffffff16825260808501908060401c63ffffffff16825260a086018160601c63ffffffff16815260c08701908260801c61ffff16825260e088019260901c60ff1615158352600387015493610100890194855260405195868060048b01906122979161517c565b036122a29088615052565b6101208a0196875260058901546001600160a01b0316986101408b01998a5260060154976101608b019889526040519b8c9b60208d525160208d01525160408c01525163ffffffff1660608b01525163ffffffff1660808a01525163ffffffff1660a08901525163ffffffff1660c08801525161ffff1660e08701525115156101008601525161012085015251610140840161018090526101a08401612347916150d2565b91516001600160a01b0316610160840152516101808301520390f35b503461023c57602036600319011261023c57600435906001600160401b03821161023c5760206001600160a01b038161239f3660048701614f64565b91908260405193849283378101600e8152030190205416604051908152f35b503461023c57602036600319011261023c5760406020916004358152601383522054604051908152f35b503461023c578060031936011261023c575061243160405161240b604082615052565b60058152640352e302e360dc1b60208201526040519182916020835260208301906150d2565b0390f35b503461023c57604036600319011261023c576001600160a01b036040612459614f3a565b92600435815260076020522091165f52602052602060ff60405f2054166040519015158152f35b503461023c578060031936011261023c5760206001600160a01b0360045416604051908152f35b503461023c57604036600319011261023c5760206124cf6124c6614f24565b60243590615430565b604051908152f35b503461023c57602036600319011261023c576001600160a01b036124f9614f24565b612501615512565b168015612e62576001600160a01b036002548282198216176002555f516020615f515f395f51905f5284526006602052836040812060405161254281615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c1615158252610160600660038601549561010084019687526040516125da816125d3816004860161517c565b0382615052565b61012085015289600582015416610140850152015491015251612dfd575b50505f516020615f315f395f51905f5290526006602052836040812060405161262081615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c1615158252610160600660038601549561010084019687526040516126b1816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612d98575b50507f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d90526006602052836040812060405161270a81615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c16151582526101606006600386015495610100840196875260405161279b816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612d20575b50507f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a9052600660205283604081206040516127f481615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c161515825261016060066003860154956101008401968752604051612885816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612ca8575b50507f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f89052600660205283604081206040516128de81615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c16151582526101606006600386015495610100840196875260405161296f816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612c30575b50505f516020615f115f395f51905f529052600660205283604081206040516129b581615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c161515825261016060066003860154956101008401968752604051612a46816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612bcb575b50505f516020615ef15f395f51905f52905260066020528360408120604051612a8c81615007565b8154815260018201546020820152600282015463ffffffff8116604083015263ffffffff8160201c16606083015263ffffffff8160401c16608083015263ffffffff8160601c1660a083015260c082019161ffff8260801c16835260ff60e082019260901c161515825261016060066003860154956101008401968752604051612b1d816125d3816004860161517c565b61012085015289600582015416610140850152015491015251612b66575b505050167f7042586b23181180eb30b4798702d7a0233b7fc2551e89806770e8e5d9392e6a8380a380f35b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615ef15f395f51905f5260248401526044830152606482015260648152612bb5608482615052565b51925af150612bc26153e4565b50835f80612b3b565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615f115f395f51905f5260248401526044830152606482015260648152612c1a608482615052565b51925af150612c276153e4565b50835f80612a64565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85527f6fb2b25080d21c908f32ff8ff99eb1d552c210854f7de48a40406764c09c68f860248401526044830152606482015260648152612c92608482615052565b51925af150612c9f6153e4565b50835f8061298d565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85527f3aa2e9509f29532b71f822e18bcde843a8070a508d564188ec8a6adf59eff28a60248401526044830152606482015260648152612d0a608482615052565b51925af150612d176153e4565b50835f806128a3565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85527f3b5016dc6721b132ddcb7027030b137a739df81e419695dae0899a866c1c514d60248401526044830152606482015260648152612d82608482615052565b51925af150612d8f6153e4565b50835f806127b9565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615f315f395f51905f5260248401526044830152606482015260648152612de7608482615052565b51925af150612df46153e4565b50835f806126cf565b82918261ffff87600254169351169151604051906020820193636b26335560e11b85525f516020615f515f395f51905f5260248401526044830152606482015260648152612e4c608482615052565b51925af150612e596153e4565b50835f806125f8565b633494a40d60e21b8252600482fd5b503461023c578060031936011261023c576001600160a01b036020915416604051908152f35b503461023c578060031936011261023c5760206001600160a01b0360025416604051908152f35b503461023c57606036600319011261023c57612ed8614f24565b6001600160a01b03600254163303612f1357602435825260086020526001600160a01b036040832091165f5260205260405f20604435905580f35b6282b42960e81b8252600482fd5b503461023c57602036600319011261023c57600435612f3e615538565b8082526007602052604082206001600160a01b0333165f5260205260ff60405f205416156136e957600254604051637c50309f60e01b81523360048201526024810183905290602090829060449082906001600160a01b03165afa9081156132265783916136b7575b508183526007602052604083206001600160a01b0333165f5260205260405f2060ff198154169055612fd93383615d8e565b3383526010602052604083205461369a575b338352600f6020526040832091825492845b84811061360a575b50509091505f516020615f515f395f51905f52811415806135f3575b613411575b338352601060205260408320541561333d575b8291613079575b6040519182524260208301527f0d9361411a652b66cd4aed24a96d36c0b048899896c927d879a9d3ba2790d9c660403393a36001805580f35b80915082526006602052600660408320015480613231575b50600254604051637c50309f60e01b81523360048201526024810183905290602090829060449082906001600160a01b03165afa9081156132265783916131f4575b5081604051828152604060208201526004604082015263115e1a5d60e21b60608201527fe80f99d9789e367c229c526d3d3f84d44d3daf77ea65f7bbe8510f176ac45a2360803392a38183526008602052604083206001600160a01b0333165f526020528260405f20556001600160a01b03600254166020604051809263374e4d7360e01b8252818781613181893360048401602090939291936001600160a01b0360408201951681520152565b03925af19081156131e95784916131b3575b50808211156131ab576131a5916152b1565b90613040565b5050816131a5565b90506020813d6020116131e1575b816131ce60209383615052565b810103126131dd57515f613193565b5f80fd5b3d91506131c1565b6040513d86823e3d90fd5b90506020813d60201161321e575b8161320f60209383615052565b810103126131dd57515f6130d3565b3d9150613202565b6040513d85823e3d90fd5b6002546040516318581cf760e11b815233600482015260248101849052908490829060449082906001600160a01b03165afa80156131e95784906132b3575b65ffffffffffff91501690810180911161329f574210613290575f613091565b6314bc3b5b60e11b8252600482fd5b634e487b7160e01b83526011600452602483fd5b503d8085833e6132c38183615052565b81019060a081830312613339576132d981615413565b506132e660208201615413565b5060408101519065ffffffffffff82168203610519576080810151906001600160401b0382116104a7570182601f820112156105195765ffffffffffff9281602061333393519101615375565b50613270565b8480fd5b826001600160a01b0360045416806133c2575b50806001600160a01b036003541660405182602082019163374e7fa360e01b835233602482015260248152613386604482615052565b51925af16133926153e4565b506130395780337ff6da96ea84a034d6f30b7b377637742735f36f14cfda9144397e4f1e69116f4a8580a3613039565b803b15610521578180916044604051809481936351cb857360e11b83523360048401528160248401525af1801561049c5715613350578161340291615052565b61340d57825f613350565b8280fd5b5f516020615f115f395f51905f5281146134c1575b808352600c602052604083206001600160a01b0333165f526020528260405f206134508154615144565b8061347e575b5050819052600b602052604083206001600160a01b0333165f526020528260405f2055613026565b601f81116001146134945750555b825f80613456565b818352602083206134b191601f0160051c5f1901906001016152ea565b808252816020812091555561348c565b808352600c602052604083206001600160a01b0333165f526020526125d36134f260405f206040519283809261517c565b805180613501575b5050613426565b8101906020820190602081840312610519576020810151906001600160401b0382116104a7570191606090839003126133395760405161354081615037565b60208301516001600160401b0381116104a757826020613562928601016153ab565b81526040830151916001600160401b0383116104a75761358c60609160206135a1958701016153ab565b936020830194855201516040820152516153c5565b805473ffffffffffffffffffffffffffffffffffffffff1916905551805180156134fa5760209181839260405194859301835e8101600e8152030190206001600160a01b031981541690555f806134fa565b505f516020615f315f395f51905f52811415613021565b826136158284615122565b90549060031b1c1461362957600101612ffd565b909192935f19810190811161211b576120af6136486136569285615122565b90549060031b1c9284615122565b905580548015613686575f19019061366e8282615122565b8154905f199060031b1b191690555581905f80613005565b634e487b7160e01b85526031600452602485fd5b3383526010602052604083206136b081546152be565b9055612feb565b90506020813d6020116136e1575b816136d260209383615052565b810103126131dd57515f612fa7565b3d91506136c5565b633a401ef360e21b825260045233602452604490fd5b503461023c578060031936011261023c57613718615512565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461023c5761376036614f91565b61376c93929193615538565b6001600160a01b038216938415613bb357843303613bc2576108008211613bb35783865260066020526040862092604051916137a783615007565b8454835260018501549460208401958652600660028201549163ffffffff8316604087015263ffffffff8360201c16606087015263ffffffff8360401c16608087015263ffffffff8360601c1660a087015261ffff8360801c1660c087015260ff60e087019360901c16151583526003810154610100870152604051613834816125d3816004860161517c565b6101208701526001600160a01b036005820154166101408701520154610160850152511580613b9b5750858852600760205260408820875f5260205260ff60405f20541693848095613b84575b613b6d5761388f8388615558565b6138a661389e8284868b6155fe565b955190615921565b90856139bd57836138ef9593604095936138c4938a5192848d61596c565b86896001600160a01b036003541692855196879586948593631f1f342160e11b855260048501615227565b03925af19081156139b2578691613982575b50838652600b60205260408620855f5260205260405f20555f1461395857507f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d6040845b8151908152426020820152a36001805580f35b60407f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d9151613945565b6139a4915060403d6040116139ab575b61399c8183615052565b81019061520a565b505f613901565b503d613992565b6040513d88823e3d90fd5b90878a52600860205260408a20895f5260205260405f20548111613ac5575b50868952600c60205260408920885f5260205260405f20916001600160401b03821161185b57613a10826108558554615144565b89908a601f8411600114613a595792806138ef979593613a47936040989692613a4e5750508160011b915f199060031b1c19161790565b90556138c4565b013590505f80610884565b50838b5260208b2091601f1984168c5b818110613aad5750926001928592604098966138ef9a989610613a94575b505050811b0190556138c4565b01355f19600384901b60f8161c191690555f8080613a87565b91936020600181928787013581550195019201613a69565b896001600160a01b03600254168982526008602052604082208b5f52602052613af260405f2054846152b1565b90803b1561340d578b9160848c85809460405196879586946325e5c05160e11b86528260048701526024860152604485015260648401525af1801561049c57613b54575b50889052600860205260408a20895f5260205260405f20555f6139dc565b81613b5e91615052565b613b6957895f613b36565b8980fd5b6044898989631b753c1b60e21b8352600452602452fd5b505f516020615ef15f395f51905f52871415613881565b63159818c760e11b8952600487905215602452604488fd5b633494a40d60e21b8652600486fd5b6282b42960e81b8652600486fd5b503461023c57602036600319011261023c57600435906001600160401b03821161023c5760206001600160a01b0381613c0c3660048701614f64565b91908260405193849283378101600d8152030190205416604051908152f35b503461023c57604036600319011261023c57613c45614f24565b6024359081151580920361340d5760206001600160a01b037f6be30291a8f228c9342613e5e66df1a1b85aa570ac1bca9219f3ac7b7f73bbf392613c87615512565b1692838552601482526040852060ff1981541660ff8316179055604051908152a280f35b50346131dd5760403660031901126131dd576001600160401b03602435116131dd5760243536036101806003198201126131dd57613ce7615538565b6004355f5260066020526001600160a01b03600560405f2001541680155f1461429757506001600160a01b035f54163303614289575b6107d061ffff613d3160c4602435016152ca565b161161427a576001600160a01b03613d4e6101446024350161529d565b161561426b576004355f52600660205260405f209060243560040135825560248035013560018301556002820163ffffffff613d8e6044602435016152d9565b1663ffffffff19825416178155613dce613dac6064602435016152d9565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b613dff613ddf6084602435016152d9565b825463ffffffff60401b191660409190911b63ffffffff60401b16178255565b613e30613e1060a4602435016152d9565b825463ffffffff60601b191660609190911b63ffffffff60601b16178255565b613e5d613e4160c4602435016152ca565b825461ffff60801b191660809190911b61ffff60801b16178255565b60e4602435013580151581036131dd57815460ff60901b191690151560901b60ff60901b161790556101046024350135600383015560221901610124602435013512156131dd576001600160401b036024356101248101350160040135116131dd576024803561012481013501600481013536039101136131dd57613f0160046101246024350135602435010135613ef86004840154615144565b60048401615305565b5f6001601f602435610124810135016004013511146141b65790613f5c6006925f906004610124602435013560243501013561419e575b5060046101246024350135602435010135908160011b915f199060031b1c19161790565b60048201555b613f716101446024350161529d565b6001600160a01b036005830191166001600160a01b0319825416179055610164602435013591829101556001600160a01b0360025416613fb560c4602435016152ca565b90803b156131dd57604051636b26335560e11b8152600480359082015261ffff90921660248084019190915235610104013560448301525f9082908183816064810103925af180156141935761417e575b506040519060408252602435600401356040830152602480350135606083015263ffffffff614039604460243501615355565b16608083015263ffffffff614052606460243501615355565b1660a083015263ffffffff61406b608460243501615355565b1660c083015263ffffffff61408460a460243501615355565b1660e083015260c4602435013561ffff811680910361051d576101008301526140b160e460243501615137565b1515610120830152610104602435013561014083015260243561012460243501350191602460048401359301916001600160401b03841161333957833603831361333957837f287e005099116032e1bba9482a5b0df09cc99f7e82a4482fa2810c52158d473d93610180610160850152816101c08501526101e0840137846101e085840101526001600160a01b0361414e61014460243501614f50565b166101808301526101a082015242602082015260043592601f01601f191681018190036101e00190a26001805580f35b61418b9192505f90615052565b5f905f614006565b6040513d5f823e3d90fd5b6024803561012481013501909101013590505f613f38565b90600481015f5260205f205f925b6024356101248101350160040135601f1916841061424857600693506024356101248101350160040135601f1981161061421a575b5050600160046101246024350135602435010135811b016004820155613f62565b602480356101248101350191820101355f196004929092013560031b60f8169190911c191690555f806141f9565b6024803561012481013501820101358255602093840193600190920191016141c4565b63e481c26960e01b5f5260045ffd5b63cd4e616760e01b5f5260045ffd5b6282b42960e81b5f5260045ffd5b331415806142b3575b15613d1d576282b42960e81b5f5260045ffd5b506001600160a01b035f54163314156142a0565b346131dd5760203660031901126131dd576004356016548110156131dd576142f06020916150f6565b90549060031b1c604051908152f35b346131dd575f3660031901126131dd57612431604051614320604082615052565b600e81527f52656769737472792d352e332e3300000000000000000000000000000000000060208201526040519182916020835260208301906150d2565b346131dd575f3660031901126131dd576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036143c85760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b63703e46dd60e11b5f5260045ffd5b60403660031901126131dd576143eb614f24565b6024356001600160401b0381116131dd5761440a90369060040161508e565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168030149081156145c9575b506143c85761444c615512565b6040516352d1902d60e01b81526001600160a01b0383169290602081600481875afa5f9181614595575b5061448e5783634c9c8ce360e01b5f5260045260245ffd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8592036145835750813b1561457157806001600160a01b03197f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2815115614559575f8083602061455795519101845af46145516153e4565b91615e96565b005b50503461456257005b63b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b632a87526960e21b5f5260045260245ffd5b9091506020813d6020116145c1575b816145b160209383615052565b810103126131dd57519085614476565b3d91506145a4565b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614158361443f565b346131dd5760203660031901126131dd576004355f526009602052602060405f2054604051908152f35b346131dd5760203660031901126131dd576004356001600160a01b036005541633036146a257801561469357805f52601560205260405f20600160ff1982541617905533907ff2aa93d5b018c6d050bb3a6597b9d4a3cd7a9222079c7ce596ecf6c7012162905f80a3005b630992f7ad60e01b5f5260045ffd5b635cfb0e7f60e01b5f5260045ffd5b346131dd5760403660031901126131dd576146ca614f3a565b6004355f5260086020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346131dd5760203660031901126131dd576001600160a01b03614717614f24565b165f52601160205260405f2054600190601654805b614748575b825f526013602052602060405f2054604051908152f35b5f19810181811161478f5761475c906150f6565b90549060031b1c82101561477957614773906152be565b8061472c565b809250600191500180911161478f578180614731565b634e487b7160e01b5f52601160045260245ffd5b346131dd5760a03660031901126131dd576004356024356001600160401b0381116131dd576147d6903690600401614fd7565b916044356001600160401b0381116131dd576147f6903690600401614fd7565b919093606435916084356001600160401b0381116131dd5761481c903690600401614f64565b614824615538565b335f52601460205260ff60405f205416156146a257858403614add5760c88411614ace578015614abf576001600160a01b036005541615614ab0578215614693578415614aa157825f52601560205260ff60405f205416614a9257825f52601560205260405f20600160ff1982541617905560405192602084019081525f60408501525f606085015260e060808501526148c36101008501868a61524c565b848103601f190160a0860152878152937f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88116131dd576104186020828c61492b988c60051b8092858301378b60c08401524660e0840152010301601f198101835282615052565b5f5b81811061493a5760018055005b6001600160a01b0361495561495083858961528d565b61529d565b1690815f52601260205260405f2054841115614a8757815f52601160205260405f20549161498482878a61528d565b3583811115614a2e57606461499985836152b1565b1115614a0157506064830180931161478f577fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e854260406001945b835f52601160205280825f2055835f52601260205287825f20558151908152876020820152a201935b9361492d565b6001935060407fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e8542916149d2565b80841180614a74575b15614a015750606319830192831161478f577fbb42fde0252fd03324102c3666f457311508c4dd05f96e66e0fd26f0c28e854260406001946149d2565b506064614a8182866152b1565b11614a37565b6001915001936149fb565b6351618d5360e01b5f5260045ffd5b633494a40d60e21b5f5260045ffd5b6342ddf9b760e11b5f5260045ffd5b635599c7cb60e11b5f5260045ffd5b6305beb17160e11b5f5260045ffd5b638b140a8160e01b5f5260045ffd5b346131dd575f3660031901126131dd5760206001600160a01b0360035416604051908152f35b346131dd57614b2036614f91565b909192614b2b615538565b805f52600660205260405f209260405192614b4584615007565b8454845260018501549460208501958652600660028201549163ffffffff8316604088015263ffffffff8360201c16606088015263ffffffff8360401c16608088015263ffffffff8360601c1660a088015261ffff8360801c1660c088015260ff60e088019360901c16151583526003810154610100880152604051614bd2816125d3816004860161517c565b6101208801526001600160a01b036005820154166101408801520154610160860152511580614dc85750825f52600760205260405f206001600160a01b0387165f5260205260ff60405f205416614da857335f9081527fb32a45580e424210cc224fe30669ef7eaf28a87c9d3de17b076e20c517357ea6602052604090205460ff1615614d995785614c92614cee92604094614c6f5f9a88615558565b614c86614c7e8383878b6155fe565b995190615921565b33928a5192868a61596c565b6001600160a01b038116948351978880948193338a8a7f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8780a46003546362c00b1f60e11b84526001600160a01b031695899060048501615227565b03925af1928315614193576020945f94614d54575b5060407f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d91835f52600b8752815f20855f52875285825f20555181519081524287820152a360018055604051908152f35b7f2c48d754bbf59f20e71c13710fac35aa1ea020da58dcbb366de0ef7f75c9377d919450614d90604091823d84116139ab5761399c8183615052565b50949150614d03565b631e82e51960e01b5f5260045ffd5b6001600160a01b038684631b753c1b60e21b5f526004521660245260445ffd5b8363159818c760e11b5f526004521560245260445ffd5b346131dd5760403660031901126131dd577f7e684e0b76ed13bc9cf7e4fbac7d11873036be9c9a83f9958382721eeda460106040600435602435614e21615512565b815f52601360205280835f205582519182526020820152a1005b346131dd5760203660031901126131dd576001600160a01b03614e5c614f24565b165f526011602052602060405f2054604051908152f35b346131dd5760203660031901126131dd576001600160a01b03614e94614f24565b165f52600f60205260405f20908154808252602082019081935f5260205f20905f5b818110614f0e5750505081614ecc910382615052565b604051918291602083019060208452518091526040830191905f5b818110614ef5575050500390f35b8251845285945060209384019390920191600101614ee7565b8254845260209093019260019283019201614eb6565b600435906001600160a01b03821682036131dd57565b602435906001600160a01b03821682036131dd57565b35906001600160a01b03821682036131dd57565b9181601f840112156131dd578235916001600160401b0383116131dd57602083818601950101116131dd57565b60606003198201126131dd57600435916024356001600160a01b03811681036131dd5791604435906001600160401b0382116131dd57614fd391600401614f64565b9091565b9181601f840112156131dd578235916001600160401b0383116131dd576020808501948460051b0101116131dd57565b61018081019081106001600160401b0382111761502357604052565b634e487b7160e01b5f52604160045260245ffd5b606081019081106001600160401b0382111761502357604052565b90601f801991011681019081106001600160401b0382111761502357604052565b6001600160401b03811161502357601f01601f191660200190565b81601f820112156131dd576020813591016150a882615073565b926150b66040519485615052565b828452828201116131dd57815f92602092838601378301015290565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b60165481101561510e5760165f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b805482101561510e575f5260205f2001905f90565b359081151582036131dd57565b90600182811c92168015615172575b602083101461515e57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691615153565b5f929181549161518b83615144565b80835292600181169081156151e057506001146151a757505050565b5f9081526020812093945091925b8383106151c6575060209250010190565b6001816020929493945483858701015201910191906151b5565b915050602093945060ff929192191683830152151560051b010190565b519081151582036131dd57565b91908260409103126131dd576152246020835193016151fd565b90565b61522493926001600160a01b03606093168252602082015281604082015201906150d2565b916020908281520191905f5b8181106152655750505090565b9091926020806001926001600160a01b0361527f88614f50565b168152019401929101615258565b919081101561510e5760051b0190565b356001600160a01b03811681036131dd5790565b9190820391821161478f57565b801561478f575f190190565b3561ffff811681036131dd5790565b3563ffffffff811681036131dd5790565b5f5b8281106152f857505050565b5f828201556001016152ec565b91601f8211615314575b505050565b80821161532057505050565b61534b925f5260205f20916020601f830160051c921061534d575b601f82910160051c0391016152ea565b565b5f915061533b565b359063ffffffff821682036131dd57565b908160209103126131dd575190565b92919261538182615073565b9161538f6040519384615052565b8294818452818301116131dd578281602093845f96015e010152565b9080601f830112156131dd57815161522492602001615375565b60208091604051928184925191829101835e8101600d81520301902090565b3d1561540e573d906153f582615073565b916154036040519384615052565b82523d5f602084013e565b606090565b51906fffffffffffffffffffffffffffffffff821682036131dd57565b906001600160a01b036002541680156154b557604051637c50309f60e01b81526001600160a01b039390931660048401526024830191909152602090829060449082905afa908115614193575f91615486575090565b90506020813d6020116154ad575b816154a160209383615052565b810103126131dd575190565b3d9150615494565b505f5260086020526001600160a01b0360405f2091165f5260205260405f205490565b916020908281520191905f5b8181106154f15750505090565b90919260208060019261550387615137565b151581520194019291016154e4565b6001600160a01b035f5416330361552557565b63118cdaa760e01b5f523360045260245ffd5b600260015414615549576002600155565b633ee5aeb560e01b5f5260045ffd5b5f516020615f315f395f51905f5281149081156155e7575b506155785750565b6001600160a01b0381165f9081527fb32a45580e424210cc224fe30669ef7eaf28a87c9d3de17b076e20c517357ea6602052604090205460ff16156155ba5750565b6001600160a01b0390633a401ef360e21b5f525f516020615f115f395f51905f526004521660245260445ffd5b5f516020615f515f395f51905f529150145f615570565b90939192905f905f516020615f115f395f51905f52810361580c5750508201916020818403126131dd578035906001600160401b0382116131dd5701926060848403126131dd576040519261565284615037565b84356001600160401b0381116131dd578161566e91870161508e565b84526020850135906001600160401b0382116131dd5761568f91860161508e565b93602084019485526040808501910135815283515115614aa1576001600160a01b036156bb85516153c5565b5416614aa157845180519081151591826157de575b5050614aa15751936157106040516157098161040a86602083016001600160a01b03606092168152604060208201525f60408201520190565b94516153c5565b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416179055518051806157a5575b50505b6001600160a01b03600454169081615758575050565b813b156131dd576001600160a01b0360445f928360405195869485936351cb857360e11b8552166004840152600160248401525af180156141935761579b575b50565b5f61534b91615052565b60209181839260405194859301835e8101600e8152030190206001600160a01b0382166001600160a01b03198254161790555f8061573f565b6001600160a01b03925060209181839260405194859301835e8101600e815203019020541615155f806156d0565b9394935f516020615ef15f395f51905f52036158cd575083604091810103126131dd5760405192604084018481106001600160401b038211176150235760405261585581614f50565b8452602080850191013581525f516020615f115f395f51905f525f52600760205260405f206001600160a01b0380865116165f5260205260ff60405f20541615614aa157519251604080516001600160a01b039092166020830152818101525f60608201526158c7816080810161040a565b91615742565b939060208114615908575b50506040516158c78161040a85602083016001600160a01b03606092168152604060208201525f60408201520190565b8192945090602091810103126131dd5735915f806158d8565b908015615958578115615950575b80821061593a575090565b906322df051360e11b5f5260045260245260445ffd5b90508061592f565b50505f90565b5f19811461478f5760010190565b939592919091845f52600760205260405f206001600160a01b0384165f5260205260405f20600160ff19825416179055845f52600960205260405f208054600160401b811015615023576159ca816159e99360018894018155615122565b9091906001600160a01b038084549260031b9316831b921b1916179055565b845f52600960205260405f2054855f52600a60205260405f206001600160a01b0385165f5260205260405f2055845f52600c60205260405f206001600160a01b0384165f5260205260405f20916001600160401b03821161502357615a52826108558554615144565b5f90601f8311600114615b6f579180615a8a926001600160a01b039695945f92613a4e5750508160011b915f199060031b1c19161790565b90555b16805f52601060205260405f20615aa4815461595e565b9055805f52600f60205260405f20805494600160401b861015615023576001600160a01b0360a49486615ae36120af8a5f97600160209d018155615122565b905588615b54575b816002541692604051998a988997634f4849ed60e11b895260048901526024880152604487015260648601521660848401525af1801561419357615b2c5750565b6157989060203d602011615b4d575b615b458183615052565b810190615366565b503d615b3b565b86845260088852604084208585528852886040852055615aeb565b601f19831691845f5260205f20925f5b818110615bc557509160019391856001600160a01b039897969410615bac575b505050811b019055615a8d565b01355f19600384901b60f8161c191690555f8080615b9f565b91936020600181928787013581550195019201615b7f565b91908201916040818403126131dd5780359260208201356001600160401b0381116131dd57615c0c920161508e565b916001600160a01b0360055416604051916353f10a4b60e01b8352602083600481855afa928315614193575f93615d1d575b50825f82805b615cfa575010615ceb57602093615c8860405196879586948594637e1e14c760e11b86526004860152602485015260448401526080606484015260848301906150d2565b03915afa908115614193575f91615cb1575b5015615ca257565b63eeee2fe160e01b5f5260045ffd5b90506020813d602011615ce3575b81615ccc60209383615052565b810103126131dd57615cdd906151fd565b5f615c9a565b3d9150615cbf565b630897acc560e11b5f5260045ffd5b91505f19820182811161478f57615d14921691829161595e565b91859291615c44565b9092506020813d602011615d49575b81615d3960209383615052565b810103126131dd5751915f615c3e565b3d9150615d2c565b6001600160a01b03805f549216918282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b805f52600a60205260405f206001600160a01b0383165f5260205260405f2054801561530f57815f52600960205260405f20905f19810181811161478f5782545f19810190811161478f57808203615e44575b50505080548015615e30575f190190615dfa8282615122565b6001600160a01b0382549160031b1b19169055555f52600a6020526001600160a01b0360405f2091165f526020525f6040812055565b634e487b7160e01b5f52603160045260245ffd5b6159ca916001600160a01b03615e5d615e6e9387615122565b90549060031b1c1692839186615122565b835f52600a6020526001600160a01b0360405f2091165f5260205260405f20555f8080615de1565b90615eba5750805115615eab57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580615ee7575b615ecb575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b15615ec356fe0c34ecc75d3bf122e0609d2576e167f53fb42429262ce8c9b33cab91ff670e3ae94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c0742024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0ff86d13979a91272f2c54c4147e588ecbeaad32dd1e0a5332a77356847049a70ea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/sdk/variables/ReputationSystemABI.md b/api/@aastar/sdk/variables/ReputationSystemABI.md new file mode 100644 index 000000000..69f9acdc8 --- /dev/null +++ b/api/@aastar/sdk/variables/ReputationSystemABI.md @@ -0,0 +1,3 @@ +> `const` **ReputationSystemABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L115) diff --git a/api/@aastar/sdk/variables/ReputationSystemArtifact.md b/api/@aastar/sdk/variables/ReputationSystemArtifact.md new file mode 100644 index 000000000..50a7a7c59 --- /dev/null +++ b/api/@aastar/sdk/variables/ReputationSystemArtifact.md @@ -0,0 +1,13 @@ +> `const` **ReputationSystemArtifact**: `object` = `ReputationSystemABIData` + +Defined in: [packages/core/src/abis/index.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L116) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60a0604052346102c557604051601f611e4e38819003918201601f19168301916001600160401b0383118484101761029e578084926020946040528339810103126102c557516001600160a01b038116908190036102c55733156102b2575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360809081526040519081016001600160401b0381118282101761029e57604052600a81526020810160018152604082019060648252604051926040840184811060018060401b0382111761029e576040526007845266111959985d5b1d60ca1b60208501526060810184905251600355516004555160055580516001600160401b03811161029e57600654600181811c91168015610294575b602082101461028057601f8111610212575b50602091601f82116001146101b2579181925f926101a7575b50508160011b915f199060031b1c1916176006555b604051611b8490816102ca823960805181818161094c01528181610c9d015281816113af015261142a0152f35b015190505f80610165565b601f1982169260065f52805f20915f5b8581106101fa575083600195106101e2575b505050811b0160065561017a565b01515f1960f88460031b161c191690555f80806101d4565b919260206001819286850151815501940192016101c2565b8181111561014c5760065f52601f820160051c7ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f60208410610278575b81601f9101920160051c03905f5b82811061026b57505061014c565b5f8282015560010161025d565b5f915061024f565b634e487b7160e01b5f52602260045260245ffd5b90607f169061013a565b634e487b7160e01b5f52604160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b1461140d57508063097f6b7c1461130c5780632f4468811461121e57806330cd71a81461110c5780633425bfae146110b85780634a2357b91461105057806354fd4d5014610ff15780635db8b75b14610fd65780636df80b4e14610c16578063715018a614610bb257806374f9924414610b225780638da5cb5b14610afd5780638dbda2eb14610ac55780639172ff45146107fd5780639c4b3436146106bb578063a00e8f8114610659578063a981c9f514610602578063bcd3697c14610512578063ce26b0e01461045d578063cf1c545614610425578063f2fde38b14610392578063fb42a9bf14610344578063fc193b49146103015763ff61c64e14610126575f80fd5b346102fe576101343661147a565b5090916001600160a01b038192168082526002602052604082206040518082602082945493848152019086526020862092865b8181106102e557505061017c92500382611522565b8051156102d757818352600160205261019860408420916117f4565b5183526020526101aa60408320611815565b9260208451940151915b8352600760205260408320549283156102c7575b94856001600160a01b03600b549216965b8281106101fe5750505060809450604051938452602084015260408301526060820152f35b602460206001600160a01b036102138461179b565b90549060031b1c16604051928380926370a0823160e01b82528d60048301525afa839181610290575b5061024b575b506001016101d9565b610256575b5f610242565b926102886001916001600160a01b0361026e8761179b565b90549060031b1c1684526009602052604084205490611875565b939050610250565b9091506020813d82116102bf575b816102ab60209383611522565b810103126102bb5751905f61023c565b5f80fd5b3d915061029e565b670de0b6b3a764000093506101c8565b5060035492600454916101b4565b8454835260019485019486945060209093019201610167565b80fd5b50346102fe5760203660031901126102fe5760043590600b548210156102fe5760206001600160a01b036103348461179b565b90549060031b1c16604051908152f35b50346102fe5760403660031901126102fe576001600160a01b03604061036861144e565b9282610372611464565b9416815260086020522091165f52602052602060405f2054604051908152f35b50346102fe5760203660031901126102fe576001600160a01b036103b461144e565b6103bc611b51565b16801561041157815473ffffffffffffffffffffffffffffffffffffffff198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b50346102fe5760203660031901126102fe5760406020916001600160a01b0361044c61144e565b168152600983522054604051908152f35b50346102fe5760203660031901126102fe576001600160a01b0361047f61144e565b168152600260205260408120604051908160208254918281520190819285526020852090855b8181106104fc57505050826104bb910383611522565b604051928392602084019060208552518091526040840192915b8181106104e3575050500390f35b82518452859450602093840193909201916001016104d5565b82548452602090930192600192830192016104a5565b50346102fe57806003193601126102fe576003546004549160055460405191806006549061053f8261169d565b80865291600181169081156105db575060011461057a575b50509061056a8361057694930383611522565b60405194859485611775565b0390f35b600681527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f94939250905b8082106105bf575091925090820160200161056a83610557565b91929360018160209254838589010152019101909392916105a5565b60ff191660208088019190915292151560051b8601909201925061056a9150849050610557565b50346102fe5760403660031901126102fe5761061c61144e565b6001600160a01b03168152600260205260408120805460243592908310156102fe57602061064a84846117c7565b90549060031b1c604051908152f35b50346102fe5760403660031901126102fe576040906001600160a01b0361067e61144e565b168152600160205281812060243582526020522080546105766001830154926106ae6003600283015492016116d5565b9060405194859485611775565b50346102fe576001600160a01b036106d23661147a565b5091909116918281526002602052604081209260405191826020865491828152019582526020822090825b8181106107e757505050610717836107da95960384611522565b6040948551926107278785611522565b60018452601f1987019261073e8460208701611b35565b85610748866117f4565b52610752856117f4565b508751956107608988611522565b600187526107718560208901611b35565b51905061077d81611544565b9061078a89519283611522565b808252610799601f1991611544565b013660208301376107a9866117f4565b526107b3856117f4565b508651926107c18885611522565b600184523660208501376107d4836117f4565b52611882565b8151908082526020820152f35b82548852602090970196600192830192016106fd565b50346102bb5760c03660031901126102bb5761081761144e565b60243567ffffffffffffffff81116102bb5761083790369060040161155c565b60443567ffffffffffffffff81116102bb576108579036906004016115ca565b60643567ffffffffffffffff81116102bb576108779036906004016115ca565b906084359160a4359067ffffffffffffffff82116102bb576108a06108a99236906004016114d8565b93909587611882565b926040928351926108ba8585611522565b600184526020840192601f19860192833686376001600160a01b036108de876117f4565b99168099528651946108f08887611522565b60018652602086019436863788610906876117f4565b5287516020810190606082526002608082015261525360f01b60a08201528b8a82015283606082015260a0815261093e60c082611522565b519020956001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001696873b156102bb578951631b02e44f60e01b8152600481019190915260a06024820152975160a4890181905288969594939260c4880192915f5b818110610aa35750505060209060031988840301604489015251918281520194905f5b818110610a8a57505050845f969484829589956020956064860152600319858503016084860152818452858401378181018401859052601f01601f1916010301925af18015610a8057610a45575b507fdb8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e29160209151908152a280f35b602091945091610a765f7fdb8ed69eccdb6ff5105e3934ba9b515bb1b9d366e3a0c25a5f852ee20b6783e294611522565b5f94915091610a17565b82513d5f823e3d90fd5b82518752899750602096870196909201916001016109c9565b82516001600160a01b031685528b9950602094850194909201916001016109a6565b346102bb5760203660031901126102bb576001600160a01b03610ae661144e565b165f526007602052602060405f2054604051908152f35b346102bb575f3660031901126102bb5760206001600160a01b035f5416604051908152f35b346102bb5760803660031901126102bb57610b3b61144e565b60243567ffffffffffffffff81116102bb57610b5b90369060040161155c565b9060443567ffffffffffffffff81116102bb57610b7c9036906004016115ca565b906064359167ffffffffffffffff83116102bb57602093610ba4610baa9436906004016115ca565b92611882565b604051908152f35b346102bb575f3660031901126102bb57610bca611b51565b5f805473ffffffffffffffffffffffffffffffffffffffff19811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102bb5760a03660031901126102bb5760043560243560443560643560843567ffffffffffffffff81116102bb57610c539036906004016114d8565b91604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610fcb575f91610f9c575b501580610f88575b610f795761271085118015610f6e575b8015610f62575b610f5357335f52600160205260405f20865f5260205260405f20541580610f4a575b610f03575b60405190610d2082611506565b858252602082018581526040830191825267ffffffffffffffff8511610eef5760405194610d58601f8201601f191660200187611522565b80865236818601116102bb576020815f92600397838a01378701015260608301948552335f52600160205260405f20885f5260205260405f209251835551600183015551600282015501905180519067ffffffffffffffff8211610eef578190610dc2845461169d565b601f8111610e96575b50602090601f8311600114610e33575f92610e28575b50508160011b915f199060031b1c19161790555b60405191825260208201527f868a11f79934bfa7243fd979d39bf00f37050e24b3ffc20a11f12a8b7e48d99560403392a3005b015190508680610de1565b5f8581528281209350601f198516905b818110610e7e5750908460019594939210610e66575b505050811b019055610df5565b01515f1960f88460031b161c19169055868080610e59565b92936020600181928786015181550195019301610e43565b82811115610dcb57909150835f5260205f20601f840160051c9060208510610ee7575b849392601f0160051c82900391015f5b828110610ed7575050610dcb565b5f81830155859450600101610ec9565b5f9150610eb9565b634e487b7160e01b5f52604160045260245ffd5b335f52600260205260405f20805468010000000000000000811015610eef57610f31916001820181556117c7565b81549060031b9088821b915f19901b1916179055610d13565b50841515610d0e565b63b4fa3fb360e01b5f5260045ffd5b50620186a08111610cec565b506127108411610ce5565b63ea8e4eb560e01b5f5260045ffd5b50336001600160a01b035f54161415610cd5565b610fbe915060203d602011610fc4575b610fb68183611522565b8101906117dc565b87610ccd565b503d610fac565b6040513d5f823e3d90fd5b346102bb575f3660031901126102bb57602060405160328152f35b346102bb575f3660031901126102bb57610576604051611012604082611522565b601081527f52657075746174696f6e2d302e332e320000000000000000000000000000000060208201526040519182916020835260208301906114b4565b346102bb5760403660031901126102bb5761106961144e565b7f21281390931aaf470d02c340b1ca10fabd02c8d7cdd1efcdbb3dc3fe5a0d074960206001600160a01b03602435936110a0611b51565b1692835f52600782528060405f2055604051908152a2005b346102bb5760403660031901126102bb576110d161144e565b6001600160a01b036110e1611464565b91165f52600a6020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102bb5760403660031901126102bb5761112561144e565b6001600160a01b0360243591611139611b51565b1690811561120f57815f52600960205260405f20541561118e575b60207fcde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d82345791835f52600982528060405f2055604051908152a2005b600b5460328110156112005768010000000000000000811015610eef577fcde4878b12c6b6c93c3eb3433ffbfdb24eb29698d8ac6ac98caf5db49d823457916111df82600160209401600b5561179b565b81549060031b906001600160a01b0387831b921b1916179055915050611154565b6310acf9a960e31b5f5260045ffd5b63e6c4247b60e01b5f5260045ffd5b346102bb5760203660031901126102bb5761123761144e565b6040516370a0823160e01b81523360048201526020816024816001600160a01b0386165afa5f91816112d8575b506112785763517172a160e11b5f5260045ffd5b156112ca57335f52600a60205260405f206001600160a01b0382165f5260205260405f2054156112a457005b335f52600a6020526001600160a01b0360405f2091165f5260205260405f204290555f80f35b624fa6f360e31b5f5260045ffd5b9091506020813d602011611304575b816112f460209383611522565b810103126102bb57519083611264565b3d91506112e7565b346102bb5761131a3661147a565b916001600160a01b035f541633141580611393575b6113855760206001600160a01b03807f6c1649831c4a2bebf79dfe8a2623ce1f5c65c9ab62903600dc011ee60a11c408931693845f526008835260405f208282165f5283528560405f20556040519586521693a3005b6282b42960e81b5f5260045ffd5b50604051635f9464c560e11b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610fcb575f916113ee575b501561132f565b611407915060203d602011610fc457610fb68183611522565b846113e7565b346102bb575f3660031901126102bb576020906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600435906001600160a01b03821682036102bb57565b602435906001600160a01b03821682036102bb57565b60609060031901126102bb576004356001600160a01b03811681036102bb57906024356001600160a01b03811681036102bb579060443590565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156102bb5782359167ffffffffffffffff83116102bb57602083818601950101116102bb57565b6080810190811067ffffffffffffffff821117610eef57604052565b90601f8019910116810190811067ffffffffffffffff821117610eef57604052565b67ffffffffffffffff8111610eef5760051b60200190565b9080601f830112156102bb5781359061157482611544565b926115826040519485611522565b82845260208085019360051b8201019182116102bb57602001915b8183106115aa5750505090565b82356001600160a01b03811681036102bb5781526020928301920161159d565b9080601f830112156102bb578135906115e282611544565b926115f06040519485611522565b82845260208085019360051b820101908282116102bb5760208101935b82851061161c57505050505090565b843567ffffffffffffffff81116102bb57820184603f820112156102bb5760208101359061164982611544565b916116576040519384611522565b8083526020808085019260051b84010101918783116102bb57604001905b82821061168d5750505081526020948501940161160d565b8135815260209182019101611675565b90600182811c921680156116cb575b60208310146116b757565b634e487b7160e01b5f52602260045260245ffd5b91607f16916116ac565b9060405191825f8254926116e88461169d565b8084529360018116908115611753575060011461170f575b5061170d92500383611522565b565b90505f9291925260205f20905f915b81831061173757505090602061170d928201015f611700565b602091935080600191548385890101520191019091849261171e565b90506020925061170d94915060ff191682840152151560051b8201015f611700565b9092608092611798959483526020830152604082015281606082015201906114b4565b90565b600b548110156117b357600b5f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b80548210156117b3575f5260205f2001905f90565b908160209103126102bb575180151581036102bb5790565b8051156117b35760200190565b80518210156117b35760209160051b010190565b9060405161182281611506565b606061184960038395805485526001810154602086015260028101546040860152016116d5565b910152565b8181029291811591840414171561186157565b634e487b7160e01b5f52601160045260245ffd5b9190820180921161186157565b939290935f938351865180911490811591611b29575b50610f5357925f915b8651831015611a11576001600160a01b036118bc8489611801565b5116965f91825b6118cd8686611801565b51518410156119c25761195a6001916118f0866118ea8a8a611801565b51611801565b518c5f528360205260405f20905f526020528561190f60405f20611815565b8a8a825115806119ba575b61196a575b611954936118ea6119339261193f94611801565b5160208301519061184e565b906040810151808311611962575b5051611875565b90611875565b9301926118c3565b91505f61194d565b505050506119548961193f611933896118ea8d60405161198981611506565b6003548152600454602082015260055460408201526119a860066116d5565b6060820152959450925050935061191f565b50831561191a565b600193506119f7670de0b6b3a7640000916119fe949b9a93979a9996995f52600760205260405f2054908115611a095761184e565b0490611875565b9501919390936118a1565b83915061184e565b939495505050505f90600b54915b828110611a2b57505050565b6001600160a01b03611a3c8261179b565b90549060031b1c166001600160a01b038316805f52600a60205260405f206001600160a01b0383165f5260205260405f20548015159081611b11575b50611a88575b5050600101611a1f565b604051906370a0823160e01b82526004820152602081602481855afa5f9181611ade575b5015611a7e57611abd575b80611a7e565b60019195611ad7915f52600960205260405f205490611875565b9490611ab7565b9091506020813d8211611b09575b81611af960209383611522565b810103126102bb5751905f611aac565b3d9150611aec565b905062093a808101809111611861574210155f611a78565b9050835114155f611898565b5f5b828110611b4357505050565b606082820152602001611b37565b6001600160a01b035f54163303611b6457565b63118cdaa760e01b5f523360045260245ffdfea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/RoleDataFactory.md b/api/@aastar/sdk/variables/RoleDataFactory.md new file mode 100644 index 000000000..5f8932e45 --- /dev/null +++ b/api/@aastar/sdk/variables/RoleDataFactory.md @@ -0,0 +1,142 @@ +> `const` **RoleDataFactory**: `object` + +Defined in: [packages/sdk/src/utils/roleData.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/roleData.ts#L16) + +## Type Declaration + +### community() + +> **community**: (`params?`) => `` `0x${string}` `` + +Data for Community Registration (matches Registry.sol CommunityRoleData) +NOTE: Solidity's abi.encode(struct) adds a 32-byte offset prefix (0x20) +which is required for abi.decode(struct) to work correctly. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params?` | \{ `description?`: `string`; `ensName?`: `string`; `logoURI?`: `string`; `name?`: `string`; `stakeAmount?`: `bigint`; `website?`: `string`; \} | - | +| `params.description?` | `string` | Community description (optional) | +| `params.ensName?` | `string` | ENS name (optional) | +| `params.logoURI?` | `string` | Logo URI string (optional) | +| `params.name?` | `string` | Community Name (defaults to 'TestCommunity') | +| `params.stakeAmount?` | `bigint` | Stake amount (defaults to 0) | +| `params.website?` | `string` | Website URL (optional) | + +#### Returns + +`` `0x${string}` `` + +### decodeCommunity() + +> **decodeCommunity**: (`data`) => `object` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | `` `0x${string}` `` | + +#### Returns + +`object` + +##### description + +> **description**: `any` = `d` + +##### ensName + +> **ensName**: `any` = `e` + +##### logoURI + +> **logoURI**: `any` = `l` + +##### name + +> **name**: `any` = `n` + +##### stakeAmount + +> **stakeAmount**: `any` = `s` + +##### website + +> **website**: `any` = `w` + +### decodeEndUser() + +> **decodeEndUser**: (`data`) => `object` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `data` | `` `0x${string}` `` | + +#### Returns + +`object` + +##### account + +> **account**: `any` = `a` + +##### avatarURI + +> **avatarURI**: `any` = `av` + +##### community + +> **community**: `any` = `c` + +##### ensName + +> **ensName**: `any` = `en` + +##### stakeAmount + +> **stakeAmount**: `any` = `s` + +### dvt() + +> **dvt**: () => `` `0x${string}` `` + +Data for Generic DVT Role (Empty) + +#### Returns + +`` `0x${string}` `` + +### endUser() + +> **endUser**: (`params?`) => `` `0x${string}` `` + +Data for EndUser (matches Registry.sol EndUserRoleData) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params?` | \{ `account?`: `` `0x${string}` ``; `avatarURI?`: `string`; `community?`: `` `0x${string}` ``; `ensName?`: `string`; `stakeAmount?`: `bigint`; \} | +| `params.account?` | `` `0x${string}` `` | +| `params.avatarURI?` | `string` | +| `params.community?` | `` `0x${string}` `` | +| `params.ensName?` | `string` | +| `params.stakeAmount?` | `bigint` | + +#### Returns + +`` `0x${string}` `` + +### paymasterSuper() + +> **paymasterSuper**: () => `` `0x${string}` `` + +Data for SuperPaymaster Operator (Empty) + +#### Returns + +`` `0x${string}` `` diff --git a/api/@aastar/sdk/variables/RoleIds.md b/api/@aastar/sdk/variables/RoleIds.md new file mode 100644 index 000000000..318187d5b --- /dev/null +++ b/api/@aastar/sdk/variables/RoleIds.md @@ -0,0 +1,33 @@ +> `const` **RoleIds**: `object` + +Defined in: [packages/sdk/src/utils/roleData.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/sdk/src/utils/roleData.ts#L3) + +## Type Declaration + +### ANODE + +> `readonly` **ANODE**: `` `0x${string}` `` + +### COMMUNITY + +> `readonly` **COMMUNITY**: `` `0x${string}` `` + +### DVT + +> `readonly` **DVT**: `` `0x${string}` `` + +### ENDUSER + +> `readonly` **ENDUSER**: `` `0x${string}` `` + +### KMS + +> `readonly` **KMS**: `` `0x${string}` `` + +### PAYMASTER\_AOA + +> `readonly` **PAYMASTER\_AOA**: `` `0x${string}` `` + +### PAYMASTER\_SUPER + +> `readonly` **PAYMASTER\_SUPER**: `` `0x${string}` `` diff --git a/api/@aastar/sdk/variables/SBT_ADDRESS.md b/api/@aastar/sdk/variables/SBT_ADDRESS.md new file mode 100644 index 000000000..709ff3a9e --- /dev/null +++ b/api/@aastar/sdk/variables/SBT_ADDRESS.md @@ -0,0 +1,3 @@ +> **SBT\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L32) diff --git a/api/@aastar/sdk/variables/SEPOLIA_CONTRACTS.md b/api/@aastar/sdk/variables/SEPOLIA_CONTRACTS.md new file mode 100644 index 000000000..e1c489695 --- /dev/null +++ b/api/@aastar/sdk/variables/SEPOLIA_CONTRACTS.md @@ -0,0 +1,187 @@ +> `const` **SEPOLIA\_CONTRACTS**: `object` + +Defined in: [packages/core/src/contracts.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contracts.ts#L38) + +Sepolia Testnet Contracts + +## Type Declaration + +### communities + +> `readonly` **communities**: `object` + +#### communities.aastar + +> `readonly` **aastar**: `object` + +AAStar Community - Test community for development (registered: 2025-11-01) + +#### communities.aastar.ensName + +> `readonly` **ensName**: `"aastar.eth"` = `'aastar.eth'` + +#### communities.aastar.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.aPNTs` + +#### communities.aastar.name + +> `readonly` **name**: `"AAStar"` = `'AAStar'` + +#### communities.aastar.owner + +> `readonly` **owner**: `"0x411BD567E46C0781248dbB6a9211891C032885e5"` = `COMMUNITY_OWNERS.aastarOwner` + +#### communities.aastar.stake + +> `readonly` **stake**: `"50"` = `'50'` + +#### communities.breadCommunity + +> `readonly` **breadCommunity**: `object` + +BreadCommunity - Test community for development (registered: 2025-11-03) + +#### communities.breadCommunity.ensName + +> `readonly` **ensName**: `"bread.eth"` = `'bread.eth'` + +#### communities.breadCommunity.gasToken + +> `readonly` **gasToken**: `` `0x${string}` `` = `TEST_TOKEN_ADDRESSES.bPNTs` + +#### communities.breadCommunity.name + +> `readonly` **name**: `"BreadCommunity"` = `'BreadCommunity'` + +#### communities.breadCommunity.owner + +> `readonly` **owner**: `"0xe24b6f321B0140716a2b671ed0D983bb64E7DaFA"` = `COMMUNITY_OWNERS.breadCommunityOwner` + +#### communities.breadCommunity.stake + +> `readonly` **stake**: `"50"` = `'50'` + +### core + +> `readonly` **core**: `object` = `CORE_ADDRESSES` + +#### core.agentIdentityRegistry + +> `readonly` **agentIdentityRegistry**: `` `0x${string}` `` = `AGENT_IDENTITY_REGISTRY_ADDRESS` + +#### core.agentReputationRegistry + +> `readonly` **agentReputationRegistry**: `` `0x${string}` `` = `AGENT_REPUTATION_REGISTRY_ADDRESS` + +#### core.aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` = `APNTS_ADDRESS` + +#### core.dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +#### core.entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` = `ENTRY_POINT_ADDRESS` + +#### core.gToken + +> `readonly` **gToken**: `` `0x${string}` `` = `GTOKEN_ADDRESS` + +#### core.gTokenStaking + +> `readonly` **gTokenStaking**: `` `0x${string}` `` = `GTOKEN_STAKING_ADDRESS` + +#### core.microPaymentChannel + +> `readonly` **microPaymentChannel**: `` `0x${string}` `` = `MICRO_PAYMENT_CHANNEL_ADDRESS` + +#### core.mySBT + +> `readonly` **mySBT**: `` `0x${string}` `` = `SBT_ADDRESS` + +#### core.paymasterFactory + +> `readonly` **paymasterFactory**: `` `0x${string}` `` = `PAYMASTER_FACTORY_ADDRESS` + +#### core.paymasterV4 + +> `readonly` **paymasterV4**: `` `0x${string}` `` + +#### core.registry + +> `readonly` **registry**: `` `0x${string}` `` = `REGISTRY_ADDRESS` + +#### core.superPaymaster + +> `readonly` **superPaymaster**: `` `0x${string}` `` = `SUPER_PAYMASTER_ADDRESS` + +#### core.xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` + +### monitoring + +> `readonly` **monitoring**: `object` = `MONITORING_ADDRESSES` + +#### monitoring.blsAggregator + +> `readonly` **blsAggregator**: `` `0x${string}` `` = `BLS_AGGREGATOR_ADDRESS` + +#### monitoring.dvtValidator + +> `readonly` **dvtValidator**: `` `0x${string}` `` = `DVT_VALIDATOR_ADDRESS` + +### official + +> `readonly` **official**: `object` = `OFFICIAL_ADDRESSES` + +#### official.entryPoint + +> `readonly` **entryPoint**: `` `0x${string}` `` + +### paymaster + +> `readonly` **paymaster**: `object` = `PAYMASTER_ADDRESSES` + +#### paymaster.paymasterV4\_1 + +> `readonly` **paymasterV4\_1**: `` `0x${string}` `` + +#### paymaster.paymasterV4\_1iImplementation + +> `readonly` **paymasterV4\_1iImplementation**: `` `0x${string}` `` = `PAYMASTER_V4_IMPL_ADDRESS` + +### testAccounts + +> `readonly` **testAccounts**: `object` = `TEST_ACCOUNT_ADDRESSES` + +#### testAccounts.simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `` `0x${string}` `` + +### testTokens + +> `readonly` **testTokens**: `object` = `TEST_TOKEN_ADDRESSES` + +#### testTokens.aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` + +#### testTokens.bPNTs + +> `readonly` **bPNTs**: `` `0x${string}` `` + +#### testTokens.mockUSDT + +> `readonly` **mockUSDT**: `` `0x${string}` `` + +### tokens + +> `readonly` **tokens**: `object` = `TOKEN_ADDRESSES` + +#### tokens.xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` diff --git a/api/@aastar/sdk/variables/SEPOLIA_V2_VERSIONS.md b/api/@aastar/sdk/variables/SEPOLIA_V2_VERSIONS.md new file mode 100644 index 000000000..84a1ecd2b --- /dev/null +++ b/api/@aastar/sdk/variables/SEPOLIA_V2_VERSIONS.md @@ -0,0 +1,67 @@ +> `const` **SEPOLIA\_V2\_VERSIONS**: `object` + +Defined in: [packages/core/src/contract-versions.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L42) + +V2 Contract Versions on Sepolia + +## Type Declaration + +### core + +> `readonly` **core**: `object` + +#### core.gToken + +> `readonly` **gToken**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### core.gTokenStaking + +> `readonly` **gTokenStaking**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### core.paymasterFactory + +> `readonly` **paymasterFactory**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### core.registry + +> `readonly` **registry**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### core.superPaymaster + +> `readonly` **superPaymaster**: [`ContractVersion`](../interfaces/ContractVersion.md) + +### monitoring + +> `readonly` **monitoring**: `object` + +#### monitoring.blsAggregator + +> `readonly` **blsAggregator**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### monitoring.dvtValidator + +> `readonly` **dvtValidator**: [`ContractVersion`](../interfaces/ContractVersion.md) + +### testTokens + +> `readonly` **testTokens**: `object` + +#### testTokens.aPNTs + +> `readonly` **aPNTs**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### testTokens.bPNTs + +> `readonly` **bPNTs**: [`ContractVersion`](../interfaces/ContractVersion.md) + +### tokens + +> `readonly` **tokens**: `object` + +#### tokens.mySBT + +> `readonly` **mySBT**: [`ContractVersion`](../interfaces/ContractVersion.md) + +#### tokens.xPNTsFactory + +> `readonly` **xPNTsFactory**: [`ContractVersion`](../interfaces/ContractVersion.md) diff --git a/api/@aastar/sdk/variables/SERVICE_FEE_RATE.md b/api/@aastar/sdk/variables/SERVICE_FEE_RATE.md new file mode 100644 index 000000000..964b6d69a --- /dev/null +++ b/api/@aastar/sdk/variables/SERVICE_FEE_RATE.md @@ -0,0 +1,3 @@ +> `const` **SERVICE\_FEE\_RATE**: `200` = `200` + +Defined in: [packages/core/src/constants.ts:86](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L86) diff --git a/api/@aastar/sdk/variables/SUPER_PAYMASTER_ADDRESS.md b/api/@aastar/sdk/variables/SUPER_PAYMASTER_ADDRESS.md new file mode 100644 index 000000000..bd4670450 --- /dev/null +++ b/api/@aastar/sdk/variables/SUPER_PAYMASTER_ADDRESS.md @@ -0,0 +1,3 @@ +> **SUPER\_PAYMASTER\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L34) diff --git a/api/@aastar/sdk/variables/SessionKeyValidatorABI.md b/api/@aastar/sdk/variables/SessionKeyValidatorABI.md new file mode 100644 index 000000000..96655dc20 --- /dev/null +++ b/api/@aastar/sdk/variables/SessionKeyValidatorABI.md @@ -0,0 +1,3 @@ +> `const` **SessionKeyValidatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:192](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L192) diff --git a/api/@aastar/sdk/variables/SessionKeyValidatorArtifact.md b/api/@aastar/sdk/variables/SessionKeyValidatorArtifact.md new file mode 100644 index 000000000..b92a7e267 --- /dev/null +++ b/api/@aastar/sdk/variables/SessionKeyValidatorArtifact.md @@ -0,0 +1,3 @@ +> `const` **SessionKeyValidatorArtifact**: (\{ `anonymous?`: `undefined`; `inputs`: (\{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: (\{ `components?`: `undefined`; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components`: `object`[]; `indexed`: `boolean`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] = `SessionKeyValidatorABIData` + +Defined in: [packages/core/src/abis/index.ts:193](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L193) diff --git a/api/@aastar/sdk/variables/SimpleAccountABI.md b/api/@aastar/sdk/variables/SimpleAccountABI.md new file mode 100644 index 000000000..23a1e35eb --- /dev/null +++ b/api/@aastar/sdk/variables/SimpleAccountABI.md @@ -0,0 +1,3 @@ +> `const` **SimpleAccountABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:89](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L89) diff --git a/api/@aastar/sdk/variables/SimpleAccountArtifact.md b/api/@aastar/sdk/variables/SimpleAccountArtifact.md new file mode 100644 index 000000000..f423fafb8 --- /dev/null +++ b/api/@aastar/sdk/variables/SimpleAccountArtifact.md @@ -0,0 +1,13 @@ +> `const` **SimpleAccountArtifact**: `object` = `SimpleAccountABIData` + +Defined in: [packages/core/src/abis/index.ts:90](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L90) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs?`: `undefined`; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60c03461014757601f61183e38819003918201601f19168301916001600160401b0383118484101761014b5780849260209460405283398101031261014757516001600160a01b0381168103610147573060805260a0525f51602061181e5f395f51905f525460ff8160401c16610138576002600160401b03196001600160401b038216016100e2575b6040516116be90816101608239608051818181610798015261086e015260a0518181816101b40152818161034d0152818161051e015281816106b401528181610b8d01528181610c4401528181610e4601526112f70152f35b6001600160401b0319166001600160401b039081175f51602061181e5f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f610089565b63f92ee8a960e01b5f5260045ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c90816301ffc9a714610f7357508063150b7a0214610f0457806319822f7c14610dfa57806334fcd5be14610cc85780634a58db1914610c215780634d44560d14610b3a5780634f1ef2861461081057806352d1902d146107705780638da5cb5b1461073d578063ad3cb1cc146106d8578063b0d691fe14610687578063b61d27f61461060b578063bc197c8114610557578063c399ec88146104c3578063c4d66de814610231578063d087d288146101535763f23a6e610361000f57346101505760a0600319360112610150576100f8611042565b50610101611065565b5060843567ffffffffffffffff811161014e57610122903690600401611088565b505060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b505b80fd5b5034610150578060031936011261015057604051907f35567e1a00000000000000000000000000000000000000000000000000000000825230600483015280602483015260208260448173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561022557906101ee575b602090604051908152f35b506020813d60201161021d575b81610208602093836110e7565b8101031261021957602090516101e3565b5f80fd5b3d91506101fb565b604051903d90823e3d90fd5b50346101505760206003193601126101505761024b611042565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549060ff8260401c16159167ffffffffffffffff8116801590816104bb575b60011490816104b1575b1590816104a8575b506104805790818360017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000073ffffffffffffffffffffffffffffffffffffffff9516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005561042b575b501690817fffffffffffffffffffffffff00000000000000000000000000000000000000008454161783556040519173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de8580a3610399575080f35b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2917fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560018152a180f35b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f610307565b6004847ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b9050155f61029d565b303b159150610295565b84915061028b565b5034610150578060031936011261015057604051907f70a0823100000000000000000000000000000000000000000000000000000000825230600483015260208260248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561022557906101ee57602090604051908152f35b50346101505760a060031936011261015057610571611042565b5061057a611065565b5060443567ffffffffffffffff811161014e5761059b9036906004016110b6565b505060643567ffffffffffffffff811161014e576105bd9036906004016110b6565b505060843567ffffffffffffffff811161014e576105df903690600401611088565b505060206040517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b50346101505760606003193601126101505780610626611042565b60443567ffffffffffffffff811161068357829161064b61065e923690600401611088565b92906106556112e0565b5a93369161118f565b916020835193019160243591f1156106735780f35b61067b6113a5565b602081519101fd5b5050fd5b5034610150578060031936011261015057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610150578060031936011261015057506107396040516106fb6040826110e7565b600581527f352e302e3000000000000000000000000000000000000000000000000000000060208201526040519182916020835260208301906111c5565b0390f35b503461015057806003193601126101505773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461015057806003193601126101505773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036107e85760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b807fe07c8dba0000000000000000000000000000000000000000000000000000000060049252fd5b50604060031936011261015057610825611042565b9060243567ffffffffffffffff811161014e573660238201121561014e5761085790369060248160040135910161118f565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803014908115610af8575b50610ad0576108a66113bf565b73ffffffffffffffffffffffffffffffffffffffff831690604051937f52d1902d000000000000000000000000000000000000000000000000000000008552602085600481865afa80958596610a98575b5061092857602484847f4c9c8ce3000000000000000000000000000000000000000000000000000000008252600452fd5b9091847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8103610a6d5750813b15610a4257807fffffffffffffffffffffffff00000000000000000000000000000000000000007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28151839015610a0f5780836020610a0b95519101845af4610a056112b1565b916115ef565b5080f35b50505034610a1a5780f35b807fb398979f0000000000000000000000000000000000000000000000000000000060049252fd5b7f4c9c8ce3000000000000000000000000000000000000000000000000000000008452600452602483fd5b7faa1d49a4000000000000000000000000000000000000000000000000000000008552600452602484fd5b9095506020813d602011610ac8575b81610ab4602093836110e7565b81010312610ac45751945f6108f7565b8480fd5b3d9150610aa7565b6004827fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b905073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614155f610899565b5034610150576040600319360112610150578060043573ffffffffffffffffffffffffffffffffffffffff8116809103610c1e57610b766113bf565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156106835782916044839260405194859384927f205c2878000000000000000000000000000000000000000000000000000000008452600484015260243560248401525af18015610c1357610c025750f35b81610c0c916110e7565b6101505780f35b6040513d84823e3d90fd5b50fd5b505f6003193601126102195773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610219575f602491604051928380927fb760faf900000000000000000000000000000000000000000000000000000000825230600483015234905af18015610cbd57610cb1575080f35b61001a91505f906110e7565b6040513d5f823e3d90fd5b346102195760206003193601126102195760043567ffffffffffffffff811161021957610cf99036906004016110b6565b610d016112e0565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301905b8281101561001a578060051b8401358281121561021957840180359073ffffffffffffffffffffffffffffffffffffffff82168203610219575f9181610d81610d76604086950183611208565b91905a92369161118f565b926020808551950193013591f115610d9b57600101610d29565b60018303610dab5761067b6113a5565b610db36113a5565b90610df66040519283927f5a15467500000000000000000000000000000000000000000000000000000000845260048401526040602484015260448301906111c5565b0390fd5b346102195760606003193601126102195760043567ffffffffffffffff81116102195761012060031982360301126102195760443573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163303610ea657610e7e60209260243590600401611259565b9080610e8e575b50604051908152f35b5f80808093335af150610e9f6112b1565b5082610e85565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152fd5b3461021957608060031936011261021957610f1d611042565b50610f26611065565b5060643567ffffffffffffffff811161021957610f47903690600401611088565b505060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b3461021957602060031936011261021957600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361021957817f150b7a020000000000000000000000000000000000000000000000000000000060209314908115611018575b8115610fee575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610fe7565b7f4e2312e00000000000000000000000000000000000000000000000000000000081149150610fe0565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361021957565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361021957565b9181601f840112156102195782359167ffffffffffffffff8311610219576020838186019501011161021957565b9181601f840112156102195782359167ffffffffffffffff8311610219576020808501948460051b01011161021957565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761112857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b67ffffffffffffffff811161112857601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261119b82611155565b916111a960405193846110e7565b829481845281830111610219578281602093845f960137010152565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610219570180359067ffffffffffffffff82116102195760200191813603831361021957565b906112a261129973ffffffffffffffffffffffffffffffffffffffff9261129361128c855f541696610100810190611208565b369161118f565b9061144e565b90929192611488565b16036112ac575f90565b600190565b3d156112db573d906112c282611155565b916112d060405193846110e7565b82523d5f602084013e565b606090565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633148015611385575b1561132757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f6163636f756e743a206e6f74204f776e6572206f7220456e747279506f696e746044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff5f54163314611320565b3d604051906020818301016040528082525f602083013e90565b73ffffffffffffffffffffffffffffffffffffffff5f541633148015611445575b156113e757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f6e6c79206f776e6572000000000000000000000000000000000000000000006044820152fd5b503033146113e0565b815191906041830361147e576114779250602082015190606060408401519301515f1a90611560565b9192909190565b50505f9160029190565b6004811015611533578061149a575050565b600181036114ca577ff645eedf000000000000000000000000000000000000000000000000000000005f5260045ffd5b600281036114fe57507ffce698f7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6003146115085750565b7fd78bce0c000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084116115e4579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15610cbd575f5173ffffffffffffffffffffffffffffffffffffffff8116156115da57905f905f90565b505f906001905f90565b5050505f9160039190565b9061162c575080511561160457602081519101fd5b7fd6bda275000000000000000000000000000000000000000000000000000000005f5260045ffd5b8151158061167f575b61163d575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b1561163556fea2646970667358221220b89f331a6d28607c751a074e9d4b888a9c4df5a4e278f75c243676b2102c680264736f6c63430008210033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/sdk/variables/SimpleAccountFactoryABI.md b/api/@aastar/sdk/variables/SimpleAccountFactoryABI.md new file mode 100644 index 000000000..821bcaaf5 --- /dev/null +++ b/api/@aastar/sdk/variables/SimpleAccountFactoryABI.md @@ -0,0 +1,3 @@ +> `const` **SimpleAccountFactoryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L92) diff --git a/api/@aastar/sdk/variables/SimpleAccountFactoryArtifact.md b/api/@aastar/sdk/variables/SimpleAccountFactoryArtifact.md new file mode 100644 index 000000000..23c8c618a --- /dev/null +++ b/api/@aastar/sdk/variables/SimpleAccountFactoryArtifact.md @@ -0,0 +1,13 @@ +> `const` **SimpleAccountFactoryArtifact**: `object` = `SimpleAccountFactoryABIData` + +Defined in: [packages/core/src/abis/index.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L93) + +## Type Declaration + +### abi + +> **abi**: (\{ `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60c0806040523461010d5760208161219d803803809161001f8285610138565b83398101031261010d57516001600160a01b0381169081900361010d576040516117ed808201906001600160401b038211838310176101245760209183916109b083398481520301905ff08015610119576080526040516213997160e71b815290602090829060049082905afa908115610119575f916100d3575b5060a052604051610854908161015c823960805181818160e60152818161037f01526104b6015260a05181818161015201526102b20152f35b90506020813d602011610111575b816100ee60209383610138565b8101031261010d57516001600160a01b038116810361010d575f61009a565b5f80fd5b3d91506100e1565b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176101245760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816309ccb8801461010a5750806311464fbe1461009c5780635fbfb9cf1461008357638cb84e1814610048575f80fd5b3461007f57602061006161005b36610176565b90610422565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b5f80fd5b3461007f57602061006161009636610176565b9061029b565b3461007f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261007f57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461007f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261007f5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc604091011261007f5760043573ffffffffffffffffffffffffffffffffffffffff8116810361007f579060243590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761020857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f602060609473ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0941685526040828601528051918291826040880152018686015e5f8582860101520116010190565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168033036103ef57506102e48282610422565b803b6103d3575073ffffffffffffffffffffffffffffffffffffffff604051917fc4d66de80000000000000000000000000000000000000000000000000000000060208401521660248201526024815261033f6044826101c7565b604051906102a88083019183831067ffffffffffffffff8411176102085783926103a592610577853973ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690610235565b03905ff580156103c85773ffffffffffffffffffffffffffffffffffffffff1690565b6040513d5f823e3d90fd5b73ffffffffffffffffffffffffffffffffffffffff1692915050565b7f389b01ec000000000000000000000000000000000000000000000000000000005f52336004523060245260445260645ffd5b600b73ffffffffffffffffffffffffffffffffffffffff926055926102a8906105576040519261045560208201856101c7565b8084526020840190610577823987604051937fc4d66de8000000000000000000000000000000000000000000000000000000006020860152166024840152602483526104a26044846101c7565b602060405193610508856104dc848201938d7f00000000000000000000000000000000000000000000000000000000000000001685610235565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018752866101c7565b60405194859383850197518091895e840190838201905f8252519283915e01015f8152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826101c7565b5190209060405191604083015260208201523081520160ff815320169056fe60806040526102a88038038061001481610168565b92833981016040828203126101645781516001600160a01b03811692909190838303610164576020810151906001600160401b03821161016457019281601f8501121561016457835161006e610069826101a1565b610168565b9481865260208601936020838301011161016457815f926020809301865e86010152823b15610152577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a282511561013a575f8091610122945190845af43d15610132573d91610113610069846101a1565b9283523d5f602085013e6101bc565b505b604051608d908161021b8239f35b6060916101bc565b50505034156101245763b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761018d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161018d57601f01601f191660200190565b906101e057508051156101d157602081519101fd5b63d6bda27560e01b5f5260045ffd5b81511580610211575b6101f1575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b156101e956fe60806040525f8073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416368280378136915af43d5f803e156053573d5ff35b3d5ffdfea26469706673582212200c98db95f0b67d7beb06faffee42bf478c4cecdac4fc0a07c523783606f410c964736f6c63430008210033a2646970667358221220272909d6b84306f6c9962a98e74da35b4af10b0c4638c973a922a677e8d5d4ab64736f6c6343000821003360c03461014757601f6117ed38819003918201601f19168301916001600160401b0383118484101761014b5780849260209460405283398101031261014757516001600160a01b0381168103610147573060805260a0525f5160206117cd5f395f51905f525460ff8160401c16610138576002600160401b03196001600160401b038216016100e2575b60405161166d90816101608239608051818181610798015261086e015260a0518181816101b40152818161034d0152818161051e015281816106b401528181610b8d01528181610c4401528181610e4601526112ce0152f35b6001600160401b0319166001600160401b039081175f5160206117cd5f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f610089565b63f92ee8a960e01b5f5260045ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608080604052600436101561001c575b50361561001a575f80fd5b005b5f905f3560e01c90816301ffc9a714610f4a57508063150b7a0214610edb57806319822f7c14610dfa57806334fcd5be14610cc85780634a58db1914610c215780634d44560d14610b3a5780634f1ef2861461081057806352d1902d146107705780638da5cb5b1461073d578063ad3cb1cc146106d8578063b0d691fe14610687578063b61d27f61461060b578063bc197c8114610557578063c399ec88146104c3578063c4d66de814610231578063d087d288146101535763f23a6e610361000f57346101505760a0600319360112610150576100f8611019565b5061010161103c565b5060843567ffffffffffffffff811161014e5761012290369060040161105f565b505060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b505b80fd5b5034610150578060031936011261015057604051907f35567e1a00000000000000000000000000000000000000000000000000000000825230600483015280602483015260208260448173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561022557906101ee575b602090604051908152f35b506020813d60201161021d575b81610208602093836110be565b8101031261021957602090516101e3565b5f80fd5b3d91506101fb565b604051903d90823e3d90fd5b50346101505760206003193601126101505761024b611019565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549060ff8260401c16159167ffffffffffffffff8116801590816104bb575b60011490816104b1575b1590816104a8575b506104805790818360017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000073ffffffffffffffffffffffffffffffffffffffff9516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005561042b575b501690817fffffffffffffffffffffffff00000000000000000000000000000000000000008454161783556040519173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de8580a3610399575080f35b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2917fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560018152a180f35b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f610307565b6004847ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b9050155f61029d565b303b159150610295565b84915061028b565b5034610150578060031936011261015057604051907f70a0823100000000000000000000000000000000000000000000000000000000825230600483015260208260248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561022557906101ee57602090604051908152f35b50346101505760a060031936011261015057610571611019565b5061057a61103c565b5060443567ffffffffffffffff811161014e5761059b90369060040161108d565b505060643567ffffffffffffffff811161014e576105bd90369060040161108d565b505060843567ffffffffffffffff811161014e576105df90369060040161105f565b505060206040517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b50346101505760606003193601126101505780610626611019565b60443567ffffffffffffffff811161068357829161064b61065e92369060040161105f565b92906106556112b7565b5a933691611166565b916020835193019160243591f1156106735780f35b61067b61137d565b602081519101fd5b5050fd5b5034610150578060031936011261015057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610150578060031936011261015057506107396040516106fb6040826110be565b600581527f352e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061119c565b0390f35b503461015057806003193601126101505773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461015057806003193601126101505773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036107e85760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b807fe07c8dba0000000000000000000000000000000000000000000000000000000060049252fd5b50604060031936011261015057610825611019565b9060243567ffffffffffffffff811161014e573660238201121561014e57610857903690602481600401359101611166565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803014908115610af8575b50610ad0576108a6611397565b73ffffffffffffffffffffffffffffffffffffffff831690604051937f52d1902d000000000000000000000000000000000000000000000000000000008552602085600481865afa80958596610a98575b5061092857602484847f4c9c8ce3000000000000000000000000000000000000000000000000000000008252600452fd5b9091847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8103610a6d5750813b15610a4257807fffffffffffffffffffffffff00000000000000000000000000000000000000007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28151839015610a0f5780836020610a0b95519101845af4610a05611288565b9161159e565b5080f35b50505034610a1a5780f35b807fb398979f0000000000000000000000000000000000000000000000000000000060049252fd5b7f4c9c8ce3000000000000000000000000000000000000000000000000000000008452600452602483fd5b7faa1d49a4000000000000000000000000000000000000000000000000000000008552600452602484fd5b9095506020813d602011610ac8575b81610ab4602093836110be565b81010312610ac45751945f6108f7565b8480fd5b3d9150610aa7565b6004827fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b905073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614155f610899565b5034610150576040600319360112610150578060043573ffffffffffffffffffffffffffffffffffffffff8116809103610c1e57610b76611397565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156106835782916044839260405194859384927f205c2878000000000000000000000000000000000000000000000000000000008452600484015260243560248401525af18015610c1357610c025750f35b81610c0c916110be565b6101505780f35b6040513d84823e3d90fd5b50fd5b505f6003193601126102195773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610219575f602491604051928380927fb760faf900000000000000000000000000000000000000000000000000000000825230600483015234905af18015610cbd57610cb1575080f35b61001a91505f906110be565b6040513d5f823e3d90fd5b346102195760206003193601126102195760043567ffffffffffffffff811161021957610cf990369060040161108d565b610d016112b7565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301905b8281101561001a578060051b8401358281121561021957840180359073ffffffffffffffffffffffffffffffffffffffff82168203610219575f9181610d81610d766040869501836111df565b91905a923691611166565b926020808551950193013591f115610d9b57600101610d29565b60018303610dab5761067b61137d565b610db361137d565b90610df66040519283927f5a154675000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061119c565b0390fd5b346102195760606003193601126102195760043567ffffffffffffffff81116102195761012060031982360301126102195760443573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803303610ea85750610e8060209260243590600401611230565b9080610e90575b50604051908152f35b5f80808093335af150610ea1611288565b5082610e87565b7ffe34a6d3000000000000000000000000000000000000000000000000000000005f52336004523060245260445260645ffd5b3461021957608060031936011261021957610ef4611019565b50610efd61103c565b5060643567ffffffffffffffff811161021957610f1e90369060040161105f565b505060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b3461021957602060031936011261021957600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361021957817f150b7a020000000000000000000000000000000000000000000000000000000060209314908115610fef575b8115610fc5575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610fbe565b7f4e2312e00000000000000000000000000000000000000000000000000000000081149150610fb7565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361021957565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361021957565b9181601f840112156102195782359167ffffffffffffffff8311610219576020838186019501011161021957565b9181601f840112156102195782359167ffffffffffffffff8311610219576020808501948460051b01011161021957565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b9291926111728261112c565b9161118060405193846110be565b829481845281830111610219578281602093845f960137010152565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610219570180359067ffffffffffffffff82116102195760200191813603831361021957565b9061127961127073ffffffffffffffffffffffffffffffffffffffff9261126a611263855f5416966101008101906111df565b3691611166565b906113fd565b90929192611437565b1603611283575f90565b600190565b3d156112b2573d906112998261112c565b916112a760405193846110be565b82523d5f602084013e565b606090565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803314801561135d575b73ffffffffffffffffffffffffffffffffffffffff5f5416901561131a575050565b60849250604051917f62018a3100000000000000000000000000000000000000000000000000000000835233600484015230602484015260448301526064820152fd5b5073ffffffffffffffffffffffffffffffffffffffff5f541633146112f8565b3d604051906020818301016040528082525f602083013e90565b73ffffffffffffffffffffffffffffffffffffffff5f541680331480156113f4575b156113c15750565b7fcbce04d8000000000000000000000000000000000000000000000000000000005f52336004523060245260445260645ffd5b503033146113b9565b815191906041830361142d576114269250602082015190606060408401519301515f1a9061150f565b9192909190565b50505f9160029190565b60048110156114e25780611449575050565b60018103611479577ff645eedf000000000000000000000000000000000000000000000000000000005f5260045ffd5b600281036114ad57507ffce698f7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6003146114b75750565b7fd78bce0c000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411611593579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15610cbd575f5173ffffffffffffffffffffffffffffffffffffffff81161561158957905f905f90565b505f906001905f90565b5050505f9160039190565b906115db57508051156115b357602081519101fd5b7fd6bda275000000000000000000000000000000000000000000000000000000005f5260045ffd5b8151158061162e575b6115ec575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b156115e456fea2646970667358221220ae8b4013efb78cdce9563e5b116833be5bfaac44e3d166825f6faaf42e24670864736f6c63430008210033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/sdk/variables/SuperPaymasterABI.md b/api/@aastar/sdk/variables/SuperPaymasterABI.md new file mode 100644 index 000000000..5d86ffe29 --- /dev/null +++ b/api/@aastar/sdk/variables/SuperPaymasterABI.md @@ -0,0 +1,3 @@ +> `const` **SuperPaymasterABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:75](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L75) diff --git a/api/@aastar/sdk/variables/SuperPaymasterArtifact.md b/api/@aastar/sdk/variables/SuperPaymasterArtifact.md new file mode 100644 index 000000000..74d468ee7 --- /dev/null +++ b/api/@aastar/sdk/variables/SuperPaymasterArtifact.md @@ -0,0 +1,13 @@ +> `const` **SuperPaymasterArtifact**: `object` = `SuperPaymasterABIData` + +Defined in: [packages/core/src/abis/index.ts:76](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L76) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: (\{ `components`: `object`[]; `internalType`: `string`; `name`: `string`; `type`: `string`; \} \| \{ `components?`: `undefined`; `internalType`: `string`; `name`: `string`; `type`: `string`; \})[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x6101003461029957601f61561138819003918201601f19168301916001600160401b0383118484101761029d578084926060946040528339810103126102995780516001600160a01b0381169190828103610299576020820151916001600160a01b038316830361029957604001516001600160a01b0381169390849003610299573315610286575f8054336001600160a01b0319821681178355604051939290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3306080521561024f575060a0525f5160206155f15f395f51905f525460ff8160401c16610240576002600160401b03196001600160401b038216016101ea575b506001805566470de4df8200006009556103e8600d5560c05260e05260405161533f90816102b28239608051818181612b6e0152612cc7015260a051818181610bc601528181610e6a01528181610f18015281816111ab0152818161139e01528181611cb501528181612c1501528181613098015261343e015260c0518181816107af01528181611518015281816123550152818161259d015281816133ea01528181614b0101528181614c4d01528181614dc90152614f13015260e05181818161135a01528181611fae0152818161297401526151080152f35b6001600160401b0319166001600160401b039081175f5160206155f15f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f61010f565b63f92ee8a960e01b5f5260045ffd5b62461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908115b9d1c9e541bda5b9d60721b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f5f3560e01c80630396cb601461340e57806306433b1b146133ca57806307615815146133a9578063079d2d421461324e5780630c8831121461322d57806313e7c9d81461317057806317a187781461311d5780631d2282c9146130fc578063205c28781461306b5780632e1a7d4d14612f7c5780632f4f21e214612f2c57806334fde76a14612f0e5780633d63f21514612ef05780634382885d14612ec95780634f1ef28614612c7657806352b7512c14612bcd57806352d1902d14612b5357806353afb8be146128bd57806354fd4d501461285c57806358a2570a146127e8578063594a6f23146127ca5780635c7c4b5f146125325780635d2e7e50146124785780635f4cd4fe146122ee57806360a9139b146122c757806360d7442b146122aa57806361ad446e1461228c57806361d027b3146122655780636640431f1461220357806366c36875146121cb578063673a7e2814611f885780636a16e22d14611f645780636a4b23b114611e775780636d8a4aff14611e50578063715018a614611dfe57806374f053c414611dd757806375e09b5114611db9578063787dce3d14611d595780637af3816c14611d3b5780637b70718514611ced5780637c627b2114611c685780638041c94a14611b0b57806382309dd814611ae057806384450c3d146119ff57806388a7ca5c146119655780638da5cb5b1461193f5780638e0d8ed9146119245780638e5802131461188757806396daa3221461186957806396ea1e381461170f578063a0c5018b14611675578063a134d63a14611572578063a3970ae6146114fe578063a4b5328f1461140b578063ad3cb1cc146113c2578063b0d691fe1461137e578063b0f0abe91461133a578063b54a8fca14611289578063b6b55f251461123b578063b7b76cbe14611215578063bb2ddb27146111f7578063bb9fe6bf14611187578063bd11187014611169578063bfa5a1eb14611070578063c06f58e814611049578063c1d9cb0814610f78578063c23a5cea14610eeb578063c399ec8814610e3d578063cf756fdf14610c2d578063d0e30db014610ba7578063d20727d714610b11578063dc61ae90146109d4578063ddd595ca146109b6578063de5c62a61461098f578063e21b38d214610961578063e8ade1a9146108c5578063eafe74b51461075e578063ec2123f114610692578063f0f442601461060f578063f2fde38b146105be578063f5c91a0814610518578063f60fdcb3146104d1578063f7e8cb0d14610494578063fc347007146103eb5763fe719e2f146103c1575f80fd5b346103e857806003193601126103e857602065ffffffffffff815460a01c16604051908152f35b80fd5b50346103e85760203660031901126103e85760043565ffffffffffff81169081810361049057610419614d88565b338352600560205260016040842001907fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff82549165ffffffffffff60c01b9060c01b1691161790556040519081527f4419a541734858dec04cd4ea31aff7b399a0b82dc61f30cc777c1907dc8102ed60203392a280f35b8280fd5b50346103e85760203660031901126103e85760ff60406020926001600160a01b036104bd6134aa565b168152600784522054166040519015158152f35b50346103e857806003193601126103e8576080600a5460ff600b54600c5490604051938452602084015269ffffffffffffffffffff8116604084015260501c166060820152f35b50346103e85760403660031901126103e8576105326134aa565b6024359061053e6144f5565b63ffffffff82116105af576001600160a01b03168083526005602090815260408420600101805463ffffffff60a01b191660a085901b63ffffffff60a01b1617905590917ffc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c8219190604051908152a280f35b634163383f60e11b8352600483fd5b50346103e85760203660031901126103e8576105d86134aa565b6105e06144f5565b6001600160a01b038116156105fb576105f890614e08565b80f35b631e4fbdf760e01b82526004829052602482fd5b50346103e85760203660031901126103e8576001600160a01b036106316134aa565b6106396144f5565b16801561068357600454816001600160a01b0382167f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a8580a36001600160a01b0319161760045580f35b63e6c4247b60e01b8252600482fd5b50346103e85760203660031901126103e8576004356106af6144f5565b66038d7ea4c680008110801561074c575b61073d576009549081610705575b7ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d2918160409260095582519182526020820152a180f35b6127106123288302048110801561072c575b156106ce575b63c52a9bd360e01b8352600483fd5b50612710612af88302048111610717565b63c52a9bd360e01b8252600482fd5b50683635c9adc5dea0000081116106c0565b50346103e85760403660031901126103e8576107786134aa565b906107816134c0565b916001600160a01b0360405191632c333e2560e01b8352168060048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9182156108ba57839261087f575b506001600160a01b039360246020926040519687938492634d3c739760e11b84526004840152165afa90811561087457829161083b575b60209350818111156108345761082c9250613cc7565b604051908152f35b505061082c565b90506020833d60201161086c575b8161085660209383613580565b81010312610868576020925190610816565b5f80fd5b3d9150610849565b6040513d84823e3d90fd5b9091506020813d6020116108b2575b8161089b60209383613580565b810103126108685751906001600160a01b036107df565b3d915061088e565b6040513d85823e3d90fd5b50346103e8576001600160a01b036108dc366137b6565b91906108e66144f5565b1690818352600560205260408320805460ff60881b83151560881b169060ff60881b19161790555f1461093a577fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da8280a280f35b7fae02c1bd695006b6d891af37fdeefea45a10ebcc17071e3471787db4f17728858280a280f35b50346103e85760203660031901126103e85760206109856109806134aa565b614482565b6040519015158152f35b50346103e857806003193601126103e85760206001600160a01b0360175416604051908152f35b50346103e857806003193601126103e857602060405162093a808152f35b50346103e857806003193601126103e8576013548015610b0257610e108101809111610aee574210610adf5760145480600a5542600b556a08000000000000000000006affffffffffffffffffffff19600c541617600c5560125460ff81169060018203610a9a575b505081601355816014557ffb96594f297e98363f469f68dba1862f6b4e6dbe060a9fd971f41087b2bb21066020604051838152a142907fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b7f5e5763e2a601dbb21ceae7f64e18f3d572378b373daa8d75a325f22f377f0ecb60406001938151908152846020820152a160ff191617601255426015555f80610a3d565b63174b336d60e21b8152600490fd5b634e487b7160e01b82526011600452602482fd5b63a24a147160e01b8252600482fd5b50346103e85760203660031901126103e8576001600160a01b03610b336134aa565b610b3b6144f5565b16801561068357806001600160a01b0319601d541617601d5562093a804201804211610b93576020817f98f60c65a2b39c6b97ac2ab59944af0f43d99c0d1756339e5c607fd64341971c92601e55604051908152a280f35b634e487b7160e01b83526011600452602483fd5b50806003193601126103e857610bbb6144f5565b806001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b15610c2a57816024916040519283809263b760faf960e01b825230600483015234905af1801561087457610c195750f35b81610c2391613580565b6103e85780f35b50fd5b50346103e85760803660031901126103e857610c476134aa565b610c4f6134c0565b906044356001600160a01b03811691828203610e3957606435925f5160206153135f395f51905f52549460ff8660401c16159567ffffffffffffffff811680159081610e31575b6001149081610e27575b159081610e1e575b50610e0f5767ffffffffffffffff1981166001175f5160206153135f395f51905f525586610de3575b506001600160a01b03831615610dd45760ff5f5160206153135f395f51905f525460401c1615610dc557906001600160a01b038392610d11829695614e08565b168419600254161760025515155f14610dbe57505b166001600160a01b031960045416176004558015155f14610db5575b60165566470de4df8200006009556103e8600d55610d5d5780f35b68ff0000000000000000195f5160206153135f395f51905f5254165f5160206153135f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b50610e10610d42565b9050610d26565b631afcd79f60e31b8752600487fd5b6349e27cff60e01b8752600487fd5b68ffffffffffffffffff191668010000000000000001175f5160206153135f395f51905f52555f610cd1565b63f92ee8a960e01b8852600488fd5b9050155f610ca8565b303b159150610ca0565b889150610c96565b8480fd5b50346103e857806003193601126103e8576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610edf5790610eac575b602090604051908152f35b506020813d602011610ed7575b81610ec660209383613580565b810103126108685760209051610ea1565b3d9150610eb9565b604051903d90823e3d90fd5b50346103e85760203660031901126103e85780610f066134aa565b610f0e6144f5565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610f74576001600160a01b036024849283604051958694859363611d2e7560e11b85521660048401525af1801561087457610c195750f35b5050fd5b50346103e85760203660031901126103e8576001600160a01b03610f9a6134aa565b826080604051610fa981613548565b828152826020820152826040820152606080820152015216808252600860205260408220541561103a5780825260086020526040822090825260086020526040822054915f1983019283116110265761102261100e6110088585613649565b50614437565b60405191829160208352602083019061376f565b0390f35b634e487b7160e01b81526011600452602490fd5b63e0a1dc3160e01b8252600482fd5b50346103e857806003193601126103e85760206001600160a01b03600e5416604051908152f35b50346103e85760803660031901126103e85761108a6134aa565b9060243560038110156111655760643567ffffffffffffffff8111610490576110b79036906004016134ea565b6110c29491946144f5565b65ffffffffffff42166001600160a01b03831690818652601f60205265ffffffffffff60408720541681106111565762015180019065ffffffffffff82116111425791859691611138936105f89752601f60205265ffffffffffff60408920911665ffffffffffff1982541617905536916135be565b916044359161451b565b634e487b7160e01b86526011600452602486fd5b63be3963ef60e01b8652600486fd5b5080fd5b50346103e857806003193601126103e8576020601654604051908152f35b50346103e857806003193601126103e8576111a06144f5565b806001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803b15610c2a5781809160046040518094819363bb9fe6bf60e01b83525af1801561087457610c195750f35b50346103e857806003193601126103e8576020601e54604051908152f35b50346103e857806003193601126103e85760206001600160a01b03815416604051908152f35b50346103e85760203660031901126103e85761128260043561125b614b9a565b611263614d88565b61127c816001600160a01b036002541630903390614cb2565b33614cf3565b6001805580f35b50346103e85760203660031901126103e8576001600160a01b036112ab6134aa565b6112b36144f5565b16801561068357602054620151804201804211611326576001600160d01b0319909116821760a091821b65ffffffffffff60a01b161760208181556040519190921c65ffffffffffff1681527f0b969f7dbdbaad518bf93d6f72458e8fd633fe345297219a90f56b035d14468d9190a280f35b634e487b7160e01b84526011600452602484fd5b50346103e857806003193601126103e85760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346103e857806003193601126103e85760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346103e857806003193601126103e857506110226040516113e5604082613580565b60058152640352e302e360dc1b60208201526040519182916020835260208301906135f4565b50346103e85760403660031901126103e8576114256134aa565b6024356114306144f5565b611438614b9a565b6001600160a01b0382169182156114ef5760105467016345785d8a00008111156114e95767016345785d89ffff198101818111611142575b83116114da57916114cc816020936114a9827ff7595c4fd7fa675e456dd9520ac8266c06d237d52900fc573bccc85b7c177c9e97613cc7565b6010556114b882600f54613cc7565b600f556001600160a01b0360025416614bba565b604051908152a26001805580f35b63b4aa806360e01b8552600485fd5b84611470565b63e6c4247b60e01b8452600484fd5b50346103e85761150d366137b6565b906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303611564576001600160a01b031682526007602052604082209060ff80198354169115151617905580f35b6282b42960e81b8352600483fd5b50346103e85760203660031901126103e8576001600160a01b036115946134aa565b168152600860205260408120805467ffffffffffffffff811161166157604051906115c560208260051b0183613580565b80825260208201809385526020852085915b83831061164357868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061161457505050500390f35b919360019193955060206116338192603f198a8203018652885161376f565b9601920192018594939192611605565b6005602060019261165385614437565b8152019201920191906115d7565b634e487b7160e01b83526041600452602483fd5b50346103e857806003193601126103e85761168e6144f5565b6020546001600160a01b03811690811561071d5765ffffffffffff8160a01c1665ffffffffffff42161061071d57600e80546001600160a01b0319811684179091556001600160d01b03199091166020556001600160a01b03167f019f532f6e08ee8944dc2e7ac40f3c97ad4a20618aee847ddf7c502821c7dad48380a380f35b50346103e85760203660031901126103e85760043561172c6144f5565b8181131561185a5761173c6150f3565b1561184b576015548015159081611834575b5061182557600a548281131561181657611f40810290801591818105611f401483171561180257612710900591612ee08202918205612ee01417156113265761271090059082129081156117f8575b506117e9578060145542601355610e104201804211610b93577f028dfa1d2bc951d60682384a066c9424c3829ea5f25cb00a5f659caed927faea9160409182519182526020820152a180f35b636b04933560e01b8252600482fd5b905081135f61179d565b634e487b7160e01b85526011600452602485fd5b63b41b6cb160e01b8352600483fd5b6304a1a56160e41b8252600482fd5b905062093a808101809111610b935742115f61174e565b6304efd15560e41b8252600482fd5b63b41b6cb160e01b8252600482fd5b50346103e857806003193601126103e8576020600d54604051908152f35b50346103e85760403660031901126103e8576118a16134aa565b6001600160a01b03602435911682526008602052604082208054821015610490576118cc9250613649565b50805460018201549161102261191960028301549260ff60046118f1600384016136ae565b920154169360405196879687526020870152604086015260a0606086015260a08501906135f4565b91608084019061374e565b50346103e857806003193601126103e85760206109856150f3565b50346103e857806003193601126103e8576001600160a01b036020915416604051908152f35b50346103e85760803660031901126103e85761197f6134aa565b506119886134c0565b9060643567ffffffffffffffff8111611165576119a99036906004016134ea565b50506119b3614b9a565b6001600160a01b036002541633036119f1576119db826119d281614bfb565b60443590614cf3565b60018055604051632229f29760e21b8152602090f35b6282b42960e81b8152600490fd5b50346103e857806003193601126103e857611a186144f5565b601d546001600160a01b03811690811561071d57601e54421061071d57600f5460105480911490811591611ace575b5061071d5760025490826001600160a01b038316926001600160a01b031916176002556001600160a01b031916601d5582601e5581817fbbb759660e3239a80c3b3a0326287b69c8a5388b2ba43876c6b91c7c85f21fb86020604051428152a37f75f4cc3f3f70100dc11e396f47f8af2dec5cf7ec94e06062222be779cf2f3dec8380a380f35b67016345785d8a00009150115f611a47565b50346103e857806003193601126103e8576020611afb614405565b65ffffffffffff60405191168152f35b50346103e85760603660031901126103e857611b256134aa565b611b2d6134c0565b60443590611b396144f5565b611b41614b9a565b6001600160a01b03829316918285526011602052604085206001600160a01b0383165f5260205260405f2054908115611c5957818115918215611c4f575b5050611c47575b83611b9091613cc7565b8285526011602052604085206001600160a01b0383165f5260205260405f2055813b15611c435760405163fa74542d60e01b81526001600160a01b0382166004820152602481018490528490818160448183885af1801561087457611c2e575b505060206001600160a01b037f84b561bfeda3b329970b08af25d20086abe657da83a1dbd00fdfaad913e8cfed926040519586521693a36001805580f35b81611c3891613580565b611c4357835f611bf0565b8380fd5b925082611b86565b119050815f611b7f565b630342954b60e21b8652600486fd5b50346103e85760803660031901126103e857600360043510156103e85760243567ffffffffffffffff811161116557611ca86112829136906004016134ea565b611cdc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314613cd4565b611ce4614b9a565b604435916141d0565b50346103e85760403660031901126103e8576001600160a01b036040611d116134aa565b9282611d1b6134c0565b9416815260116020522091165f52602052602060405f2054604051908152f35b50346103e857806003193601126103e8576020601054604051908152f35b50346103e85760203660031901126103e857600435611d766144f5565b6107d0811161073d5760407fb404cac19fb1cbeff98d325795b08886e3cd8fe8cb1a2f193aac66f13fb239c391600d549080600d5582519182526020820152a180f35b50346103e857806003193601126103e8576020601354604051908152f35b50346103e857806003193601126103e85760206001600160a01b0360025416604051908152f35b50346103e857806003193601126103e857611e176144f5565b806001600160a01b038154811981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346103e857806003193601126103e85760206001600160a01b0360035416604051908152f35b50346103e85760403660031901126103e857611e916134aa565b90611e9a6134c0565b611ea26144f5565b6001600160a01b0383169283151580611f5b575b611f4c576001600160a01b03821680151580611f43575b6114ef577f92f63be5e4bfac76f996bbbee86c4933f30141307811e42d6977a697dd8fc3ec93946001600160a01b031960175416176017556001600160a01b03196018541617601855611f3d604051928392839092916001600160a01b0360209181604085019616845216910152565b0390a180f35b50823b15611ecd565b63e6c4247b60e01b8352600483fd5b50803b15611eb6565b50346103e85760203660031901126103e8576020610985611f836134aa565b61416f565b50346103e857806003193601126103e857604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa82908391818594869361218e575b50611ffa5763b41b6cb160e01b8552600485fd5b6402540be4008312801561217f575b6121705761201960165442613cc7565b84106121705769ffffffffffffffffffff908116911681116121615769ffffffffffffffffffff906008606060405161205181613518565b858152866020820152836040820152015282600a5583600b551669ffffffffffffffffffff19600c541617600c55600c546aff00000000000000000000600860501b16906aff00000000000000000000191617600c5560125460ff81168061211f575b50506013546120e5575b7fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b7fd1cdd29a2fc16e6ed81266a11c8f7f06897e72e22d1bb9ccf34d63c3583d5df360206014548560135585601455604051908152a16120be565b60407f5e5763e2a601dbb21ceae7f64e18f3d572378b373daa8d75a325f22f377f0ecb918151908152866020820152a160ff1916601255826015555f806120b4565b63b41b6cb160e01b8452600484fd5b63b41b6cb160e01b8552600485fd5b506509184e72a0008313612009565b92509350506121b5915060a03d60a0116121c4575b6121ad8183613580565b8101906140ac565b9492915092909293915f611fe6565b503d6121a3565b50346103e85760203660031901126103e85760406020916001600160a01b036121f26134aa565b168152600883522054604051908152f35b50346103e85760403660031901126103e8576001600160a01b0360406122276134aa565b92826122316134c0565b9416815260066020522091165f526020526040805f205460ff82519165ffffffffffff8116835260301c1615156020820152f35b50346103e857806003193601126103e85760206001600160a01b0360045416604051908152f35b50346103e857806003193601126103e8576020600f54604051908152f35b50346103e857806003193601126103e8576020604051610e108152f35b50346103e857806003193601126103e85760206001600160a01b03601d5416604051908152f35b50346103e85760603660031901126103e8576123086134aa565b60243567ffffffffffffffff811161049057612328903690600401613618565b9060443567ffffffffffffffff8111610e3957612349903690600401613618565b90926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361246a5781810361245b5791936001600160a01b03169185805b82811061239c575080f35b85857f272958aacfbf07577da4ede62cc7d612dfb0881c6489c961988ef59378d7709f60206001600160a01b036124476123f2878b8f61240e838e6124419360019f60408f918f926123f2878b6123f793614152565b614162565b92815260068e52208b61241361240e878787614152565b613824565b165f528c5260405f209066ff000000000000825491151560301b169066ff0000000000001916179055614152565b98614152565b9460405195151586521693a3018690612391565b63c52a9bd360e01b8652600486fd5b6282b42960e81b8652600486fd5b50346103e85760403660031901126103e8576124926134aa565b6001600160a01b036124a26134c0565b916124ab6144f5565b168083526011602052604083206001600160a01b0383165f5260205260405f20549182156125235760206001600160a01b037fe4ddb9696b79889a2b0002aa61f703666d072c319c0694d71624728605bdd2879284875260118352604087208282165f5283528660405f20556040519586521693a380f35b630342954b60e21b8452600484fd5b50346103e85760403660031901126103e85761254c6134aa565b6125546134c0565b61255c614d88565b604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156127bf578491612790575b5015611564576001600160a01b0382168015801561277f575b612770576001600160a01b036003541680156127615760206024916040519283809263b8d7b66960e01b82523360048301525afa8015612756578291869161270a575b506001600160a01b0316036126fb577f823c9466affb5a8646bc5f7e6304f72a4622cc01af819ec2f51b1130a725c6d1916126f5913386526005602052604086209060018201906001600160a01b0319825416179055600281016001600160a01b0383166001600160a01b031982541617905570010000000000000000000000000000000070ff00000000000000000000000000000000198254161790556040519182913395839092916001600160a01b0360209181604085019616845216910152565b0390a280f35b6367cc8b7560e01b8452600484fd5b9150506020813d60201161274e575b8161272660209383613580565b81010312610e3957516001600160a01b0381168103610e395781906001600160a01b03612631565b3d9150612719565b6040513d87823e3d90fd5b63c52a9bd360e01b8552600485fd5b63c52a9bd360e01b8452600484fd5b506001600160a01b038216156125ee565b6127b2915060203d6020116127b8575b6127aa8183613580565b81019061413a565b5f6125d5565b503d6127a0565b6040513d86823e3d90fd5b50346103e857806003193601126103e8576020600954604051908152f35b50346103e85760203660031901126103e8576001600160a01b0361280a6134aa565b6128126144f5565b16801561068357600354816001600160a01b0382167f05ba7ce38b27f49ba3b81247ac7a13b30021ce3e90f633a2498fa9d1a09579908580a36001600160a01b0319161760035580f35b50346103e857806003193601126103e8575061102260405161287f604082613580565b601481527f53757065725061796d61737465722d352e332e3300000000000000000000000060208201526040519182916020835260208301906135f4565b50346103e85760803660031901126103e85760243560043560443567ffffffffffffffff8111611c43576128f59036906004016134ea565b505060643560ff8116809103611c43576001600160a01b03600e541633141580612b3f575b612b3157600b5483111561216157611c1f19420142811161180257831061216157600f4201804211611802578311612161576402540be40082128015612b22575b61216157604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa8086928792612af9575b50612a86575b5050600190600860606040516129c381613518565b85815260208101879052604081018890520152600a839055600b849055600c80546affffffffffffffffffffff19166a08000000000000000000001790551480612a78575b612a33577fdb6fb3cf4cc5fb760bcd63b958a53b2396776dff32c063188e864296541e76bd8380a380f35b6012547f5e5763e2a601dbb21ceae7f64e18f3d572378b373daa8d75a325f22f377f0ecb6040805160ff84168152866020820152a160ff1916601255826015556120be565b5060ff601254161515612a08565b8582139081612ae3575b50612a9c575b806129ae565b60149080841315612acd5780612abd612ab8612ac293876140de565b6140f6565b61410c565b13612161575f612a96565b80612abd612ab886612ade946140de565b612ac2565b611c209150612af29042613cc7565b105f612a90565b909250612b15915060a03d60a0116121c4576121ad8183613580565b509392505091905f6129a8565b506509184e72a000821361295b565b6282b42960e81b8452600484fd5b506001600160a01b0384541633141561291a565b50346103e857806003193601126103e8576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003612bbe5760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b63703e46dd60e11b8152600490fd5b50346103e85760603660031901126103e8576004359067ffffffffffffffff82116103e85761012060031983360301126103e857612c6c612c5483612c3c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163314613cd4565b612c44614b9a565b6044359060243590600401613d30565b600180556040519283926040845260408401906135f4565b9060208301520390f35b5060403660031901126103e857612c8b6134aa565b9060243567ffffffffffffffff8111611165573660238201121561116557612cbd9036906024816004013591016135be565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115612e94575b50612e8557612cff6144f5565b6040516352d1902d60e01b8152926001600160a01b0381169190602085600481865afa80958596612e51575b50612d4457634c9c8ce360e01b84526004839052602484fd5b9091847f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8103612e3f5750813b15612e2d57806001600160a01b03197f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28151839015612e135780836020612e0f95519101845af4612e09615289565b916152b8565b5080f35b50505034612e1e5780f35b63b398979f60e01b8152600490fd5b634c9c8ce360e01b8452600452602483fd5b632a87526960e21b8552600452602484fd5b9095506020813d602011612e7d575b81612e6d60209383613580565b81010312610e395751945f612d2b565b3d9150612e60565b63703e46dd60e11b8252600482fd5b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614155f612cf2565b50346103e857806003193601126103e85760206001600160a01b0360185416604051908152f35b50346103e857806003193601126103e8576020601554604051908152f35b50346103e857806003193601126103e8576020601454604051908152f35b50346103e85760403660031901126103e857611282612f496134aa565b60243590612f55614b9a565b612f5e81614bfb565b612f77826001600160a01b036002541630903390614cb2565b614cf3565b50346103e85760203660031901126103e857600435612f99614b9a565b3382526005602052806001600160801b0360408420541610613040573382526005602052604082206001600160801b03612fd881841682845416613ca7565b166001600160801b0319825416179055612ff481600f54613cc7565b600f5561300d81336001600160a01b0360025416614bba565b6040519081527f4eea589c35918e3c4d8e0371a062a1d544e41d78fb522381678923b9cd6e6dfa60203392a26001805580f35b3382526005602052604082205463cf47918160e01b83526001600160801b0316600452602452604490fd5b50346103e85760403660031901126103e857806130866134aa565b61308e6144f5565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610f74576001600160a01b036044849283604051958694859363040b850f60e31b855216600484015260243560248401525af1801561087457610c195750f35b50346103e857806003193601126103e8576131156144f5565b6105f8613c58565b50346103e85760403660031901126103e8576004359067ffffffffffffffff82116103e85761012060031983360301126103e85760406131626024356004850161388c565b825191151582526020820152f35b50346103e85760203660031901126103e8576040610120916001600160a01b036131986134aa565b1681526005602052208054906001810154906001600160a01b0360028201541665ffffffffffff600460038401549301549360ff604051966001600160801b0381168852818160801c161515602089015260881c16151560408701526001600160a01b038116606087015263ffffffff8160a01c16608087015260c01c1660a085015260c084015260e0830152610100820152f35b50346103e857806003193601126103e8576132466144f5565b6105f86137e5565b50346103e85760603660031901126103e8576132686134aa565b6024359060038210156104905760443567ffffffffffffffff8111611c43576132959036906004016134ea565b906001600160a01b03600e5416330361339b577fa49f25e6b37dc7492af788d36761dc1b25f8fb6dcc448fb5637dc828725f0d88926080926001600160a01b03928790600188036133695761330b9150848416895260056020526001600160801b03600a8160408c2054160416925b36916135be565b6020815191012090613346604051613324604082613580565b600d81526c088aca8408498a640a6d8c2e6d609b1b602082015282898661451b565b613353604051809861374e565b602087015260408601524260608601521692a280f35b6002881461337c575b61330b9192613304565b8385168952600560205260408920546001600160801b03169150613372565b6282b42960e81b8552600485fd5b50346103e857806003193601126103e857602060ff60125416604051908152f35b50346103e857806003193601126103e85760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b5060203660031901126108685760043563ffffffff8116809103610868576134346144f5565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610868575f90602460405180948193621cb65b60e51b8352600483015234905af1801561349f57613491575080f35b61349d91505f90613580565b005b6040513d5f823e3d90fd5b600435906001600160a01b038216820361086857565b602435906001600160a01b038216820361086857565b35906001600160a01b038216820361086857565b9181601f840112156108685782359167ffffffffffffffff8311610868576020838186019501011161086857565b6080810190811067ffffffffffffffff82111761353457604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761353457604052565b6040810190811067ffffffffffffffff82111761353457604052565b90601f8019910116810190811067ffffffffffffffff82111761353457604052565b67ffffffffffffffff811161353457601f01601f191660200190565b9291926135ca826135a2565b916135d86040519384613580565b829481845281830111610868578281602093845f960137010152565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156108685782359167ffffffffffffffff8311610868576020808501948460051b01011161086857565b8054821015613662575f52600560205f20910201905f90565b634e487b7160e01b5f52603260045260245ffd5b90600182811c921680156136a4575b602083101461369057565b634e487b7160e01b5f52602260045260245ffd5b91607f1691613685565b9060405191825f8254926136c184613676565b808452936001811690811561372c57506001146136e8575b506136e692500383613580565b565b90505f9291925260205f20905f915b8183106137105750509060206136e6928201015f6136d9565b60209193508060019154838589010152019101909184926136f7565b9050602092506136e694915060ff191682840152151560051b8201015f6136d9565b90600382101561375b5752565b634e487b7160e01b5f52602160045260245ffd5b906137b3908251815260208301516020820152604083015160408201526080806137a8606086015160a0606086015260a08501906135f4565b94015191019061374e565b90565b6040906003190112610868576004356001600160a01b0381168103610868579060243580151581036108685790565b601354156136e6577fd1cdd29a2fc16e6ed81266a11c8f7f06897e72e22d1bb9ccf34d63c3583d5df360206014545f6013555f601455604051908152a1565b356001600160a01b03811681036108685790565b903590601e1981360301821215610868570180359067ffffffffffffffff82116108685760200191813603831361086857565b9190820180921161387857565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b0361389d82614979565b1691825f52600560205260405f209283549160ff8360801c1615613c2d5760ff8360881c16613c02576138d2611f8385613824565b15613bd75760e084019160346138e88487613838565b90501015613b7f575b5f52600660205260405f206001600160a01b0361390d86613824565b165f5260205260405f209460206040519661392788613564565b549660ff65ffffffffffff89169889835260301c1615159182910152613b63576001015465ffffffffffff8160c01c168015159687613b59575b87613b44575b50505f199260686139788288613838565b90501015613b1f575b506001600160a01b031691604051633ba0b9a960e01b8152602081600481875afa90811561349f575f91613aed575b5011613ac257600b548015908115613aac575b50613a92576139d1906149aa565b91600d5492836127100193846127101161387857612af801809411613878576001600160801b0393613a0291614a5f565b9283911610613a6857613a17613a1d93613824565b90614a78565b613a4157613a2c576001905f90565b5f906b1490551157d312535255115160a21b90565b505f907f4352454449545f4558434545444544000000000000000000000000000000000090565b505050505f907f494e53554646494349454e545f42414c414e434500000000000000000000000090565b505f946a5354414c455f505249434560a81b945092505050565b613aba91506016549061386b565b42115f6139c3565b50505050505f907f524154455f434f4d4d49544d454e545f56494f4c41544544000000000000000090565b90506020813d602011613b17575b81613b0860209383613580565b8101031261086857515f6139b0565b3d9150613afb565b613b2b91935085613838565b6068116108685760480135916001600160a01b03613981565b613b4f92975061386b565b4210945f80613967565b8015159750613961565b505f956b1554d15497d09313d0d2d15160a21b95509350505050565b613b898386613838565b603411610868576001600160801b03602462030d4092013560801c1610156138f1575050505050505f907f504f53544f505f4741535f544f4f5f4c4f57000000000000000000000000000090565b50505050505f907f555345525f4e4f545f454c494749424c4500000000000000000000000000000090565b50505050505f907f4f50455241544f525f504155534544000000000000000000000000000000000090565b50505050505f907f4f50455241544f525f4e4f545f434f4e4649475552454400000000000000000090565b601d546001600160a01b038116908115613ca3576001600160a01b031916601d555f601e557fde82ad51cc1336e141528846e966b9e7f7ae89a78ebb71d1f0da0d851592d8ee5f80a2565b5050565b906001600160801b03809116911603906001600160801b03821161387857565b9190820391821161387857565b15613cdb57565b60405162461bcd60e51b815260206004820152602760248201527f426173655061796d61737465723a2063616c6c6572206973206e6f7420456e746044820152661c9e541bda5b9d60ca1b6064820152608490fd5b92916001600160a01b03613d4385614979565b16805f52600560205260405f209283549260ff8460801c161561408057613d6f600b546016549061386b565b945f9460ff8160881c1661406957613d89611f838a613824565b156140695760e08901926034613d9f858c613838565b90501015614025575b855f52600660205260405f206001600160a01b03613dc58c613824565b165f5260205260405f2060ff60405191613dde83613564565b5465ffffffffffff8116835260301c161515806020830152613f89579083929160018c9695019485549165ffffffffffff8360c01c169081613ff9575b50506068613e2b825f1999613838565b90501015613fd4575b506001600160a01b031694604051633ba0b9a960e01b81526020816004818a5afa90811561349f575f91613fa2575b5011613f8957613e72906149aa565b600d5490816127100191826127101161387857612af80180921161387857613ea891613e9d91614a5f565b8095613a178d613824565b613f68576001600160801b0316838110613f68576001600160a01b03926003613f16936001600160801b03613ee18795828a1690613ca7565b166001600160801b031982541617815501613efd86825461386b565b9055613f0b8560105461386b565b601055541698613824565b6040519860208a01521660408801526060870152608086015260a085015260a08452613f4360c085613580565b60a09190911b65ffffffffffff60a01b1660d09190911b6001600160d01b0319161790565b50505050505050509050604051613f80602082613580565b5f815290600190565b5050505050505050509050604051613f80602082613580565b90506020813d602011613fcc575b81613fbd60209383613580565b8101031261086857515f613e63565b3d9150613fb0565b613fe09196508c613838565b6068116108685760480135946001600160a01b03613e34565b5165ffffffffffff168015613e1b57919a5001955065ffffffffffff8611613878578b95985f80613e1b565b61402f848b613838565b603411610868576001600160801b03602462030d4092013560801c161015613da85750505050505050509050604051613f80602082613580565b505050505050509050604051613f80602082613580565b50505050509050604051613f80602082613580565b519069ffffffffffffffffffff8216820361086857565b908160a0910312610868576140c081614095565b916020820151916040810151916137b3608060608401519301614095565b81810392915f13801582851316918412161761387857565b9060648202918083056064149015171561387857565b811561412657600160ff1b81145f19831416613878570590565b634e487b7160e01b5f52601260045260245ffd5b90816020910312610868575180151581036108685790565b91908110156136625760051b0190565b3580151581036108685790565b6001600160a01b0381165f52600760205260ff60405f205416908115614193575090565b6137b39150614482565b8181029291811591840414171561387857565b906001600160801b03809116911601906001600160801b03821161387857565b91908015614400578260a09181010312610868576141ed826134d6565b916141fa602082016134d6565b6040820135906001600160a01b03808061421b6080606088013597016134d6565b97169216951693845f52600560205265ffffffffffff600160405f20015460c01c166143c3575b835f52602160205260ff60405f2054166143bb57835f52602160205260405f20600160ff19825416179055845f526005602052600460405f2001908154915f198314613878576001614296930190556149aa565b92600d54612710018061271011613878576142b4612710918661419d565b0492808410156143ad577fcde7e91a718e2439d8ff2a679ad52713e82a37b72622fb530c8c41039fdd5bf094928492876142f360409761435595613cc7565b916001600160801b03831161439e575b858b601054808611614365575b5061431b9495614e45565b865f526005602052845f206001600160801b0361433d818416828454166141b0565b166001600160801b0319825416179055601054613cc7565b60105582519182526020820152a3565b847f418c06850785ce4239177091a96c1757ba1d5ba22df98a4cf818e1510fa028cd8c61431b988151908152846020820152a294614310565b6001600160801b039250614303565b92509250936136e694614e45565b505050505050565b845f52600660205260405f206001600160a01b0387165f5260205260405f2065ffffffffffff8042161665ffffffffffff19825416179055614242565b505050565b600b5480156144265761442265ffffffffffff916016549061386b565b1690565b505f90565b600382101561375b5752565b906136e660405161444781613548565b608060ff60048396805485526001810154602086015260028101546040860152614473600382016136ae565b6060860152015416910161442b565b6001600160a01b03601754169081156144ef576001600160a01b036024602092604051948593849263710d9c6960e11b84521660048301525afa5f91816144ce575b506137b357505f90565b6144e891925060203d6020116127b8576127aa8183613580565b905f6144c4565b50505f90565b6001600160a01b035f5416330361450857565b63118cdaa760e01b5f523360045260245ffd5b6001600160a01b0390939192931692835f52600560205260405f2060038410158061375b578461495d5760ff600a5b169061375b576002851461492b575b60ff825460881c16614901575b60018201918163ffffffff845460a01c16115f146148ee578163ffffffff845460a01c160363ffffffff811161387857835463ffffffff60a01b191660a09190911b63ffffffff60a01b161783555b836147ee575b50855f52600860205260405f2093604051916145d683613548565b42835260208301858152604084019182526060840192835260808401966145fd898961442b565b8054680100000000000000008110156135345761461f91600182018155613649565b9490946147db57518455516001840155516002830155518051600383019167ffffffffffffffff8211613534576146568354613676565b601f811161478a575b50602090601f8311600114614723576004949392915f9183614718575b50508160011b915f199060031b1c19161790555b019251600381101561375b577fa7503227727e36abb7f0ecf24f626347ccc20233c48c554d49d7d2077a1a3040604063ffffffff946147097ffc577563f1b9a0461e24abef1e1fcc0d33d3d881f20b5df6dda59de4aae2c821986020988b9660ff8019835416911617905583519283528883019061374e565ba25460a01c16604051908152a2565b015190505f8061467c565b90601f19831691845f52815f20925f5b81811061477257509160019391856004989796941061475a575b505050811b019055614690565b01515f1960f88460031b161c191690555f808061474d565b92936020600181928786015181550195019301614733565b8281111561465f57835f5260205f20601f840160051c90602085106147d3575b81601f9101920160051c03905f5b8281106147c657505061465f565b5f828201556001016147b8565b5f91506147aa565b634e487b7160e01b5f525f60045260245ffd5b6001600160801b03815416610bb8810290808204610bb81490151715613878576127109004808511614892575b5080546001600160801b031684811061486c57506001600160801b0361484681861682845416613ca7565b166001600160801b03198254161790556148628360105461386b565b6010555b5f6145bb565b9193506001600160801b031981541690556148898160105461386b565b60105591614866565b6020919594506010826148e792966040519481869251918291018484015e81017f2028436170706564206174203330252900000000000000000000000000000000838201520301600f19810184520182613580565b935f61481b565b825463ffffffff60a01b191683556145b5565b857fc5437eb8dd091f69800961953f2bb0bc16ae1ff2d3e52caa96796db65f8271da5f80a2614566565b815471ff0000000000000000000000000000000000191671010000000000000000000000000000000000178255614559565b505f600185036149705760ff601461454a565b60ff603261454a565b60e0810160486149898284613838565b9050106144ef5761499991613838565b604811610868576034013560601c90565b604051906149b782613518565b600a5490818352600b54602084015260ff6060600c549469ffffffffffffffffffff86166040820152019360501c1683525f821315614a505760ff916149fc9161419d565b915116604d811161387857600954614a1691600a0a61419d565b614a2981670de0b6b3a764000084615188565b91811561412657670de0b6b3a76400009009614a425790565b600181018091116138785790565b63b41b6cb160e01b5f5260045ffd5b9061271090614a6f828285615188565b9209614a425790565b604051634d3c739760e11b81526001600160a01b0392831660048201819052939190921691602081602481865afa90811561349f575f91614b66575b50614ad990614ade935f52601160205260405f20855f5260205260405f20549061386b565b61386b565b60405191632c333e2560e01b835260048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa91821561349f575f92614b3557501190565b9091506020813d602011614b5e575b81614b5160209383613580565b8101031261086857511090565b3d9150614b44565b90506020813d602011614b92575b81614b8160209383613580565b810103126108685751614ade614ab4565b3d9150614b74565b600260015414614bab576002600155565b633ee5aeb560e01b5f5260045ffd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526136e691614bf6606483613580565b61521d565b6001600160a01b0360405191632474521560e21b83527f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f60048401521660248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa90811561349f575f91614c93575b5015614c8557565b6282b42960e81b5f5260045ffd5b614cac915060203d6020116127b8576127aa8183613580565b5f614c7d565b9091926001600160a01b036136e69481604051956323b872dd60e01b6020880152166024860152166044840152606483015260648252614bf6608483613580565b6001600160801b038211614d795760206001600160a01b037f06653c045d0a3144153a51ac6909baae43b8d5b67184cb74e988b72858727fe4921692835f526005825260405f206001600160801b03614d51818416828454166141b0565b166001600160801b0319825416179055614d6d81600f5461386b565b600f55604051908152a2565b6354ada05560e01b5f5260045ffd5b604051632474521560e21b81527f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f60048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561349f575f91614c93575015614c8557565b6001600160a01b03805f549216918282198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b6001600160a01b031692833b1561086857604051635c1d516f60e11b81526001600160a01b038316600482015260248101849052604481018290525f92908381606481838a5af190816150de575b506143bb57604051634d3c739760e11b81526001600160a01b0382166004820181905296906020816024818a5afa90811561275657869086926150a8575b50614ad9614ef6928988526011602052604088208b5f5260205260405f20549061386b565b604051632c333e2560e01b815260048101899052906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa91821561509d578692615069575b50116150075750843b15610490576040516330f5344160e01b81526001600160a01b0391909116600482015260248101849052604481019190915281808260648183895af19182614ff2575b5050614fec577f8d05946ad7acf1695cdb2c1c7b76b11a907b33e5224f086eea17d6a23841e17f9160406020925b8581526011845220855f52825260405f20614fe182825461386b565b9055604051908152a3565b50505050565b81614ffc91613580565b61116557815f614f97565b7f8d05946ad7acf1695cdb2c1c7b76b11a907b33e5224f086eea17d6a23841e17f94925060409150926001600160a01b0360209416815260068452818120875f528452815f20660100000000000066ff00000000000019825416179055614fc5565b9091506020813d602011615095575b8161508560209383613580565b810103126108685751905f614f4b565b3d9150615078565b6040513d88823e3d90fd5b9150506020813d6020116150d6575b816150c460209383613580565b81010312610868575185614ad9614ed1565b3d91506150b7565b6150eb9194505f90613580565b5f925f614e93565b604051633fabe5a360e21b815260a0816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa5f9181615162575b506151455750600190565b801561515c57610e10810180911161387857421190565b50600190565b61517c91925060a03d60a0116121c4576121ad8183613580565b5092505050905f61513a565b9091828202915f198482099383808610950394808603951461520f578483111561520057829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b63227bc15360e01b5f5260045ffd5b505091508115614126570490565b5f806001600160a01b0361524693169360208151910182865af161523f615289565b90836152b8565b805190811515918261526e575b505061525c5750565b635274afe760e01b5f5260045260245ffd5b615281925060208091830101910161413a565b155f80615253565b3d156152b3573d9061529a826135a2565b916152a86040519384613580565b82523d5f602084013e565b606090565b906152dc57508051156152cd57805190602001fd5b630a12f52160e11b5f5260045ffd5b81511580615309575b6152ed575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156152e556fef0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/sdk/variables/TEST_ACCOUNT_ADDRESSES.md b/api/@aastar/sdk/variables/TEST_ACCOUNT_ADDRESSES.md new file mode 100644 index 000000000..5345e8f62 --- /dev/null +++ b/api/@aastar/sdk/variables/TEST_ACCOUNT_ADDRESSES.md @@ -0,0 +1,11 @@ +> `const` **TEST\_ACCOUNT\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L68) + +Test Account Addresses (For Development & Testing) + +## Type Declaration + +### simpleAccountFactory + +> `readonly` **simpleAccountFactory**: `` `0x${string}` `` diff --git a/api/@aastar/sdk/variables/TEST_ACCOUNT_POOL_SIZE.md b/api/@aastar/sdk/variables/TEST_ACCOUNT_POOL_SIZE.md new file mode 100644 index 000000000..51a80cb01 --- /dev/null +++ b/api/@aastar/sdk/variables/TEST_ACCOUNT_POOL_SIZE.md @@ -0,0 +1,3 @@ +> `const` **TEST\_ACCOUNT\_POOL\_SIZE**: `20` = `20` + +Defined in: [packages/core/src/constants.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L91) diff --git a/api/@aastar/sdk/variables/TEST_COMMUNITIES.md b/api/@aastar/sdk/variables/TEST_COMMUNITIES.md new file mode 100644 index 000000000..1dc9f6a4f --- /dev/null +++ b/api/@aastar/sdk/variables/TEST_COMMUNITIES.md @@ -0,0 +1,19 @@ +> `const` **TEST\_COMMUNITIES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L107) + +Test Community Addresses (Registered in Registry v2.2.0 on 2025-11-08) + +## Type Declaration + +### aastar + +> `readonly` **aastar**: `` `0x${string}` `` + +### bread + +> `readonly` **bread**: `` `0x${string}` `` + +### mycelium + +> `readonly` **mycelium**: `` `0x${string}` `` diff --git a/api/@aastar/sdk/variables/TEST_TOKEN_ADDRESSES.md b/api/@aastar/sdk/variables/TEST_TOKEN_ADDRESSES.md new file mode 100644 index 000000000..ed5b2109a --- /dev/null +++ b/api/@aastar/sdk/variables/TEST_TOKEN_ADDRESSES.md @@ -0,0 +1,19 @@ +> `const` **TEST\_TOKEN\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L59) + +Test Token Addresses (For Development & Testing) + +## Type Declaration + +### aPNTs + +> `readonly` **aPNTs**: `` `0x${string}` `` + +### bPNTs + +> `readonly` **bPNTs**: `` `0x${string}` `` + +### mockUSDT + +> `readonly` **mockUSDT**: `` `0x${string}` `` diff --git a/api/@aastar/sdk/variables/TOKEN_ADDRESSES.md b/api/@aastar/sdk/variables/TOKEN_ADDRESSES.md new file mode 100644 index 000000000..90bbba408 --- /dev/null +++ b/api/@aastar/sdk/variables/TOKEN_ADDRESSES.md @@ -0,0 +1,11 @@ +> `const` **TOKEN\_ADDRESSES**: `object` + +Defined in: [packages/core/src/contract-addresses.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-addresses.ts#L52) + +Token System Addresses + +## Type Declaration + +### xPNTsFactory + +> `readonly` **xPNTsFactory**: `` `0x${string}` `` = `XPNTS_FACTORY_ADDRESS` diff --git a/api/@aastar/sdk/variables/V2_SUMMARY.md b/api/@aastar/sdk/variables/V2_SUMMARY.md new file mode 100644 index 000000000..afc687312 --- /dev/null +++ b/api/@aastar/sdk/variables/V2_SUMMARY.md @@ -0,0 +1,39 @@ +> `const` **V2\_SUMMARY**: `object` + +Defined in: [packages/core/src/contract-versions.ts:364](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/contract-versions.ts#L364) + +V2 Contract Summary + +## Type Declaration + +### allContractsHaveVersion + +> `readonly` **allContractsHaveVersion**: `true` = `true` + +### categories + +> `readonly` **categories**: `object` + +#### categories.core + +> `readonly` **core**: `5` = `5` + +#### categories.monitoring + +> `readonly` **monitoring**: `2` = `2` + +#### categories.testTokens + +> `readonly` **testTokens**: `2` = `2` + +#### categories.tokens + +> `readonly` **tokens**: `2` = `2` + +### latestDeployment + +> `readonly` **latestDeployment**: `"2025-11-09"` = `'2025-11-09'` + +### totalContracts + +> `readonly` **totalContracts**: `11` = `11` diff --git a/api/@aastar/sdk/variables/VOUCHER_TYPES.md b/api/@aastar/sdk/variables/VOUCHER_TYPES.md new file mode 100644 index 000000000..8149952a6 --- /dev/null +++ b/api/@aastar/sdk/variables/VOUCHER_TYPES.md @@ -0,0 +1,9 @@ +> `const` **VOUCHER\_TYPES**: `object` + +Defined in: [packages/channel/src/voucher.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/channel/src/voucher.ts#L3) + +## Type Declaration + +### Voucher + +> `readonly` **Voucher**: readonly \[\{ `name`: `"channelId"`; `type`: `"bytes32"`; \}, \{ `name`: `"cumulativeAmount"`; `type`: `"uint128"`; \}\] diff --git a/api/@aastar/sdk/variables/X402FacilitatorABI.md b/api/@aastar/sdk/variables/X402FacilitatorABI.md new file mode 100644 index 000000000..fd9b0dd3b --- /dev/null +++ b/api/@aastar/sdk/variables/X402FacilitatorABI.md @@ -0,0 +1,3 @@ +> `const` **X402FacilitatorABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L137) diff --git a/api/@aastar/sdk/variables/X402FacilitatorArtifact.md b/api/@aastar/sdk/variables/X402FacilitatorArtifact.md new file mode 100644 index 000000000..4bbc0c2f8 --- /dev/null +++ b/api/@aastar/sdk/variables/X402FacilitatorArtifact.md @@ -0,0 +1,13 @@ +> `const` **X402FacilitatorArtifact**: `object` = `X402FacilitatorABIData` + +Defined in: [packages/core/src/abis/index.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L138) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60c03461012457601f61122938819003918201601f19168301916001600160401b038311848410176101285780849260409485528339810103126101245780516001600160a01b038116918282036101245760200151906001600160a01b0382168083036101245760015f5533156101115760018054336001600160a01b0319821681179092556040519591906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a315908115610108575b506100f95760805260a0526110ec908161013d8239608051818181610b270152610cf0015260a05181818161057a015261086e0152f35b63c52a9bd360e01b5f5260045ffd5b9050155f6100c2565b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c90816306433b1b14610b0a575080632540c47114610aac5780634ee1a3d614610a7d57806354fd4d5014610a07578063715018a6146109b55780637344209c14610678578063761cda33146106495780638670d78d146105fc5780638da5cb5b146105d6578063928624e71461059e578063b08ec5ca1461055b578063bac256d61461053e578063c50cff87146104e8578063d4c38f5214610426578063ef842a46146103d2578063f2fde38b146103545763f3a729da146100d9575f80fd5b346102d9576101203660031901126102d9576100f3610b4b565b906100fc610b61565b610104610b77565b60643590608435926101043567ffffffffffffffff81116102d95761012d903690600401610b8d565b610138979197610c87565b60405160208101906001600160a01b038516825287604082015260e435606082015260608152610169608082610bbb565b5190209761017989878588610ca5565b968711610345576040516370a0823160e01b8152306004820152916001600160a01b0386169190602084602481865afa938415610306575f94610311575b50823b156102d9578a61010489835f9460405196879586946388b7ab6360e01b86526001600160a01b038d166004870152306024870152604486015260a435606486015260c435608486015260a485015260e060c48501528160e4850152848401378181018301859052601f01601f1916810103018183865af18015610306576102f0575b506020602491604051928380926370a0823160e01b82523060048301525afa9081156102e5579086929189916102a8575b509061027891610c3f565b106102995792602096926001959261028f95610e07565b9155604051908152f35b63760a602d60e01b8652600486fd5b919250506020813d6020116102dd575b816102c560209383610bbb565b810103126102d9575185919061027861026d565b5f80fd5b3d91506102b8565b6040513d8a823e3d90fd5b6102fd9198505f90610bbb565b5f96602061023c565b6040513d5f823e3d90fd5b9093506020813d60201161033d575b8161032d60209383610bbb565b810103126102d95751925f6101b7565b3d9150610320565b631fb915a760e31b5f5260045ffd5b346102d95760203660031901126102d9576001600160a01b03610375610b4b565b61037d610c60565b1680156103bf576001600160a01b03600154828219821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b346102d95760403660031901126102d9576103eb610b4b565b6001600160a01b036103fb610b61565b91165f5260056020526001600160a01b0360405f2091165f52602052602060405f2054604051908152f35b346102d95760203660031901126102d95761043f610b4b565b610447610c87565b335f52600560205260405f206001600160a01b0382165f5260205260405f20549081156104d0576001600160a01b0390335f52600560205260405f208282165f526020525f6040812055169061049e813384610e9f565b6040519081527fdd3840d6dd5c33bfa3b3743f47978de59805ce10f5170e1659be2936e489d73e60203392a360015f55005b63cf47918160e01b5f525f600452600160245260445ffd5b346102d95760403660031901126102d957610501610b4b565b6024359061050d610c60565b6101f4821161052f576001600160a01b03165f52600360205260405f20555f80f35b6358d620b360e01b5f5260045ffd5b346102d9575f3660031901126102d9576020600254604051908152f35b346102d9575f3660031901126102d95760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d95760203660031901126102d9576001600160a01b036105bf610b4b565b165f526003602052602060405f2054604051908152f35b346102d9575f3660031901126102d95760206001600160a01b0360015416604051908152f35b346102d95760203660031901126102d9576001600160a01b0361061d610b4b565b165f90815260036020526040902054801561063e576020905b604051908152f35b506020600254610636565b346102d95760603660031901126102d9576020610636610667610b4b565b61066f610b61565b60443591610c09565b346102d9576101003660031901126102d957610692610b4b565b61069a610b61565b906106a3610b77565b916064356084359060a4359460c4359360e43567ffffffffffffffff81116102d9576106d3903690600401610b8d565b6106de979197610c87565b8842116109a65761083a906040519860208a017f1605d38f16362508f9156040bddd3aeadb19a55923f0d909d03527e49490c0f481526001600160a01b0385169a8b60408201526001600160a01b03871660608201526001600160a01b0388169c8d60808301528960a08301528a60c083015260e08201528a610100820152610100815261076e61012082610bbb565b51902060405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527fcf28fe6d6b103093f66376be2e9d1de0cc43069bc3a973154c752d0d0a98139060408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815261080360c082610bbb565b5190209060405190602082019261190160f01b84526022830152604282015260428152610831606282610bbb565b51902084610ed8565b156109975761084b86858386610ca5565b948511610345576040516312dc51a560e31b8152600481018990526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610306575f91610978575b501561096957604051633b2a7c0560e21b81523360048201526020816024818c5afa908115610306575f9161093a575b501561092c5761091b61092097602099604051916323b872dd60e01b8c840152602483015230604483015286606483015260648252610916608483610bbb565b610fdc565b610e07565b60015f55604051908152f35b6282b42960e81b5f5260045ffd5b61095c915060203d602011610962575b6109548183610bbb565b810190610bf1565b896108d6565b503d61094a565b6367cc8b7560e01b5f5260045ffd5b610991915060203d602011610962576109548183610bbb565b896108a6565b63f9d36a7160e01b5f5260045ffd5b63241d197f60e11b5f5260045ffd5b346102d9575f3660031901126102d9576109cd610c60565b5f6001600160a01b0360015481198116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102d9575f3660031901126102d9576040805190610a268183610bbb565b6015825260208201917f58343032466163696c697461746f722d312e302e30000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b346102d95760203660031901126102d9576004355f526004602052602060ff60405f2054166040519015158152f35b346102d95760203660031901126102d957600435610ac8610c60565b6101f4811161052f5760407f9b6bf5a61deb3c460999ea46c3ff444018a6f424eb8807d5e7e7ca031461cb9891600254908060025582519182526020820152a1005b346102d9575f3660031901126102d9576020906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b600435906001600160a01b03821682036102d957565b602435906001600160a01b03821682036102d957565b604435906001600160a01b03821682036102d957565b9181601f840112156102d95782359167ffffffffffffffff83116102d957602083818601950101116102d957565b90601f8019910116810190811067ffffffffffffffff821117610bdd57604052565b634e487b7160e01b5f52604160045260245ffd5b908160209103126102d9575180151581036102d95790565b916001600160a01b0360405192816020850195168552166040830152606082015260608152610c39608082610bbb565b51902090565b91908203918211610c4c57565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03600154163303610c7457565b63118cdaa760e01b5f523360045260245ffd5b60025f5414610c965760025f55565b633ee5aeb560e01b5f5260045ffd5b9392604051632474521560e21b81527f2024516755f401845808190bb830b0e4523d0df0845503cab52130a794699a0f60048201523360248201526020816044816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610306575f91610de8575b501561092c57805f52600460205260ff60405f205416610dda57610d449185610c09565b805f52600460205260ff60405f205416610dda575f52600460205260405f20600160ff19825416179055335f52600360205260405f2054908115610dd0575b818102918183041490151715610c4c5761271090049182610da15750565b335f5260056020526001600160a01b0360405f2091165f5260205260405f20805490838201809211610c4c5755565b6002549150610d83565b623f613760e71b5f5260045ffd5b610e01915060203d602011610962576109548183610bbb565b5f610d20565b90936080947fecef7698217b345db7161a8d2ffa4e7109c3ca0fe6e64ca6627ee67be3e818fc6001600160a01b0380809997961694610e50610e498689610c3f565b8588610e9f565b1697889216968793604051908682528760208301526040820152876060820152a3604051936020850195865260408501526060840152608083015260a082015260a08152610c3960c082610bbb565b610ed6926001600160a01b036040519363a9059cbb60e01b6020860152166024840152604483015260448252610916606483610bbb565b565b90919392935f906001600160a01b03831615610fd3576040519160048301602484019560448501916064860193873b15610f425750936064938a80948a9b9c9460209b9a9998630b135d3f60e11b8a525260408a52523701915afa9051630b135d3f60e11b141690565b999350509395505080604014610f8f57604114610f5f5750505050565b60408092939496508101355f1a60205281375b5f526020600160805f825afa511860601b3d11915f606052604052565b507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9192939550602081013590601b8260ff1c016020523560405216606052610f72565b505f9450505050565b5f6001600160a01b038192169260208151910182855af13d15611079573d67ffffffffffffffff8111610bdd57604051611036929091611026601f8201601f191660200184610bbb565b82523d5f602084013e5b83611085565b805190811515918261105e575b505061104c5750565b635274afe760e01b5f5260045260245ffd5b6110719250602080918301019101610bf1565b155f80611043565b61103690606090611030565b906110a9575080511561109a57805190602001fd5b630a12f52160e11b5f5260045ffd5b815115806110d6575b6110ba575090565b6001600160a01b0390639996b31560e01b5f521660045260245ffd5b50803b156110b256fea164736f6c6343000821000a"` diff --git a/api/@aastar/sdk/variables/XPNTS_FACTORY_ADDRESS.md b/api/@aastar/sdk/variables/XPNTS_FACTORY_ADDRESS.md new file mode 100644 index 000000000..2b53be6aa --- /dev/null +++ b/api/@aastar/sdk/variables/XPNTS_FACTORY_ADDRESS.md @@ -0,0 +1,3 @@ +> **XPNTS\_FACTORY\_ADDRESS**: `` `0x${string}` `` + +Defined in: [packages/core/src/constants.ts:38](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/constants.ts#L38) diff --git a/api/@aastar/sdk/variables/xPNTsFactoryABI.md b/api/@aastar/sdk/variables/xPNTsFactoryABI.md new file mode 100644 index 000000000..0e33395c2 --- /dev/null +++ b/api/@aastar/sdk/variables/xPNTsFactoryABI.md @@ -0,0 +1,3 @@ +> `const` **xPNTsFactoryABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L104) diff --git a/api/@aastar/sdk/variables/xPNTsFactoryArtifact.md b/api/@aastar/sdk/variables/xPNTsFactoryArtifact.md new file mode 100644 index 000000000..323775e9b --- /dev/null +++ b/api/@aastar/sdk/variables/xPNTsFactoryArtifact.md @@ -0,0 +1,13 @@ +> `const` **xPNTsFactoryArtifact**: `object` = `xPNTsFactoryABIData` + +Defined in: [packages/core/src/abis/index.ts:105](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L105) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x60c03461022257601f614fd938819003918201601f19168301916001600160401b038311848410176101e857808492604094855283398101031261022257610052602061004b83610226565b9201610226565b90331561020f575f8054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a01b038316156101fc576139398181016001600160401b038111838210176101e85782916116a0833903905ff080156101dd5760018060a01b031660a05260018060a01b031660018060a01b0319600154161760015560805266470de4df820000600755671bc16d674ec800006024604051634465466960e01b81526006600482015220556714d1120d7b16000060266040516547616d696e6760d01b81526006808201522055670de0b6b3a764000060266040516514dbd8da585b60d21b815260068082015220556710a741a46278000060236040516244414f60e81b815260066003820152205567120a871cc002000060236040516213919560ea1b8152600660038201522055604051611465908161023b82396080518181816106d901526110eb015260a0518181816107490152610c380152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b634726455360e11b5f525f60045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b51906001600160a01b03821682036102225756fe6080806040526004361015610012575f80fd5b5f905f3560e01c9081621b4db81461110f5750806306433b1b146110cc57806308c2ddcd1461108b5780630ff654141461106e5780632598c32a14610f785780632a5c792a14610eb0578063358064a814610e3857806335fa61fa14610dde578063382c803614610d0d57806354fd4d5014610c9f578063594a6f2314610c8257806359734e1a14610c825780635ae48ba414610c5c5780635c60da1b14610c1957806367d7bc0614610bf0578063715018a614610b995780637ade132c14610b155780638da5cb5b14610af05780638dbb03b11461056d578063931c706514610acf578063954ebd3b146105eb57806396e28d28146105ae5780639bb0f59914610572578063a121377a1461056d578063a137891e1461054a578063a55097581461047c578063ab7984491461025e578063ae9a6d6f146103de578063b2bcfd34146103b2578063b8d7b66914610378578063be382cdb146102b5578063df9a70ea1461025e578063ec81aadb1461021b5763f2fde38b14610193575f80fd5b34610218576020366003190112610218576001600160a01b036101b4611129565b6101bc611432565b1680156102045781546001600160a01b03198116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b631e4fbdf760e01b82526004829052602482fd5b80fd5b503461021857602036600319011261021857600435906005548210156102185760206001600160a01b0361024e8461122e565b90549060031b1c16604051908152f35b5034610218576020366003190112610218576004359067ffffffffffffffff821161021857602080806102943660048701611191565b604051928184925191829101835e8101600681520301902054604051908152f35b5034610218576020366003190112610218576102cf611129565b906001600160a01b0382168152600460205260408120906040516102f28161113f565b610323835480835260018501549081602085015260606003600288015497604087019889520154940193845261125a565b92601e840292848404601e1485151715610364575061034360a09561136d565b90519151926040519485526020850152604084015260608301526080820152f35b634e487b7160e01b81526011600452602490fd5b5034610218576020366003190112610218576001600160a01b036040602092826103a0611129565b16815260028452205416604051908152f35b50346102185760203660031901126102185760206103d66103d1611129565b61136d565b604051908152f35b50346102185760203660031901126102185760406080916001600160a01b03610405611129565b82606085516104138161113f565b828152826020820152828782015201521681526004602052206040516104388161113f565b815491828252600181015460208301908152606060036002840154936040860194855201549301928352604051938452516020840152516040830152516060820152f35b50346102185760403660031901126102185760043567ffffffffffffffff8111610546576104ae903690600401611191565b602435906104ba611432565b81158015610535575b6105265760207f4bea76f3309d60543efdcea3904bba05cd2c7a2e58668e7de988d525fd6a3f969160405190848151928481818501958087835e8101600681520301902055604051918291518091835e810186815203902092604051908152a280f35b631bc4bcf760e21b8352600483fd5b50678ac7230489e8000082116104c3565b5080fd5b503461021857806003193601126102185760206040516714d1120d7b1600008152f35b61120b565b5034610218576020366003190112610218576001600160a01b0360406020928261059a611129565b168152600284522054161515604051908152f35b50346102185760203660031901126102185760ff60406020926001600160a01b036105d7611129565b168152600384522054166040519015158152f35b5034610a505760c0366003190112610a505760043567ffffffffffffffff8111610a505761061d903690600401611191565b60243567ffffffffffffffff8111610a505761063d903690600401611191565b60443567ffffffffffffffff8111610a505761065d903690600401611191565b9160643567ffffffffffffffff8111610a505761067e903690600401611191565b926084359360a435916001600160a01b038316809303610a5057604051632474521560e21b81527fe94d78b6d8fb99b2c21131eb4552924a60f564d8515a3cc90ef300fc9735c07460048201523360248201526020816044817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610a45575f91610a94575b5015610a8557335f5260026020526001600160a01b0360405f205416610a72578515610a63576e5af43d82803e903d91602b57fd5bf37f0000000000000000000000000000000000000000000000000000000000000000763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff8260881c16175f5260781b176020526001600160a01b03603760095ff016958615610a5457863b15610a50575f9161080c9161081e60405195869485946378671ee960e11b865260c060048701526107f46107e260c488018d6111e7565b8781036003190160248901528d6111e7565b336044880152868103600319016064880152906111e7565b848103600319016084860152906111e7565b9060a4830152038183895af18015610a4557610a30575b5084906001600160a01b036001541680610981575b508061092f575b505033845260026020526040842080546001600160a01b031916841790556005546801000000000000000081101561091b5761090284939260406020976108bf8560017fabfc2cb9c596be68324e2badae1694b9003727b1c82695e6c2cfa7ad8a587592970160055561122e565b81549060031b906001600160a01b038a831b921b19161790558681526003895220600160ff198254161790556109106040519283926040845260408401906111e7565b8281038984015233956111e7565b0390a3604051908152f35b634e487b7160e01b85526041600452602485fd5b843b15610546576040519063557326d160e11b82526004820152818160248183895af18015610976571561085157816109679161116f565b61097257835f610851565b8380fd5b6040513d84823e3d90fd5b853b15610a175760405190631eb784cb60e21b825260048201528281602481838a5af1908115610a0c578391610a1b575b50506001600160a01b0360015416853b15610a17576040519063557326d160e11b825260048201528281602481838a5af1908115610a0c5783916109f7575b5061084a565b81610a019161116f565b61054657815f6109f1565b6040513d85823e3d90fd5b8280fd5b81610a259161116f565b61054657815f6109b2565b610a3d9195505f9061116f565b5f935f610835565b6040513d5f823e3d90fd5b5f80fd5b6330be1a3d60e21b5f5260045ffd5b630e52390960e41b5f5260045ffd5b6329ab51bf60e01b5f523360045260245ffd5b631e82e51960e01b5f5260045ffd5b90506020813d602011610ac7575b81610aaf6020938361116f565b81010312610a5057518015158103610a50575f610711565b3d9150610aa2565b34610a50575f366003190112610a5057602060405166038d7ea4c680008152f35b34610a50575f366003190112610a505760206001600160a01b035f5416604051908152f35b34610a50576020366003190112610a50576001600160a01b03610b36611129565b610b3e611432565b168015610b8757600154816001600160a01b0382167f8c48ef656e85255b7e51330f2d5bca7663b2f2f34d2d812c43f780c7c852fd175f80a36001600160a01b03191617600155005b634726455360e11b5f5260045260245ffd5b34610a50575f366003190112610a5057610bb1611432565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610a50576040366003190112610a5057610c09611432565b610c1760243560043561126d565b005b34610a50575f366003190112610a505760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610a50575f366003190112610a505760206001600160a01b0360015416604051908152f35b34610a50575f366003190112610a50576020600754604051908152f35b34610a50575f366003190112610a5057610d09604051610cc060608261116f565b602281527f78504e5473466163746f72792d322e332e302d636c6f6e652d6f7074696d697a602082015261195960f21b60408201526040519182916020835260208301906111e7565b0390f35b34610a50576080366003190112610a505760043560443560643581620f42408411610a635760039215610dcf575b8115610dbf575b60405193610d4f8561113f565b84526020840160243581526040850191825260608501928352335f52600460205260405f209451855551600185015551600284015551910155610d913361136d565b6040519081527f2b4eaa806f1ef4367c0f395b151c87df87dcd9a99bdfa956df2e02a9a24d805e60203392a2005b6714d1120d7b1600009150610d42565b50670de0b6b3a7640000610d3b565b34610a50576020366003190112610a50576001600160a01b03610dff611129565b165f526004602052608060405f208054906001810154906003600282015491015491604051938452602084015260408301526060820152f35b34610a50576080366003190112610a505760043560443567ffffffffffffffff8111610a5057610e6c903690600401611191565b606435620f42408311610a63576040518251600393602091839181908401835e81016006815203019020548015610dcf578115610dbf5760405193610d4f8561113f565b34610a50575f366003190112610a50576040518060206005549283815201809260055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0905f5b818110610f595750505081610f0e91038261116f565b604051918291602083019060208452518091526040830191905f5b818110610f37575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610f29565b82546001600160a01b0316845260209093019260019283019201610ef8565b34610a50576020366003190112610a5057600435610f94611432565b66038d7ea4c680008110801561105c575b61102c576007549081158015610fec575b7ffcc60d1b1dedb59d33b8eef97db5a70c8f8f8523c70d6a027dbf676f1290f8d2604084848060075582519182526020820152a1005b611b588302838104611b5814821715611048576132c88402918483046132c8141715611048576127109004821090811561103a575b5061102c5782610fb6565b62bfc92160e01b5f5260045ffd5b612710915004811183611021565b634e487b7160e01b5f52601160045260245ffd5b5068056bc75e2d631000008111610fa5565b34610a50575f366003190112610a50576020600554604051908152f35b34610a50576020366003190112610a50576001600160a01b036110ac611129565b165f52600260205260206001600160a01b0360405f205416604051908152f35b34610a50575f366003190112610a505760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610a50575f366003190112610a505780610bb860209252f35b600435906001600160a01b0382168203610a5057565b6080810190811067ffffffffffffffff82111761115b57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff82111761115b57604052565b81601f82011215610a505780359067ffffffffffffffff821161115b57604051926111c6601f8401601f19166020018561116f565b82845260208383010111610a5057815f926020809301838601378301015290565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b34610a50575f366003190112610a5057602060405168056bc75e2d631000008152f35b6005548110156112465760055f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b8181029291811591840414171561104857565b906005548083101561136857828103908111611048578082101561136157505b8101808211611048576001600160a01b0360015416915b8181106112b057505050565b6001600160a01b036112c18261122e565b90549060031b1c1690813b15610a505783600192604051631eb784cb60e21b81528260048201525f8160248183865af19081611351575b50611328577f5d4bb2355e56aab4ce3c351d050e2a54fb3096e84130577503d5f4b940e0e59e5f80a35b016112a4565b7f41c3159aaba10d821e771f08c4f9f3370426fd58cb304fdbd96b5b9e75c872d15f80a3611322565b5f61135b9161116f565b5f6112f8565b905061128d565b505050565b6001600160a01b03165f52600460205260405f2060405161138d8161113f565b815480825260018301548060208401526060600360028601549560408601968752015493019283528115611421576113c49161125a565b90601e820291808304601e1490151715611048576113f76113ff926ec097ce7bc90715b34b9f100000000094519061125a565b90519061125a565b049068056bc75e2d63100000821061141357565b68056bc75e2d631000009150565b5050505068056bc75e2d6310000090565b6001600160a01b035f5416330361144557565b63118cdaa760e01b5f523360045260245ffdfea164736f6c6343000821000a610160604052346104a8576040516100186020826104ac565b5f81526040519061002a6020836104ac565b5f82526040519161003c6020846104ac565b5f83526040519161004e6040846104ac565b60018352603160f81b60208401908152825190926001600160401b0382116103a35760035490600182811c9216801561049e575b60208310146103855781601f849311610428575b50602090601f83116001146103c2575f926103b7575b50508160011b915f199060031b1c1916176003555b83516001600160401b0381116103a357600454600181811c91168015610399575b602082101461038557601f8111610317575b50602094601f82116001146102b4579481929394955f926102a9575b50508160011b915f199060031b1c1916176004555b61012e816104cf565b6101205261013b83610662565b6101405260208151910120918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526101a860c0826104ac565b5190206080523060c05269010f0cf064dd592000006018555f5160206139195f395f51905f525460ff8160401c1661029a576002600160401b03196001600160401b03821601610244575b60405161317290816107a782396080518161292a015260a051816129e7015260c051816128fb015260e051816129790152610100518161299f015261012051816114c7015261014051816114f00152f35b6001600160401b0319166001600160401b039081175f5160206139195f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f6101f3565b63f92ee8a960e01b5f5260045ffd5b015190505f80610110565b601f1982169560045f52805f20915f5b8881106102ff575083600195969798106102e7575b505050811b01600455610125565b01515f1960f88460031b161c191690555f80806102d9565b919260206001819286850151815501940192016102c4565b818111156100f45760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b6020841061037d575b81601f9101920160051c03905f5b8281106103705750506100f4565b5f82820155600101610362565b5f9150610354565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e2565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100ac565b60035f9081528281209350601f198516905b81811061041057509084600195949392106103f8575b505050811b016003556100c1565b01515f1960f88460031b161c191690555f80806103ea565b929360206001819287860151815501950193016103d4565b828111156100965760035f52909150601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60208510610496575b849392601f0160051c82900391015f5b828110610486575050610096565b5f81830155859450600101610478565b5f9150610468565b91607f1691610082565b5f80fd5b601f909101601f19168101906001600160401b038211908210176103a357604052565b908151602081105f14610549575090601f8151116105095760208151910151602082106104fa571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b0381116103a357600554600181811c91168015610658575b602082101461038557601f8111610619575b50602092601f82116001146105b857928192935f926105ad575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610594565b601f1982169360055f52805f20915f5b86811061060157508360019596106105e9575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806105db565b919260206001819286850151815501940192016105c8565b8181111561057a5760055f5260205f20601f80840160051c809201920160051c03905f5b82811061064b57505061057a565b5f8282015560010161063d565b90607f1690610568565b908151602081105f1461068d575090601f8151116105095760208151910151602082106104fa571790565b6001600160401b0381116103a357600654600181811c9116801561079c575b602082101461038557601f811161075d575b50602092601f82116001146106fc57928192935f926106f1575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806106d8565b601f1982169360065f52805f20915f5b868110610745575083600195961061072d575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f808061071f565b9192602060018192868501518155019401920161070c565b818111156106be5760065f5260205f20601f80840160051c809201920160051c03905f5b82811061078f5750506106be565b5f82820155600101610781565b90607f16906106ac56fe6080806040526004361015610012575f80fd5b5f3560e01c908162ef5f4f1461206657508063027e6d671461204e57806306fdde0314612033578063095ea7b31461200d5780631296ee6214611fd557806318160ddd14611fb85780631eb6ca0314611f4b57806320b0585914611f2557806323b872dd14611e4c57806325073b3a14611d6c5780632d6f3a3a14611d4f5780632dd3100014611d295780632ecd4e7d146113cb57806330f5344114611c50578063313ce56714611c355780633258f04514611c065780633644e51514611bec57806338518bfe14611bc65780633ba0b9a914611ba95780634000aea014611b4557806340c10f1914611adf57806342966c6814611ac25780634e4852f314611a365780635054dbd014611a1057806354fd4d50146119c3578063623330ae1461194257806366b48f91146119275780636b09de451461190b57806370a08231146118d45780637a5b4f59146118425780637ade132c146116d35780637c3c26e6146116b35780637ecebe001461167b5780637fd6327a1461164c578063819c2ff8146115a757806384b0196e146114af5780638501dd1b146114415780638d0745471461141e57806395d89b41146114035780639a78e72e146113cb5780639dc29fac14611312578063a9059cbb146112e1578063aae64da21461124e578063ae8866d91461122c578063af43e2d114611208578063b83aa2de1461112f578063b8441cd61461110b578063b9e205ae14610f68578063bf85556514610f4b578063c1550b2814610f2f578063c504e20914610ec1578063c6d572ae14610e8e578063d49bdad014610e04578063d505accf14610ccb578063d5f6e0dd14610cae578063da21d73e14610c51578063dd62ed3e14610c1d578063eca9f01414610be0578063f0ce3dd2146103d2578063f1d85d55146103955763fa74542d146102ba575f80fd5b34610391576040366003190112610391576102d36120a4565b6024359060ff600c5416610382576001600160a01b03600a541680156103735733036103605760185482116103515760206001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5921692835f526016825260405f2061034682825461254d565b9055604051908152a2005b632c1032b560e01b5f5260045ffd5b63472511eb60e11b5f523360045260245ffd5b632da2b14160e21b5f5260045ffd5b6313a5ef3f60e21b5f5260045ffd5b5f80fd5b34610391576020366003190112610391576001600160a01b036103b66120a4565b165f52600b602052602060ff60405f2054166040519015158152f35b346103915760c03660031901126103915760043567ffffffffffffffff81116103915761040390369060040161244a565b60243567ffffffffffffffff81116103915761042390369060040161244a565b6044356001600160a01b0381168091036103915760643567ffffffffffffffff81116103915761045790369060040161244a565b60843567ffffffffffffffff81116103915761047790369060040161244a565b60a435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610bd8575b6001149081610bce575b159081610bc5575b50610bb65767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005585610b77575b508015610b6557336001600160a01b031960085416176008556001600160a01b0319600954161760095580519067ffffffffffffffff821161084b57819061055260105461219c565b601f8111610aee575b50602090601f8311600114610a6a575f92610a5f575b50508160011b915f199060031b1c1916176010555b80519067ffffffffffffffff821161084b5781906105a560115461219c565b601f81116109e8575b50602090601f8311600114610964575f92610959575b50508160011b915f199060031b1c1916176011555b835167ffffffffffffffff811161084b576105f560145461219c565b601f81116108eb575b50602094601f821160011461086a579481929394955f9261085f575b50508160011b915f199060031b1c1916176014555b825167ffffffffffffffff811161084b5761064b60155461219c565b601f81116107dd575b506020601f821160011461075c57819293945f92610751575b50508160011b915f199060031b1c1916176015555b8015610742575b601255335f52600b60205260405f20600160ff19825416179055690a968163f0a57b400000601a5569010f0cf064dd592000006018556106c557005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b50670de0b6b3a7640000610689565b01519050848061066d565b601f1982169060155f527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915f5b8181106107c5575095836001959697106107ad575b505050811b01601555610682565b01515f1960f88460031b161c1916905584808061079f565b9192602060018192868b01518155019401920161078a565b818111156106545760155f52601f820160051c9060208310610843575b601f82910160051c03905f5b828110610814575050610654565b5f8282017f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750155600101610806565b5f91506107fa565b634e487b7160e01b5f52604160045260245ffd5b01519050858061061a565b601f1982169560145f527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec915f5b8881106108d3575083600195969798106108bb575b505050811b0160145561062f565b01515f1960f88460031b161c191690558580806108ad565b91926020600181928685015181550194019201610898565b818111156105fe5760145f52601f820160051c9060208310610951575b601f82910160051c03905f5b8281106109225750506105fe565b5f8282017fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155600101610914565b5f9150610908565b0151905086806105c4565b60115f9081527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c689350601f198516905b8181106109d057509084600195949392106109b8575b505050811b016011556105d9565b01515f1960f88460031b161c191690558680806109aa565b92936020600181928786015181550195019301610994565b828111156105ae5790915060115f52601f830160051c9060208410610a57575b9080601f8594930160051c03905f5b828110610a255750506105ae565b5f8183017f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680155859450600101610a17565b5f9150610a08565b015190508780610571565b60105f9081527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6729350601f198516905b818110610ad65750908460019594939210610abe575b505050811b01601055610586565b01515f1960f88460031b161c19169055878080610ab0565b92936020600181928786015181550195019301610a9a565b8281111561055b5790915060105f52601f830160051c9060208410610b5d575b9080601f8594930160051c03905f5b828110610b2b57505061055b565b5f8183017f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720155859450600101610b1d565b5f9150610b0e565b634726455360e11b5f5260045260245ffd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005587610509565b63f92ee8a960e01b5f5260045ffd5b905015896104cd565b303b1591506104c5565b8791506104bb565b34610391576020366003190112610391576001600160a01b03610c016120a4565b165f52600d602052602060ff60405f2054166040519015158152f35b34610391576040366003190112610391576020610c49610c3b6120a4565b610c436120ba565b9061274a565b604051908152f35b34610391576020366003190112610391576001600160a01b03610c726120a4565b165f526019602052606060405f2054604051906001600160801b038116825267ffffffffffffffff8160801c16602083015260c01c6040820152f35b34610391575f366003190112610391576020601354604051908152f35b346103915760e036600319011261039157610ce46120a4565b610cec6120ba565b604435906064359260843560ff8116810361039157844211610df157610dc5610dbc6001600160a01b039283851697885f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b6040840152878a1660608401528a608084015260a083015260c082015260c08152610d8a60e082612134565b519020610d956128f1565b906040519161190160f01b83526002830152602282015260c43591604260a4359220612f7e565b9092919261300b565b16848103610dda5750610dd89350612bfa565b005b84906325c0072360e11b5f5260045260245260445ffd5b8463313c898160e11b5f5260045260245ffd5b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b036008541680151580610e78575b610e5f575b6008805473ffffffffffffffffffffffffffffffffffffffff19169055005b5f52600b60205260405f2060ff19815416905580610e40565b50805f52600b60205260ff60405f205416610e3b565b34610391575f36600319011261039157610ebd610ea96123b5565b604051918291602083526020830190612080565b0390f35b3461039157602036600319011261039157610eda6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b34610391575f366003190112610391576020604051610e108152f35b34610391575f366003190112610391576020601a54604051908152f35b34610391576020366003190112610391576004356001600160a01b0360085416331415806110f6575b6103605780156110e757655af3107a4000811080156110d4575b6110aa576013548015159081611094575b506110855760125480158015611007575b5060407fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde918151908152836020820152a160125542601355005b611f408202828104611f401482171561107157612ee0830291838304612ee01417156110715761271090048310908115611063575b506110475782610fcd565b90635dd2c95d60e11b5f526004526024526107d060445260645ffd5b61271091500482118361103c565b634e487b7160e01b5f52601160045260245ffd5b6348deb07960e11b5f5260045ffd5b9050610e10810180911161107157421082610fbc565b63068c0e8960e31b5f52600452655af3107a400060245269021e19e0c9bab240000060445260645ffd5b5069021e19e0c9bab24000008111610fab565b63150c57e560e01b5f5260045ffd5b506001600160a01b0360095416331415610f91565b34610391575f366003190112610391576020604051690a968163f0a57b4000008152f35b346103915761113d3661210a565b60ff600c9392935416610382576001600160a01b03600a541633036111f357805f52600f60205260ff60405f20541680156111dd575b6111cb575f52600f60205260405f20600160ff19825416179055601854821161035157670de0b6b3a76400006111c46111bf6111ba610dd8956111b4612799565b90612507565b612538565b612623565b0490612ad7565b63070c5a0360e51b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611173565b63472511eb60e11b5f90815233600452602490fd5b34610391575f36600319011261039157602060405169021e19e0c9bab24000008152f35b34610391575f36600319011261039157602060ff600c54166040519015158152f35b34610391576020366003190112610391576112676120a4565b6001600160a01b0360085416331415806112cc575b610360576001600160a01b03168015610b6557805f52600b60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b506001600160a01b036009541633141561127c565b34610391576040366003190112610391576113076112fd6120a4565b6024359033612bbe565b602060405160018152f35b346103915760403660031901126103915761132b6120a4565b60243560ff600c5416806113b8575b610382576001600160a01b03600a541633146113a9576001600160a01b038216330361136a575b610dd891612ad7565b80611375338461274a565b1061139a57610dd891611389823383612b04565b61139382336127a5565b9150611361565b6307df453760e01b5f5260045ffd5b632d0513d960e11b5f5260045ffd5b506001600160a01b03821633141561133a565b34610391576020366003190112610391576001600160a01b036113ec6120a4565b165f526016602052602060405f2054604051908152f35b34610391575f36600319011261039157610ebd610ea9612320565b34610391576020611438611431366120d0565b929161274a565b10604051908152f35b346103915760203660031901126103915761145a6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600d60205260405f2060ff1981541690557fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf5f80a2005b34610391575f3660031901126103915761154b6114eb7f0000000000000000000000000000000000000000000000000000000000000000612dcc565b6115147f0000000000000000000000000000000000000000000000000000000000000000612ec6565b6020611559604051926115278385612134565b5f84525f368137604051958695600f60f81b875260e08588015260e0870190612080565b908582036040870152612080565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b82811061159057505050500390f35b835185528695509381019392810192600101611581565b34610391576020366003190112610391576115c06120a4565b6001600160a01b036009541690813303610360576001600160a01b031690811561163957811461162757805f52600d60205260405f20600160ff198254161790557f14b842314c1bed1881a6aaf3371cb59429fa3f849dbd8ad0698501dc4aa0574c5f80a2005b63472511eb60e11b5f5260045260245ffd5b50634726455360e11b5f5260045260245ffd5b34610391576020366003190112610391576004355f52600f602052602060ff60405f2054166040519015158152f35b34610391576020366003190112610391576001600160a01b0361169c6120a4565b165f526007602052602060405f2054604051908152f35b34610391575f366003190112610391576020604051655af3107a40008152f35b34610391576020366003190112610391576116ec6120a4565b600c5460ff1615611806576001600160a01b03600954163303610360576001600160a01b03905b168015610b65576001600160a01b03600a5416801515806117fc575b6117a9575b50806001600160a01b0319600a541617600a55805f52600b60205260405f20600160ff19825416179055807fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a27f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b805f52600b60205260ff60405f2054161561173457805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a281611734565b508181141561172f565b6001600160a01b03600854163314158061182d575b610360576001600160a01b0390611713565b506001600160a01b036009541633141561181b565b34610391575f366003190112610391576118a061185d6121d4565b611865612320565b6118ca6001600160a01b0360095416916118bc6118806123b5565b6118ae61188b61228b565b9360405198899860a08a5260a08a0190612080565b9088820360208a0152612080565b908682036040880152612080565b908482036060860152612080565b9060808301520390f35b34610391576020366003190112610391576001600160a01b036118f56120a4565b165f525f602052602060405f2054604051908152f35b3461039157602036600319011261039157610dd860043561263e565b34610391575f36600319011261039157610ebd610ea961228b565b346103915760203660031901126103915761195b6120a4565b600954906001600160a01b03821690813303610360576001600160a01b0316809281156116395773ffffffffffffffffffffffffffffffffffffffff1916176009557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b34610391575f36600319011261039157610ebd6040516119e4604082612134565b600b81526a058504e54732d332e342e360ac1b6020820152604051918291602083526020830190612080565b34610391575f3660031901126103915760206001600160a01b03600a5416604051908152f35b34610391576020366003190112610391576004356001600160a01b036009541633036103605780158015611aaf575b611aa0577ffabe53bf01983df9c24aab2e57a83e6f8a69975380cf9bd0811dd2f431ac4d4660406018548151908152836020820152a1601855005b633494a40d60e21b5f5260045ffd5b50690a968163f0a57b4000008111611a65565b3461039157602036600319011261039157610dd860043533612ad7565b3461039157604036600319011261039157611af86120a4565b6001600160a01b036008541633141580611b30575b6111f3576001600160a01b03811690811561163957610dd890602435905f612c5d565b506001600160a01b0360095416331415611b0d565b3461039157606036600319011261039157611b5e6120a4565b60443567ffffffffffffffff8111610391573660238201121561039157602091611b95611b9f923690602481600401359101612156565b906024359061255a565b6040519015158152f35b34610391575f366003190112610391576020601254604051908152f35b34610391575f3660031901126103915760206001600160a01b0360095416604051908152f35b34610391575f366003190112610391576020610c496128f1565b34610391576020366003190112610391576004355f52601b602052602060ff60405f2054166040519015158152f35b34610391575f36600319011261039157602060405160128152f35b3461039157611c5e3661210a565b60ff600c9392935416610382576001600160a01b03600a5416801561037357330361036057601854831161035157805f52600f60205260ff60405f2054168015611d13575b611d01576001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5926020925f52601b835260405f20600160ff198254161790551692835f526016825260405f2061034682825461254d565b634e7074b160e11b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611ca3565b34610391575f3660031901126103915760206001600160a01b0360085416604051908152f35b34610391575f366003190112610391576020601854604051908152f35b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b03600a541680151580611e36575b611df8575b6001600160a01b0319600e541617600e55600c5460ff811615611dc757005b60ff1916600117600c55337f51745cdc5b4ed1fe5c20c1cbf61290785ef5df0cb643101a29618bed23d8305c5f80a2005b805f52600b60205260405f2060ff198154169055807f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2611da8565b50805f52600b60205260ff60405f205416611da3565b3461039157611e5a366120d0565b90335f52600b60205260ff60405f205416611e84575b61130792611e7f833383612b04565b612bbe565b6001600160a01b03811633811490811580611f10575b611f0157611eb8611eaa856124e3565b611eb2612799565b9061251a565b601854106103515781611eeb575b5015611e705760ff600c54166103825761130792611ee483336127a5565b9250611e70565b90506001600160a01b03600a5416141584611ec6565b634a02e04360e11b5f5260045ffd5b506001600160a01b03600a5416811415611e9a565b34610391575f3660031901126103915760206001600160a01b03600e5416604051908152f35b34610391576020366003190112610391576004356001600160a01b03600954163303610360576001600160801b0381116103515760407f68639863c58fa667262fab7192372355b1b2cb2731dcd7636cedbfcd1900f05d91601a549080601a5582519182526020820152a1005b34610391575f366003190112610391576020600254604051908152f35b34610391576040366003190112610391576020611b9f611ff36120a4565b604051906120018483612134565b5f82526024359061255a565b34610391576040366003190112610391576113076120296120a4565b6024359033612bfa565b34610391575f36600319011261039157610ebd610ea96121d4565b34610391575f36600319011261039157610dd8612468565b34610391575f36600319011261039157806107d060209252f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361039157565b602435906001600160a01b038216820361039157565b6060906003190112610391576004356001600160a01b038116810361039157906024356001600160a01b0381168103610391579060443590565b6060906003190112610391576004356001600160a01b038116810361039157906024359060443590565b90601f8019910116810190811067ffffffffffffffff82111761084b57604052565b92919267ffffffffffffffff821161084b5760405191612180601f8201601f191660200184612134565b829481845281830111610391578281602093845f960137010152565b90600182811c921680156121ca575b60208310146121b657565b634e487b7160e01b5f52602260045260245ffd5b91607f16916121ab565b604051905f82601454916121e78361219c565b808352926001811690811561226c575060011461220d575b61220b92500383612134565b565b5060145f90815290917fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b81831061225057505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612238565b6020925061220b94915060ff191682840152151560051b8201016121ff565b604051905f826011549161229e8361219c565b808352926001811690811561226c57506001146122c15761220b92500383612134565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b81831061230457505090602061220b928201016121ff565b60209193508060019154838589010152019101909184926122ec565b604051905f82601554916123338361219c565b808352926001811690811561226c57506001146123565761220b92500383612134565b5060155f90815290917f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b81831061239957505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612381565b604051905f82601054916123c88361219c565b808352926001811690811561226c57506001146123eb5761220b92500383612134565b5060105f90815290917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6725b81831061242e57505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612416565b9080601f830112156103915781602061246593359101612156565b90565b6001600160a01b0360095416330361036057600c5460ff8116156124e0576001600160a01b03600a54166001600160a01b03600e5416146124d15760ff1916600c55337f56a64ec95bb93ae6af923c082ef9ab2bd5bdd6f1a121c45e8c05a39ab73bbf065f80a2565b637f7fe78560e11b5f5260045ffd5b50565b90670de0b6b3a7640000820291808304670de0b6b3a7640000149015171561107157565b8181029291811591840414171561107157565b8115612524570490565b634e487b7160e01b5f52601260045260245ffd5b90670de0b6b3a7640000820180921161107157565b9190820180921161107157565b91906002601754146125de57612580926002601755612579828261273a565b5033612a0d565b1561258f576001906001601755565b60405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d726563656976656044820152603960f91b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b5f1981019190821161107157565b9190820391821161107157565b335f52601660205260405f2054811561273657801561272857335f525f6020528160405f20541061271957612671612799565b670de0b6b3a7640000830290838204670de0b6b3a764000003611071576126979161251a565b91821561271457818311612705576126b2836126c593612631565b335f52601660205260405f205533612ad7565b335f52601660205260405f205460405191825260208201527f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d60403392a2565b63718e827560e11b5f5260045ffd5b505050565b63588569f760e01b5f5260045ffd5b6254641f60e81b5f5260045ffd5b5050565b906127459133612bbe565b600190565b6001600160a01b0382165f52600b60205260ff60405f205416612792576001600160a01b03165f5260016020526001600160a01b0360405f2091165f5260205260405f205490565b50505f1990565b6012549081156110e757565b6001600160a01b031690815f52601960205260405f2091825467ffffffffffffffff8160801c1680159081156128d9575b50612851575b506001600160801b03835416916127f3818461254d565b92601a549081851161281d57505050506001600160801b03166001600160801b0319825416179055565b808211156128485761282e91612631565b915b63c4fae44360e01b5f5260045260245260445260645ffd5b50505f91612830565b7fffffffffffffffff0000000000000000000000000000000000000000000000001642608090811b77ffffffffffffffff000000000000000000000000000000001691909117808555604051911c67ffffffffffffffff16815281907fbee963043b15401a5f01418733a5739b29c9d9e128ecfadc5b2078bffe8ba91790602090a25f6127dc565b9050620151808101809111611071574210155f6127d6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163014806129e4575b1561294c577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a081526129de60c082612134565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614612923565b9190803b15612ace576001600160a01b035f81602095612a5c60405198899788968794632229f29760e21b86523360048701521660248501526044840152608060648401526084830190612080565b0393165af15f9181612a89575b50612a7357505f90565b6001600160e01b031916632229f29760e21b1490565b9091506020813d602011612ac6575b81612aa560209383612134565b8101031261039157516001600160e01b03198116810361039157905f612a69565b3d9150612a98565b50505050600190565b906001600160a01b03821615612af1575f61220b92612c5d565b634b637e8f60e11b5f525f60045260245ffd5b91906001600160a01b03811690815f52600b60205260ff60405f205416612b3957612b2f908461274a565b9260018401612b3f575b50505050565b828410612ba3576001600160a01b03168015612b90578115612b7d575f52600160205260405f20905f5260205260405f20910390555f808080612b39565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b508290637dc7a0d960e11b5f5260045260245260445260645ffd5b91906001600160a01b03831615612af1576001600160a01b03811615612be75761220b92612c5d565b63ec442f0560e01b5f525f60045260245ffd5b6001600160a01b0316908115612b90576001600160a01b0316918215612b7d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b91906001600160a01b0383161580612dba575b80612db1575b612c84575b61220b9261307f565b612c9f816001600160a01b03165f52601660205260405f2090565b549283612cae575b9250612c7b565b612cb6612799565b93612cc985612cc4866124e3565b61251a565b80612cd5575050612ca7565b9383612d0c612cfe6111bf6111ba612d3a96612d40999a8181115f14612da957509a5b8b612507565b670de0b6b3a7640000900490565b93612d28826001600160a01b03165f52601660205260405f2090565b612d33898254612631565b905561307f565b82612ad7565b6001600160a01b0381612da4612d887f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d946001600160a01b03165f52601660205260405f2090565b5460405193849316958360209093929193604081019481520152565b0390a2565b90509a612cf8565b50811515612c76565b506001600160a01b0381161515612c70565b60ff8114612e125760ff811690601f8211612e035760405191612df0604084612134565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600554815f612e248361219c565b8083529260018116908115612ea75750600114612e48575b61246592500382612134565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b818310612e8b57505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612e73565b6020925061246594915060ff191682840152151560051b820101612e3c565b60ff8114612eea5760ff811690601f8211612e035760405191612df0604084612134565b50604051600654815f612efc8361219c565b8083529260018116908115612ea75750600114612f1f5761246592500382612134565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310612f6257505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612f4a565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411613000579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15612ff5575f516001600160a01b03811615612feb57905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b600481101561306b578061301d575050565b600181036130345763f645eedf60e01b5f5260045ffd5b6002810361304f575063fce698f760e01b5f5260045260245ffd5b6003146130595750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b031690816130f85760206001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926130c68660025461254d565b6002555b1693846130e35780600254036002555b604051908152a3565b845f525f825260405f208181540190556130da565b815f525f60205260405f205483811061314a576001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9285602093865f525f85520360405f20556130ca565b91905063391434e360e21b5f5260045260245260445260645ffdfea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/sdk/variables/xPNTsTokenABI.md b/api/@aastar/sdk/variables/xPNTsTokenABI.md new file mode 100644 index 000000000..8ec597e24 --- /dev/null +++ b/api/@aastar/sdk/variables/xPNTsTokenABI.md @@ -0,0 +1,3 @@ +> `const` **xPNTsTokenABI**: `any` + +Defined in: [packages/core/src/abis/index.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L101) diff --git a/api/@aastar/sdk/variables/xPNTsTokenArtifact.md b/api/@aastar/sdk/variables/xPNTsTokenArtifact.md new file mode 100644 index 000000000..e5890dd8e --- /dev/null +++ b/api/@aastar/sdk/variables/xPNTsTokenArtifact.md @@ -0,0 +1,13 @@ +> `const` **xPNTsTokenArtifact**: `object` = `xPNTsTokenABIData` + +Defined in: [packages/core/src/abis/index.ts:102](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/core/src/abis/index.ts#L102) + +## Type Declaration + +### abi + +> **abi**: (\{ `anonymous?`: `undefined`; `inputs`: `never`[]; `name?`: `undefined`; `outputs?`: `undefined`; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs`: `object`[]; `stateMutability`: `string`; `type`: `string`; \} \| \{ `anonymous`: `boolean`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \} \| \{ `anonymous?`: `undefined`; `inputs`: `object`[]; `name`: `string`; `outputs?`: `undefined`; `stateMutability?`: `undefined`; `type`: `string`; \})[] + +### bytecode + +> **bytecode**: `string` = `"0x610160604052346104a8576040516100186020826104ac565b5f81526040519061002a6020836104ac565b5f82526040519161003c6020846104ac565b5f83526040519161004e6040846104ac565b60018352603160f81b60208401908152825190926001600160401b0382116103a35760035490600182811c9216801561049e575b60208310146103855781601f849311610428575b50602090601f83116001146103c2575f926103b7575b50508160011b915f199060031b1c1916176003555b83516001600160401b0381116103a357600454600181811c91168015610399575b602082101461038557601f8111610317575b50602094601f82116001146102b4579481929394955f926102a9575b50508160011b915f199060031b1c1916176004555b61012e816104cf565b6101205261013b83610662565b6101405260208151910120918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a081526101a860c0826104ac565b5190206080523060c05269010f0cf064dd592000006018555f5160206139195f395f51905f525460ff8160401c1661029a576002600160401b03196001600160401b03821601610244575b60405161317290816107a782396080518161292a015260a051816129e7015260c051816128fb015260e051816129790152610100518161299f015261012051816114c7015261014051816114f00152f35b6001600160401b0319166001600160401b039081175f5160206139195f395f51905f52556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f6101f3565b63f92ee8a960e01b5f5260045ffd5b015190505f80610110565b601f1982169560045f52805f20915f5b8881106102ff575083600195969798106102e7575b505050811b01600455610125565b01515f1960f88460031b161c191690555f80806102d9565b919260206001819286850151815501940192016102c4565b818111156100f45760045f52601f820160051c7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b6020841061037d575b81601f9101920160051c03905f5b8281106103705750506100f4565b5f82820155600101610362565b5f9150610354565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e2565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100ac565b60035f9081528281209350601f198516905b81811061041057509084600195949392106103f8575b505050811b016003556100c1565b01515f1960f88460031b161c191690555f80806103ea565b929360206001819287860151815501950193016103d4565b828111156100965760035f52909150601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60208510610496575b849392601f0160051c82900391015f5b828110610486575050610096565b5f81830155859450600101610478565b5f9150610468565b91607f1691610082565b5f80fd5b601f909101601f19168101906001600160401b038211908210176103a357604052565b908151602081105f14610549575090601f8151116105095760208151910151602082106104fa571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b0381116103a357600554600181811c91168015610658575b602082101461038557601f8111610619575b50602092601f82116001146105b857928192935f926105ad575b50508160011b915f199060031b1c19161760055560ff90565b015190505f80610594565b601f1982169360055f52805f20915f5b86811061060157508360019596106105e9575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f80806105db565b919260206001819286850151815501940192016105c8565b8181111561057a5760055f5260205f20601f80840160051c809201920160051c03905f5b82811061064b57505061057a565b5f8282015560010161063d565b90607f1690610568565b908151602081105f1461068d575090601f8151116105095760208151910151602082106104fa571790565b6001600160401b0381116103a357600654600181811c9116801561079c575b602082101461038557601f811161075d575b50602092601f82116001146106fc57928192935f926106f1575b50508160011b915f199060031b1c19161760065560ff90565b015190505f806106d8565b601f1982169360065f52805f20915f5b868110610745575083600195961061072d575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f808061071f565b9192602060018192868501518155019401920161070c565b818111156106be5760065f5260205f20601f80840160051c809201920160051c03905f5b82811061078f5750506106be565b5f82820155600101610781565b90607f16906106ac56fe6080806040526004361015610012575f80fd5b5f3560e01c908162ef5f4f1461206657508063027e6d671461204e57806306fdde0314612033578063095ea7b31461200d5780631296ee6214611fd557806318160ddd14611fb85780631eb6ca0314611f4b57806320b0585914611f2557806323b872dd14611e4c57806325073b3a14611d6c5780632d6f3a3a14611d4f5780632dd3100014611d295780632ecd4e7d146113cb57806330f5344114611c50578063313ce56714611c355780633258f04514611c065780633644e51514611bec57806338518bfe14611bc65780633ba0b9a914611ba95780634000aea014611b4557806340c10f1914611adf57806342966c6814611ac25780634e4852f314611a365780635054dbd014611a1057806354fd4d50146119c3578063623330ae1461194257806366b48f91146119275780636b09de451461190b57806370a08231146118d45780637a5b4f59146118425780637ade132c146116d35780637c3c26e6146116b35780637ecebe001461167b5780637fd6327a1461164c578063819c2ff8146115a757806384b0196e146114af5780638501dd1b146114415780638d0745471461141e57806395d89b41146114035780639a78e72e146113cb5780639dc29fac14611312578063a9059cbb146112e1578063aae64da21461124e578063ae8866d91461122c578063af43e2d114611208578063b83aa2de1461112f578063b8441cd61461110b578063b9e205ae14610f68578063bf85556514610f4b578063c1550b2814610f2f578063c504e20914610ec1578063c6d572ae14610e8e578063d49bdad014610e04578063d505accf14610ccb578063d5f6e0dd14610cae578063da21d73e14610c51578063dd62ed3e14610c1d578063eca9f01414610be0578063f0ce3dd2146103d2578063f1d85d55146103955763fa74542d146102ba575f80fd5b34610391576040366003190112610391576102d36120a4565b6024359060ff600c5416610382576001600160a01b03600a541680156103735733036103605760185482116103515760206001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5921692835f526016825260405f2061034682825461254d565b9055604051908152a2005b632c1032b560e01b5f5260045ffd5b63472511eb60e11b5f523360045260245ffd5b632da2b14160e21b5f5260045ffd5b6313a5ef3f60e21b5f5260045ffd5b5f80fd5b34610391576020366003190112610391576001600160a01b036103b66120a4565b165f52600b602052602060ff60405f2054166040519015158152f35b346103915760c03660031901126103915760043567ffffffffffffffff81116103915761040390369060040161244a565b60243567ffffffffffffffff81116103915761042390369060040161244a565b6044356001600160a01b0381168091036103915760643567ffffffffffffffff81116103915761045790369060040161244a565b60843567ffffffffffffffff81116103915761047790369060040161244a565b60a435917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610bd8575b6001149081610bce575b159081610bc5575b50610bb65767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005585610b77575b508015610b6557336001600160a01b031960085416176008556001600160a01b0319600954161760095580519067ffffffffffffffff821161084b57819061055260105461219c565b601f8111610aee575b50602090601f8311600114610a6a575f92610a5f575b50508160011b915f199060031b1c1916176010555b80519067ffffffffffffffff821161084b5781906105a560115461219c565b601f81116109e8575b50602090601f8311600114610964575f92610959575b50508160011b915f199060031b1c1916176011555b835167ffffffffffffffff811161084b576105f560145461219c565b601f81116108eb575b50602094601f821160011461086a579481929394955f9261085f575b50508160011b915f199060031b1c1916176014555b825167ffffffffffffffff811161084b5761064b60155461219c565b601f81116107dd575b506020601f821160011461075c57819293945f92610751575b50508160011b915f199060031b1c1916176015555b8015610742575b601255335f52600b60205260405f20600160ff19825416179055690a968163f0a57b400000601a5569010f0cf064dd592000006018556106c557005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b50670de0b6b3a7640000610689565b01519050848061066d565b601f1982169060155f527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915f5b8181106107c5575095836001959697106107ad575b505050811b01601555610682565b01515f1960f88460031b161c1916905584808061079f565b9192602060018192868b01518155019401920161078a565b818111156106545760155f52601f820160051c9060208310610843575b601f82910160051c03905f5b828110610814575050610654565b5f8282017f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750155600101610806565b5f91506107fa565b634e487b7160e01b5f52604160045260245ffd5b01519050858061061a565b601f1982169560145f527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec915f5b8881106108d3575083600195969798106108bb575b505050811b0160145561062f565b01515f1960f88460031b161c191690558580806108ad565b91926020600181928685015181550194019201610898565b818111156105fe5760145f52601f820160051c9060208310610951575b601f82910160051c03905f5b8281106109225750506105fe565b5f8282017fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155600101610914565b5f9150610908565b0151905086806105c4565b60115f9081527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c689350601f198516905b8181106109d057509084600195949392106109b8575b505050811b016011556105d9565b01515f1960f88460031b161c191690558680806109aa565b92936020600181928786015181550195019301610994565b828111156105ae5790915060115f52601f830160051c9060208410610a57575b9080601f8594930160051c03905f5b828110610a255750506105ae565b5f8183017f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680155859450600101610a17565b5f9150610a08565b015190508780610571565b60105f9081527f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6729350601f198516905b818110610ad65750908460019594939210610abe575b505050811b01601055610586565b01515f1960f88460031b161c19169055878080610ab0565b92936020600181928786015181550195019301610a9a565b8281111561055b5790915060105f52601f830160051c9060208410610b5d575b9080601f8594930160051c03905f5b828110610b2b57505061055b565b5f8183017f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720155859450600101610b1d565b5f9150610b0e565b634726455360e11b5f5260045260245ffd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005587610509565b63f92ee8a960e01b5f5260045ffd5b905015896104cd565b303b1591506104c5565b8791506104bb565b34610391576020366003190112610391576001600160a01b03610c016120a4565b165f52600d602052602060ff60405f2054166040519015158152f35b34610391576040366003190112610391576020610c49610c3b6120a4565b610c436120ba565b9061274a565b604051908152f35b34610391576020366003190112610391576001600160a01b03610c726120a4565b165f526019602052606060405f2054604051906001600160801b038116825267ffffffffffffffff8160801c16602083015260c01c6040820152f35b34610391575f366003190112610391576020601354604051908152f35b346103915760e036600319011261039157610ce46120a4565b610cec6120ba565b604435906064359260843560ff8116810361039157844211610df157610dc5610dbc6001600160a01b039283851697885f52600760205260405f20908154916001830190556040519060208201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528b6040840152878a1660608401528a608084015260a083015260c082015260c08152610d8a60e082612134565b519020610d956128f1565b906040519161190160f01b83526002830152602282015260c43591604260a4359220612f7e565b9092919261300b565b16848103610dda5750610dd89350612bfa565b005b84906325c0072360e11b5f5260045260245260445ffd5b8463313c898160e11b5f5260045260245ffd5b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b036008541680151580610e78575b610e5f575b6008805473ffffffffffffffffffffffffffffffffffffffff19169055005b5f52600b60205260405f2060ff19815416905580610e40565b50805f52600b60205260ff60405f205416610e3b565b34610391575f36600319011261039157610ebd610ea96123b5565b604051918291602083526020830190612080565b0390f35b3461039157602036600319011261039157610eda6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2005b34610391575f366003190112610391576020604051610e108152f35b34610391575f366003190112610391576020601a54604051908152f35b34610391576020366003190112610391576004356001600160a01b0360085416331415806110f6575b6103605780156110e757655af3107a4000811080156110d4575b6110aa576013548015159081611094575b506110855760125480158015611007575b5060407fc8d1043f24843c0a1c9251fdc30017d84e87498fbcf232af9f86816b5e182bde918151908152836020820152a160125542601355005b611f408202828104611f401482171561107157612ee0830291838304612ee01417156110715761271090048310908115611063575b506110475782610fcd565b90635dd2c95d60e11b5f526004526024526107d060445260645ffd5b61271091500482118361103c565b634e487b7160e01b5f52601160045260245ffd5b6348deb07960e11b5f5260045ffd5b9050610e10810180911161107157421082610fbc565b63068c0e8960e31b5f52600452655af3107a400060245269021e19e0c9bab240000060445260645ffd5b5069021e19e0c9bab24000008111610fab565b63150c57e560e01b5f5260045ffd5b506001600160a01b0360095416331415610f91565b34610391575f366003190112610391576020604051690a968163f0a57b4000008152f35b346103915761113d3661210a565b60ff600c9392935416610382576001600160a01b03600a541633036111f357805f52600f60205260ff60405f20541680156111dd575b6111cb575f52600f60205260405f20600160ff19825416179055601854821161035157670de0b6b3a76400006111c46111bf6111ba610dd8956111b4612799565b90612507565b612538565b612623565b0490612ad7565b63070c5a0360e51b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611173565b63472511eb60e11b5f90815233600452602490fd5b34610391575f36600319011261039157602060405169021e19e0c9bab24000008152f35b34610391575f36600319011261039157602060ff600c54166040519015158152f35b34610391576020366003190112610391576112676120a4565b6001600160a01b0360085416331415806112cc575b610360576001600160a01b03168015610b6557805f52600b60205260405f20600160ff198254161790557fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a2005b506001600160a01b036009541633141561127c565b34610391576040366003190112610391576113076112fd6120a4565b6024359033612bbe565b602060405160018152f35b346103915760403660031901126103915761132b6120a4565b60243560ff600c5416806113b8575b610382576001600160a01b03600a541633146113a9576001600160a01b038216330361136a575b610dd891612ad7565b80611375338461274a565b1061139a57610dd891611389823383612b04565b61139382336127a5565b9150611361565b6307df453760e01b5f5260045ffd5b632d0513d960e11b5f5260045ffd5b506001600160a01b03821633141561133a565b34610391576020366003190112610391576001600160a01b036113ec6120a4565b165f526016602052602060405f2054604051908152f35b34610391575f36600319011261039157610ebd610ea9612320565b34610391576020611438611431366120d0565b929161274a565b10604051908152f35b346103915760203660031901126103915761145a6120a4565b6001600160a01b03600954163303610360576001600160a01b0316805f52600d60205260405f2060ff1981541690557fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf5f80a2005b34610391575f3660031901126103915761154b6114eb7f0000000000000000000000000000000000000000000000000000000000000000612dcc565b6115147f0000000000000000000000000000000000000000000000000000000000000000612ec6565b6020611559604051926115278385612134565b5f84525f368137604051958695600f60f81b875260e08588015260e0870190612080565b908582036040870152612080565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b82811061159057505050500390f35b835185528695509381019392810192600101611581565b34610391576020366003190112610391576115c06120a4565b6001600160a01b036009541690813303610360576001600160a01b031690811561163957811461162757805f52600d60205260405f20600160ff198254161790557f14b842314c1bed1881a6aaf3371cb59429fa3f849dbd8ad0698501dc4aa0574c5f80a2005b63472511eb60e11b5f5260045260245ffd5b50634726455360e11b5f5260045260245ffd5b34610391576020366003190112610391576004355f52600f602052602060ff60405f2054166040519015158152f35b34610391576020366003190112610391576001600160a01b0361169c6120a4565b165f526007602052602060405f2054604051908152f35b34610391575f366003190112610391576020604051655af3107a40008152f35b34610391576020366003190112610391576116ec6120a4565b600c5460ff1615611806576001600160a01b03600954163303610360576001600160a01b03905b168015610b65576001600160a01b03600a5416801515806117fc575b6117a9575b50806001600160a01b0319600a541617600a55805f52600b60205260405f20600160ff19825416179055807fcd244ccee31904b178ff7bfc95631cea7812a955f9a330ac216c0c8c9dbfaf205f80a27f3c84f1b682ac1493ee72abc0427a570b681583551f8fadd1b98ea9cce545ec6a5f80a2005b805f52600b60205260ff60405f2054161561173457805f52600b60205260405f2060ff1981541690557f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a281611734565b508181141561172f565b6001600160a01b03600854163314158061182d575b610360576001600160a01b0390611713565b506001600160a01b036009541633141561181b565b34610391575f366003190112610391576118a061185d6121d4565b611865612320565b6118ca6001600160a01b0360095416916118bc6118806123b5565b6118ae61188b61228b565b9360405198899860a08a5260a08a0190612080565b9088820360208a0152612080565b908682036040880152612080565b908482036060860152612080565b9060808301520390f35b34610391576020366003190112610391576001600160a01b036118f56120a4565b165f525f602052602060405f2054604051908152f35b3461039157602036600319011261039157610dd860043561263e565b34610391575f36600319011261039157610ebd610ea961228b565b346103915760203660031901126103915761195b6120a4565b600954906001600160a01b03821690813303610360576001600160a01b0316809281156116395773ffffffffffffffffffffffffffffffffffffffff1916176009557f1191f7dd7e510e69e54c21c704f6f3c1179351c8a1a8d6a2a66d1e20aed6fd0f5f80a3005b34610391575f36600319011261039157610ebd6040516119e4604082612134565b600b81526a058504e54732d332e342e360ac1b6020820152604051918291602083526020830190612080565b34610391575f3660031901126103915760206001600160a01b03600a5416604051908152f35b34610391576020366003190112610391576004356001600160a01b036009541633036103605780158015611aaf575b611aa0577ffabe53bf01983df9c24aab2e57a83e6f8a69975380cf9bd0811dd2f431ac4d4660406018548151908152836020820152a1601855005b633494a40d60e21b5f5260045ffd5b50690a968163f0a57b4000008111611a65565b3461039157602036600319011261039157610dd860043533612ad7565b3461039157604036600319011261039157611af86120a4565b6001600160a01b036008541633141580611b30575b6111f3576001600160a01b03811690811561163957610dd890602435905f612c5d565b506001600160a01b0360095416331415611b0d565b3461039157606036600319011261039157611b5e6120a4565b60443567ffffffffffffffff8111610391573660238201121561039157602091611b95611b9f923690602481600401359101612156565b906024359061255a565b6040519015158152f35b34610391575f366003190112610391576020601254604051908152f35b34610391575f3660031901126103915760206001600160a01b0360095416604051908152f35b34610391575f366003190112610391576020610c496128f1565b34610391576020366003190112610391576004355f52601b602052602060ff60405f2054166040519015158152f35b34610391575f36600319011261039157602060405160128152f35b3461039157611c5e3661210a565b60ff600c9392935416610382576001600160a01b03600a5416801561037357330361036057601854831161035157805f52600f60205260ff60405f2054168015611d13575b611d01576001600160a01b037f99cf5cc1e3146bd15204f8eae4fe16c690d6123fbdac32515502fe688b86b8f5926020925f52601b835260405f20600160ff198254161790551692835f526016825260405f2061034682825461254d565b634e7074b160e11b5f5260045260245ffd5b50805f52601b60205260ff60405f205416611ca3565b34610391575f3660031901126103915760206001600160a01b0360085416604051908152f35b34610391575f366003190112610391576020601854604051908152f35b34610391575f366003190112610391576001600160a01b03600954163303610360576001600160a01b03600a541680151580611e36575b611df8575b6001600160a01b0319600e541617600e55600c5460ff811615611dc757005b60ff1916600117600c55337f51745cdc5b4ed1fe5c20c1cbf61290785ef5df0cb643101a29618bed23d8305c5f80a2005b805f52600b60205260405f2060ff198154169055807f49debedb360a6c155dc3046b522ec5e27906afea1be0015b4625302e9192e2d85f80a2611da8565b50805f52600b60205260ff60405f205416611da3565b3461039157611e5a366120d0565b90335f52600b60205260ff60405f205416611e84575b61130792611e7f833383612b04565b612bbe565b6001600160a01b03811633811490811580611f10575b611f0157611eb8611eaa856124e3565b611eb2612799565b9061251a565b601854106103515781611eeb575b5015611e705760ff600c54166103825761130792611ee483336127a5565b9250611e70565b90506001600160a01b03600a5416141584611ec6565b634a02e04360e11b5f5260045ffd5b506001600160a01b03600a5416811415611e9a565b34610391575f3660031901126103915760206001600160a01b03600e5416604051908152f35b34610391576020366003190112610391576004356001600160a01b03600954163303610360576001600160801b0381116103515760407f68639863c58fa667262fab7192372355b1b2cb2731dcd7636cedbfcd1900f05d91601a549080601a5582519182526020820152a1005b34610391575f366003190112610391576020600254604051908152f35b34610391576040366003190112610391576020611b9f611ff36120a4565b604051906120018483612134565b5f82526024359061255a565b34610391576040366003190112610391576113076120296120a4565b6024359033612bfa565b34610391575f36600319011261039157610ebd610ea96121d4565b34610391575f36600319011261039157610dd8612468565b34610391575f36600319011261039157806107d060209252f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361039157565b602435906001600160a01b038216820361039157565b6060906003190112610391576004356001600160a01b038116810361039157906024356001600160a01b0381168103610391579060443590565b6060906003190112610391576004356001600160a01b038116810361039157906024359060443590565b90601f8019910116810190811067ffffffffffffffff82111761084b57604052565b92919267ffffffffffffffff821161084b5760405191612180601f8201601f191660200184612134565b829481845281830111610391578281602093845f960137010152565b90600182811c921680156121ca575b60208310146121b657565b634e487b7160e01b5f52602260045260245ffd5b91607f16916121ab565b604051905f82601454916121e78361219c565b808352926001811690811561226c575060011461220d575b61220b92500383612134565b565b5060145f90815290917fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b81831061225057505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612238565b6020925061220b94915060ff191682840152151560051b8201016121ff565b604051905f826011549161229e8361219c565b808352926001811690811561226c57506001146122c15761220b92500383612134565b5060115f90815290917f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c685b81831061230457505090602061220b928201016121ff565b60209193508060019154838589010152019101909184926122ec565b604051905f82601554916123338361219c565b808352926001811690811561226c57506001146123565761220b92500383612134565b5060155f90815290917f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b81831061239957505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612381565b604051905f82601054916123c88361219c565b808352926001811690811561226c57506001146123eb5761220b92500383612134565b5060105f90815290917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6725b81831061242e57505090602061220b928201016121ff565b6020919350806001915483858901015201910190918492612416565b9080601f830112156103915781602061246593359101612156565b90565b6001600160a01b0360095416330361036057600c5460ff8116156124e0576001600160a01b03600a54166001600160a01b03600e5416146124d15760ff1916600c55337f56a64ec95bb93ae6af923c082ef9ab2bd5bdd6f1a121c45e8c05a39ab73bbf065f80a2565b637f7fe78560e11b5f5260045ffd5b50565b90670de0b6b3a7640000820291808304670de0b6b3a7640000149015171561107157565b8181029291811591840414171561107157565b8115612524570490565b634e487b7160e01b5f52601260045260245ffd5b90670de0b6b3a7640000820180921161107157565b9190820180921161107157565b91906002601754146125de57612580926002601755612579828261273a565b5033612a0d565b1561258f576001906001601755565b60405162461bcd60e51b815260206004820152602160248201527f455243313336333a207472616e7366657220746f206e6f6e2d726563656976656044820152603960f91b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b5f1981019190821161107157565b9190820391821161107157565b335f52601660205260405f2054811561273657801561272857335f525f6020528160405f20541061271957612671612799565b670de0b6b3a7640000830290838204670de0b6b3a764000003611071576126979161251a565b91821561271457818311612705576126b2836126c593612631565b335f52601660205260405f205533612ad7565b335f52601660205260405f205460405191825260208201527f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d60403392a2565b63718e827560e11b5f5260045ffd5b505050565b63588569f760e01b5f5260045ffd5b6254641f60e81b5f5260045ffd5b5050565b906127459133612bbe565b600190565b6001600160a01b0382165f52600b60205260ff60405f205416612792576001600160a01b03165f5260016020526001600160a01b0360405f2091165f5260205260405f205490565b50505f1990565b6012549081156110e757565b6001600160a01b031690815f52601960205260405f2091825467ffffffffffffffff8160801c1680159081156128d9575b50612851575b506001600160801b03835416916127f3818461254d565b92601a549081851161281d57505050506001600160801b03166001600160801b0319825416179055565b808211156128485761282e91612631565b915b63c4fae44360e01b5f5260045260245260445260645ffd5b50505f91612830565b7fffffffffffffffff0000000000000000000000000000000000000000000000001642608090811b77ffffffffffffffff000000000000000000000000000000001691909117808555604051911c67ffffffffffffffff16815281907fbee963043b15401a5f01418733a5739b29c9d9e128ecfadc5b2078bffe8ba91790602090a25f6127dc565b9050620151808101809111611071574210155f6127d6565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163014806129e4575b1561294c577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a081526129de60c082612134565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614612923565b9190803b15612ace576001600160a01b035f81602095612a5c60405198899788968794632229f29760e21b86523360048701521660248501526044840152608060648401526084830190612080565b0393165af15f9181612a89575b50612a7357505f90565b6001600160e01b031916632229f29760e21b1490565b9091506020813d602011612ac6575b81612aa560209383612134565b8101031261039157516001600160e01b03198116810361039157905f612a69565b3d9150612a98565b50505050600190565b906001600160a01b03821615612af1575f61220b92612c5d565b634b637e8f60e11b5f525f60045260245ffd5b91906001600160a01b03811690815f52600b60205260ff60405f205416612b3957612b2f908461274a565b9260018401612b3f575b50505050565b828410612ba3576001600160a01b03168015612b90578115612b7d575f52600160205260405f20905f5260205260405f20910390555f808080612b39565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b508290637dc7a0d960e11b5f5260045260245260445260645ffd5b91906001600160a01b03831615612af1576001600160a01b03811615612be75761220b92612c5d565b63ec442f0560e01b5f525f60045260245ffd5b6001600160a01b0316908115612b90576001600160a01b0316918215612b7d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b91906001600160a01b0383161580612dba575b80612db1575b612c84575b61220b9261307f565b612c9f816001600160a01b03165f52601660205260405f2090565b549283612cae575b9250612c7b565b612cb6612799565b93612cc985612cc4866124e3565b61251a565b80612cd5575050612ca7565b9383612d0c612cfe6111bf6111ba612d3a96612d40999a8181115f14612da957509a5b8b612507565b670de0b6b3a7640000900490565b93612d28826001600160a01b03165f52601660205260405f2090565b612d33898254612631565b905561307f565b82612ad7565b6001600160a01b0381612da4612d887f798353030d4251a345706609acf9ea7527f2ace26f73150a098c0fae89e5886d946001600160a01b03165f52601660205260405f2090565b5460405193849316958360209093929193604081019481520152565b0390a2565b90509a612cf8565b50811515612c76565b506001600160a01b0381161515612c70565b60ff8114612e125760ff811690601f8211612e035760405191612df0604084612134565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b50604051600554815f612e248361219c565b8083529260018116908115612ea75750600114612e48575b61246592500382612134565b5060055f90815290917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b818310612e8b57505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612e73565b6020925061246594915060ff191682840152151560051b820101612e3c565b60ff8114612eea5760ff811690601f8211612e035760405191612df0604084612134565b50604051600654815f612efc8361219c565b8083529260018116908115612ea75750600114612f1f5761246592500382612134565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310612f6257505090602061246592820101612e3c565b6020919350806001915483858801015201910190918392612f4a565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411613000579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15612ff5575f516001600160a01b03811615612feb57905f905f90565b505f906001905f90565b6040513d5f823e3d90fd5b5050505f9160039190565b600481101561306b578061301d575050565b600181036130345763f645eedf60e01b5f5260045ffd5b6002810361304f575063fce698f760e01b5f5260045260245ffd5b6003146130595750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b031690816130f85760206001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926130c68660025461254d565b6002555b1693846130e35780600254036002555b604051908152a3565b845f525f825260405f208181540190556130da565b815f525f60205260405f205483811061314a576001600160a01b037fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9285602093865f525f85520360405f20556130ca565b91905063391434e360e21b5f5260045260245260445260645ffdfea164736f6c6343000821000af0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"` diff --git a/api/@aastar/tokens/classes/FinanceClient.md b/api/@aastar/tokens/classes/FinanceClient.md index 0c0d661b6..63de7acd0 100644 --- a/api/@aastar/tokens/classes/FinanceClient.md +++ b/api/@aastar/tokens/classes/FinanceClient.md @@ -1,4 +1,4 @@ -Defined in: [index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L16) +Defined in: [index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L16) ## Constructors @@ -6,7 +6,7 @@ Defined in: [index.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/9c6 > **new FinanceClient**(`publicClient`, `walletClient`): `FinanceClient` -Defined in: [index.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L22) +Defined in: [index.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L22) Initialize FinanceClient @@ -14,8 +14,8 @@ Initialize FinanceClient | Parameter | Type | Description | | ------ | ------ | ------ | -| `publicClient` | [`PublicClient`](../../core/interfaces/PublicClient.md) | The public client for queries | -| `walletClient` | [`WalletClient`](../../core/interfaces/WalletClient.md) | The wallet client for transactions | +| `publicClient` | [`PublicClient`](../../sdk/interfaces/PublicClient.md) | The public client for queries | +| `walletClient` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | The wallet client for transactions | #### Returns @@ -27,7 +27,7 @@ Initialize FinanceClient > **approveAndStake**(`amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L159) +Defined in: [index.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L159) One-step stake: Approve (if needed) + Stake @@ -49,7 +49,7 @@ Transaction hash of the stake action > **getAPNTsBalance**(`address`): `Promise`\<`bigint`\> -Defined in: [index.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L143) +Defined in: [index.ts:143](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L143) Get aPNTs balance @@ -69,7 +69,7 @@ Get aPNTs balance > **getCirculatingSupply**(): `Promise`\<\{ `circulating`: `bigint`; `locked`: `bigint`; `total`: `bigint`; \}\> -Defined in: [index.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L197) +Defined in: [index.ts:197](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L197) Get circulating supply (total - locked) @@ -83,7 +83,7 @@ Get circulating supply (total - locked) > **getGTokenBalance**(`address`): `Promise`\<`bigint`\> -Defined in: [index.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L130) +Defined in: [index.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L130) Get GToken balance @@ -103,7 +103,7 @@ Get GToken balance > **getTokenomicsOverview**(): `Promise`\<\{ `circulatingSupply`: `bigint`; `stakingRatio`: `number`; `totalBurned`: `bigint`; `totalStaked`: `bigint`; `totalSupply`: `bigint`; \}\> -Defined in: [index.ts:224](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L224) +Defined in: [index.ts:224](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L224) Get comprehensive tokenomics data @@ -117,13 +117,13 @@ Get comprehensive tokenomics data > `static` **depositToEntryPoint**(`wallet`, `entryPoint`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L82) +Defined in: [index.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L82) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `entryPoint` | `` `0x${string}` `` | | `paymaster` | `` `0x${string}` `` | | `amount` | `bigint` | @@ -142,13 +142,13 @@ Use instance methods instead > `static` **depositToPaymaster**(`wallet`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L30) +Defined in: [index.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L30) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `paymaster` | `` `0x${string}` `` | | `amount` | `bigint` | @@ -166,13 +166,13 @@ Use instance methods instead > `static` **depositViaTransferAndCall**(`wallet`, `token`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L41) +Defined in: [index.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L41) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `token` | `` `0x${string}` `` | | `paymaster` | `` `0x${string}` `` | | `amount` | `bigint` | @@ -191,7 +191,7 @@ Use instance methods instead > `static` **getEntryPointBalance**(`client`, `entryPoint`, `account`): `Promise`\<`bigint`\> -Defined in: [index.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L94) +Defined in: [index.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L94) #### Parameters @@ -215,13 +215,13 @@ Use instance methods instead > `static` **operatorDeposit**(`wallet`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L104) +Defined in: [index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L104) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `paymaster` | `` `0x${string}` `` | | `amount` | `bigint` | @@ -239,13 +239,13 @@ Use instance methods instead > `static` **operatorNotifyDeposit**(`wallet`, `paymaster`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L115) +Defined in: [index.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L115) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `paymaster` | `` `0x${string}` `` | | `amount` | `bigint` | @@ -263,13 +263,13 @@ Use instance methods instead > `static` **stakeGToken**(`wallet`, `stakingAddr`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L60) +Defined in: [index.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L60) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `stakingAddr` | `` `0x${string}` `` | | `amount` | `bigint` | @@ -287,13 +287,13 @@ Use instance methods instead > `static` **withdrawProtocolRevenue**(`wallet`, `paymaster`, `to`, `amount`): `Promise`\<`` `0x${string}` ``\> -Defined in: [index.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/9c654bccf291bedf59c180131227065a5460e904/packages/tokens/src/index.ts#L71) +Defined in: [index.ts:71](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/tokens/src/index.ts#L71) #### Parameters | Parameter | Type | | ------ | ------ | -| `wallet` | [`WalletClient`](../../core/interfaces/WalletClient.md) | +| `wallet` | [`WalletClient`](../../sdk/interfaces/WalletClient.md) | | `paymaster` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` | | `amount` | `bigint` | diff --git a/api/@aastar/x402/classes/FacilitatorClient.md b/api/@aastar/x402/classes/FacilitatorClient.md new file mode 100644 index 000000000..71de4ed09 --- /dev/null +++ b/api/@aastar/x402/classes/FacilitatorClient.md @@ -0,0 +1,80 @@ +Defined in: [packages/x402/src/facilitator.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L16) + +HTTP Facilitator Client — standard x402 v2 facilitator API. +Compatible with Coinbase hosted facilitator and self-hosted instances. + +Ref: coinbase/x402 HTTPFacilitatorClient pattern + +## Constructors + +### Constructor + +> **new FacilitatorClient**(`config`): `FacilitatorClient` + +Defined in: [packages/x402/src/facilitator.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L20) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`FacilitatorConfig`](../type-aliases/FacilitatorConfig.md) | + +#### Returns + +`FacilitatorClient` + +## Methods + +### settle() + +> **settle**(`paymentPayload`, `paymentRequirements`): `Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +Defined in: [packages/x402/src/facilitator.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L57) + +POST /settle — execute on-chain settlement (~2s on Base). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymentPayload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | +| `paymentRequirements` | [`PaymentRequirements`](../type-aliases/PaymentRequirements.md) | + +#### Returns + +`Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +*** + +### supported() + +> **supported**(): `Promise`\<[`FacilitatorSupported`](../type-aliases/FacilitatorSupported.md)\> + +Defined in: [packages/x402/src/facilitator.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L79) + +GET /supported — query facilitator capabilities. + +#### Returns + +`Promise`\<[`FacilitatorSupported`](../type-aliases/FacilitatorSupported.md)\> + +*** + +### verify() + +> **verify**(`paymentPayload`, `paymentRequirements`): `Promise`\<[`VerifyResponse`](../type-aliases/VerifyResponse.md)\> + +Defined in: [packages/x402/src/facilitator.ts:35](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/facilitator.ts#L35) + +POST /verify — validate payment signature off-chain (~100ms). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `paymentPayload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | +| `paymentRequirements` | [`PaymentRequirements`](../type-aliases/PaymentRequirements.md) | + +#### Returns + +`Promise`\<[`VerifyResponse`](../type-aliases/VerifyResponse.md)\> diff --git a/api/@aastar/x402/classes/X402Client.md b/api/@aastar/x402/classes/X402Client.md new file mode 100644 index 000000000..f2b11a5b5 --- /dev/null +++ b/api/@aastar/x402/classes/X402Client.md @@ -0,0 +1,181 @@ +Defined in: [packages/x402/src/X402Client.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L40) + +## Constructors + +### Constructor + +> **new X402Client**(`config`): `X402Client` + +Defined in: [packages/x402/src/X402Client.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L45) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | [`X402ClientConfig`](../type-aliases/X402ClientConfig.md) | + +#### Returns + +`X402Client` + +## Methods + +### checkNonce() + +> **checkNonce**(`nonce`): `Promise`\<`boolean`\> + +Defined in: [packages/x402/src/X402Client.ts:154](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L154) + +Check if a nonce has been used. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `nonce` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`boolean`\> + +*** + +### createPayment() + +> **createPayment**(`params`): `Promise`\<\{ `encoded`: `string`; `nonce`: `` `0x${string}` ``; `payload`: [`PaymentPayload`](../type-aliases/PaymentPayload.md); \}\> + +Defined in: [packages/x402/src/X402Client.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L61) + +Create a signed payment payload (EIP-3009 TransferWithAuthorization). +Returns a base64-encoded PaymentPayload ready for PAYMENT-SIGNATURE header. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | [`X402PaymentParams`](../type-aliases/X402PaymentParams.md) | + +#### Returns + +`Promise`\<\{ `encoded`: `string`; `nonce`: `` `0x${string}` ``; `payload`: [`PaymentPayload`](../type-aliases/PaymentPayload.md); \}\> + +*** + +### getQuote() + +> **getQuote**(): `Promise`\<\{ `feeBPS`: `bigint`; \}\> + +Defined in: [packages/x402/src/X402Client.ts:146](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L146) + +Get facilitator fee quote from on-chain contract. + +#### Returns + +`Promise`\<\{ `feeBPS`: `bigint`; \}\> + +*** + +### settleDirectOnChain() + +> **settleDirectOnChain**(`params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/X402Client.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L134) + +Settle payment on-chain via direct transfer (for xPNTs and pre-approved tokens). + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `amount`: `bigint`; `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; \} | +| `params.amount` | `bigint` | +| `params.asset` | `` `0x${string}` `` | +| `params.from` | `` `0x${string}` `` | +| `params.nonce` | `` `0x${string}` `` | +| `params.to` | `` `0x${string}` `` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### settleOnChain() + +> **settleOnChain**(`params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/X402Client.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L121) + +Settle payment on-chain via SuperPaymaster (self-facilitated). +Uses EIP-3009 transferWithAuthorization path. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `params` | \{ `amount`: `bigint`; `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `signature`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `validAfter`: `bigint`; `validBefore`: `bigint`; \} | +| `params.amount` | `bigint` | +| `params.asset` | `` `0x${string}` `` | +| `params.from` | `` `0x${string}` `` | +| `params.nonce` | `` `0x${string}` `` | +| `params.signature` | `` `0x${string}` `` | +| `params.to` | `` `0x${string}` `` | +| `params.validAfter` | `bigint` | +| `params.validBefore` | `bigint` | + +#### Returns + +`Promise`\<`` `0x${string}` ``\> + +*** + +### settleViaFacilitator() + +> **settleViaFacilitator**(`payload`, `requirements`): `Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +Defined in: [packages/x402/src/X402Client.ts:162](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L162) + +Settle via external facilitator (Coinbase, self-hosted, etc.). +Requires facilitator config in constructor. + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `payload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | +| `requirements` | [`PaymentRequirements`](../type-aliases/PaymentRequirements.md) | + +#### Returns + +`Promise`\<[`SettleResponse`](../type-aliases/SettleResponse.md)\> + +*** + +### x402Fetch() + +> **x402Fetch**(`url`, `init?`): `Promise`\<`Response`\> + +Defined in: [packages/x402/src/X402Client.ts:182](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L182) + +x402-aware fetch wrapper. +Automatically handles 402 → sign → retry flow per x402 v2 spec. + +Pattern from: @x402/fetch wrapFetchWithPayment + +Flow: +1. Make initial request +2. If 402, extract PaymentRequired from PAYMENT-REQUIRED header +3. Select best payment option (applies policy: max amount check) +4. Sign EIP-3009 authorization +5. Retry with PAYMENT-SIGNATURE header + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `url` | `string` | +| `init?` | `RequestInit` | + +#### Returns + +`Promise`\<`Response`\> diff --git a/api/@aastar/x402/functions/decodePaymentPayload.md b/api/@aastar/x402/functions/decodePaymentPayload.md new file mode 100644 index 000000000..d63374481 --- /dev/null +++ b/api/@aastar/x402/functions/decodePaymentPayload.md @@ -0,0 +1,13 @@ +> **decodePaymentPayload**(`encoded`): [`PaymentPayload`](../type-aliases/PaymentPayload.md) + +Defined in: [packages/x402/src/payment-header.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L55) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encoded` | `string` | + +## Returns + +[`PaymentPayload`](../type-aliases/PaymentPayload.md) diff --git a/api/@aastar/x402/functions/decodePaymentRequired.md b/api/@aastar/x402/functions/decodePaymentRequired.md new file mode 100644 index 000000000..567a71e66 --- /dev/null +++ b/api/@aastar/x402/functions/decodePaymentRequired.md @@ -0,0 +1,13 @@ +> **decodePaymentRequired**(`encoded`): [`PaymentRequired`](../type-aliases/PaymentRequired.md) + +Defined in: [packages/x402/src/payment-header.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L45) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encoded` | `string` | + +## Returns + +[`PaymentRequired`](../type-aliases/PaymentRequired.md) diff --git a/api/@aastar/x402/functions/decodeSettleResponse.md b/api/@aastar/x402/functions/decodeSettleResponse.md new file mode 100644 index 000000000..55bd9c6a2 --- /dev/null +++ b/api/@aastar/x402/functions/decodeSettleResponse.md @@ -0,0 +1,13 @@ +> **decodeSettleResponse**(`encoded`): [`SettleResponse`](../type-aliases/SettleResponse.md) + +Defined in: [packages/x402/src/payment-header.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L65) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `encoded` | `string` | + +## Returns + +[`SettleResponse`](../type-aliases/SettleResponse.md) diff --git a/api/@aastar/x402/functions/encodePaymentPayload.md b/api/@aastar/x402/functions/encodePaymentPayload.md new file mode 100644 index 000000000..107afa98b --- /dev/null +++ b/api/@aastar/x402/functions/encodePaymentPayload.md @@ -0,0 +1,13 @@ +> **encodePaymentPayload**(`payload`): `string` + +Defined in: [packages/x402/src/payment-header.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L51) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `payload` | [`PaymentPayload`](../type-aliases/PaymentPayload.md) | + +## Returns + +`string` diff --git a/api/@aastar/x402/functions/encodePaymentRequired.md b/api/@aastar/x402/functions/encodePaymentRequired.md new file mode 100644 index 000000000..9409f6a48 --- /dev/null +++ b/api/@aastar/x402/functions/encodePaymentRequired.md @@ -0,0 +1,13 @@ +> **encodePaymentRequired**(`req`): `string` + +Defined in: [packages/x402/src/payment-header.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L41) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `req` | [`PaymentRequired`](../type-aliases/PaymentRequired.md) | + +## Returns + +`string` diff --git a/api/@aastar/x402/functions/encodeSettleResponse.md b/api/@aastar/x402/functions/encodeSettleResponse.md new file mode 100644 index 000000000..cd5bc85e3 --- /dev/null +++ b/api/@aastar/x402/functions/encodeSettleResponse.md @@ -0,0 +1,13 @@ +> **encodeSettleResponse**(`resp`): `string` + +Defined in: [packages/x402/src/payment-header.ts:61](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L61) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `resp` | [`SettleResponse`](../type-aliases/SettleResponse.md) | + +## Returns + +`string` diff --git a/api/@aastar/x402/functions/extractPaymentRequired.md b/api/@aastar/x402/functions/extractPaymentRequired.md new file mode 100644 index 000000000..8052b4fd3 --- /dev/null +++ b/api/@aastar/x402/functions/extractPaymentRequired.md @@ -0,0 +1,16 @@ +> **extractPaymentRequired**(`response`): [`PaymentRequired`](../type-aliases/PaymentRequired.md) \| `null` + +Defined in: [packages/x402/src/payment-header.ts:77](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L77) + +Extract PaymentRequired from a 402 Response. +Tries v2 header first, falls back to v1. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `response` | `Response` | + +## Returns + +[`PaymentRequired`](../type-aliases/PaymentRequired.md) \| `null` diff --git a/api/@aastar/x402/functions/extractSettleResponse.md b/api/@aastar/x402/functions/extractSettleResponse.md new file mode 100644 index 000000000..435befd49 --- /dev/null +++ b/api/@aastar/x402/functions/extractSettleResponse.md @@ -0,0 +1,15 @@ +> **extractSettleResponse**(`response`): [`SettleResponse`](../type-aliases/SettleResponse.md) \| `null` + +Defined in: [packages/x402/src/payment-header.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L91) + +Extract SettleResponse from a successful response. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `response` | `Response` | + +## Returns + +[`SettleResponse`](../type-aliases/SettleResponse.md) \| `null` diff --git a/api/@aastar/x402/functions/generateNonce.md b/api/@aastar/x402/functions/generateNonce.md new file mode 100644 index 000000000..ffb5ee1eb --- /dev/null +++ b/api/@aastar/x402/functions/generateNonce.md @@ -0,0 +1,7 @@ +> **generateNonce**(): `` `0x${string}` `` + +Defined in: [packages/x402/src/eip3009.ts:37](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L37) + +## Returns + +`` `0x${string}` `` diff --git a/api/@aastar/x402/functions/getEIP3009Domain.md b/api/@aastar/x402/functions/getEIP3009Domain.md new file mode 100644 index 000000000..bcc1ba4d5 --- /dev/null +++ b/api/@aastar/x402/functions/getEIP3009Domain.md @@ -0,0 +1,32 @@ +> **getEIP3009Domain**(`tokenName`, `tokenVersion`, `chainId`, `verifyingContract`): `object` + +Defined in: [packages/x402/src/eip3009.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L28) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `tokenName` | `string` | +| `tokenVersion` | `string` | +| `chainId` | `number` | +| `verifyingContract` | `` `0x${string}` `` | + +## Returns + +`object` + +### chainId + +> **chainId**: `number` + +### name + +> **name**: `string` = `tokenName` + +### verifyingContract + +> **verifyingContract**: `` `0x${string}` `` + +### version + +> **version**: `string` = `tokenVersion` diff --git a/api/@aastar/x402/functions/signCancelAuthorization.md b/api/@aastar/x402/functions/signCancelAuthorization.md new file mode 100644 index 000000000..1f9a652e5 --- /dev/null +++ b/api/@aastar/x402/functions/signCancelAuthorization.md @@ -0,0 +1,66 @@ +> **signCancelAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:186](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L186) + +Sign a CancelAuthorization for GTokenAuthorization (EIP-3009). +Must be signed by the original `authorizer` address. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `authorizer`: `` `0x${string}` ``; `chainId`: `number`; `nonce`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.authorizer` | `` `0x${string}` `` | - | +| `params.chainId` | `number` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/x402/functions/signGTokenTransferWithAuthorization.md b/api/@aastar/x402/functions/signGTokenTransferWithAuthorization.md new file mode 100644 index 000000000..1992de447 --- /dev/null +++ b/api/@aastar/x402/functions/signGTokenTransferWithAuthorization.md @@ -0,0 +1,72 @@ +> **signGTokenTransferWithAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L95) + +Sign a TransferWithAuthorization for GTokenAuthorization (EIP-3009). +GToken-specific wrapper: enforces MAX_AUTH_VALIDITY = 300s before signing. +Use this instead of the generic signTransferWithAuthorization when the +verifying contract is GTokenAuthorization. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.to` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.validAfter` | `bigint` | - | +| `params.validBefore` | `bigint` | - | +| `params.value` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/x402/functions/signReceiveWithAuthorization.md b/api/@aastar/x402/functions/signReceiveWithAuthorization.md new file mode 100644 index 000000000..eddbe3f5d --- /dev/null +++ b/api/@aastar/x402/functions/signReceiveWithAuthorization.md @@ -0,0 +1,71 @@ +> **signReceiveWithAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:134](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L134) + +Sign a ReceiveWithAuthorization for GTokenAuthorization (EIP-3009). +The signed `to` address must be the one submitting the transaction on-chain. +Note: `xPNTsToken` is NOT included in the signature (it's a relay-supplied hint for RC-2). + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.to` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.validAfter` | `bigint` | - | +| `params.validBefore` | `bigint` | - | +| `params.value` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/x402/functions/signTransferWithAuthorization.md b/api/@aastar/x402/functions/signTransferWithAuthorization.md new file mode 100644 index 000000000..fc778380f --- /dev/null +++ b/api/@aastar/x402/functions/signTransferWithAuthorization.md @@ -0,0 +1,67 @@ +> **signTransferWithAuthorization**(`walletClient`, `params`): `Promise`\<`` `0x${string}` ``\> + +Defined in: [packages/x402/src/eip3009.ts:46](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L46) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `walletClient` | \{ `account`: [`Account`](https://viem.sh/docs/index.html) \| `undefined`; `addChain`: (`args`) => `Promise`\<`void`\>; `batch?`: \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \}; `cacheTime`: `number`; `ccipRead?`: `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \}; `chain`: [`Chain`](https://viem.sh/docs/index.html) \| `undefined`; `deployContract`: \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `experimental_blockTag?`: [`BlockTag`](https://viem.sh/docs/index.html); `extend`: \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\>; `fillTransaction`: \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\>; `getAddresses`: () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\>; `getCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `getCapabilities`: \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\>; `getChainId`: () => `Promise`\<`number`\>; `getPermissions`: () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `key`: `string`; `name`: `string`; `pollingInterval`: `number`; `prepareAuthorization`: (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `prepareTransactionRequest`: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\>; `request`: [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\>; `requestAddresses`: () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\>; `requestPermissions`: (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\>; `sendCalls`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\>; `sendCallsSync`: \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `sendRawTransaction`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `sendRawTransactionSync`: (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `sendTransaction`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `sendTransactionSync`: \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; `showCallsStatus`: (`parameters`) => `Promise`\<`void`\>; `signAuthorization`: (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\>; `signMessage`: (`args`) => `Promise`\<`` `0x${string}` ``\>; `signTransaction`: \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\>; `signTypedData`: \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `switchChain`: (`args`) => `Promise`\<`void`\>; `transport`: [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\>; `type`: `string`; `uid`: `string`; `waitForCallsStatus`: (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\>; `watchAsset`: (`args`) => `Promise`\<`boolean`\>; `writeContract`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\>; `writeContractSync`: \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\>; \} | - | +| `walletClient.account` | [`Account`](https://viem.sh/docs/index.html) \| `undefined` | The Account of the Client. | +| `walletClient.addChain` | (`args`) => `Promise`\<`void`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/addChain - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085) **Example** `import { createWalletClient, custom } from 'viem' import { optimism } from 'viem/chains' const client = createWalletClient({ transport: custom(window.ethereum), }) await client.addChain({ chain: optimism })` | +| `walletClient.batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \}; \} | Flags for batch settings. | +| `walletClient.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number`; `deployless?`: `boolean`; `wait?`: `number`; \} | Toggle to enable `eth_call` multicall aggregation. | +| `walletClient.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `walletClient.ccipRead?` | `false` \| \{ `request?`: (`parameters`) => `Promise`\<`` `0x${string}` ``\>; \} | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `walletClient.chain` | [`Chain`](https://viem.sh/docs/index.html) \| `undefined` | Chain for the client. | +| `walletClient.deployContract` | \<`abi`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Deploys a contract to the network, given bytecode and constructor arguments. - Docs: https://viem.sh/docs/contract/deployContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_deploying-contracts **Example** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.deployContract({ abi: [], account: '0x…, bytecode: '0x608060405260405161083e38038061083e833981016040819052610...', })` | +| `walletClient.experimental_blockTag?` | [`BlockTag`](https://viem.sh/docs/index.html) | Default block tag to use for RPC requests. | +| `walletClient.extend` | \<`client`\>(`fn`) => [`Client`](https://viem.sh/docs/index.html)\<[`Transport`](https://viem.sh/docs/index.html), [`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`, [`WalletRpcSchema`](https://viem.sh/docs/index.html), \{ \[K in string \| number \| symbol\]: client\[K\] \} & [`WalletActions`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, [`Account`](https://viem.sh/docs/index.html) \| `undefined`\>\> | - | +| `walletClient.fillTransaction` | \<`chainOverride`, `accountOverride`\>(`args`) => `Promise`\<[`FillTransactionReturnType`](https://viem.sh/docs/index.html)\<[`Chain`](https://viem.sh/docs/index.html) \| `undefined`, `chainOverride`\>\> | Fills a transaction request with the necessary fields to be signed over. - Docs: https://viem.sh/docs/actions/public/fillTransaction **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const result = await client.fillTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), })` | +| `walletClient.getAddresses` | () => `Promise`\<[`GetAddressesReturnType`](https://viem.sh/docs/index.html)\> | Returns a list of account addresses owned by the wallet or client. - Docs: https://viem.sh/docs/actions/wallet/getAddresses - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.getAddresses()` | +| `walletClient.getCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Returns the status of a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/getCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await client.getCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.getCapabilities` | \<`chainId`\>(`parameters?`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (chainId extends number ? \{ atomic?: \{ status: "supported" \| "ready" \| "unsupported" \}; paymasterService?: \{ supported: boolean \}; unstable\_addSubAccount?: \{ keyTypes: ((...) \| (...) \| (...) \| (...))\[\]; supported: boolean \}; \[key: string\]: any \} : ChainIdToCapabilities\<Capabilities\<\{ atomic?: \{ status: ... \}; paymasterService?: \{ supported: ... \}; unstable\_addSubAccount?: \{ keyTypes: ...; supported: ... \}; \[key: string\]: any \}\>, number\>)\[K\] \}\> | Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc). - Docs: https://viem.sh/docs/actions/wallet/getCapabilities - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const capabilities = await client.getCapabilities({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **Example** `import { createWalletClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const chainId = await client.getChainId() // 1` | +| `walletClient.getPermissions` | () => `Promise`\<[`GetPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Gets the wallets current permissions. - Docs: https://viem.sh/docs/actions/wallet/getPermissions - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.getPermissions()` | +| `walletClient.key` | `string` | A key for the client. | +| `walletClient.name` | `string` | A name for the client. | +| `walletClient.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `walletClient.prepareAuthorization` | (`parameters`) => `Promise`\<[`PrepareAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Prepares an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object for signing. This Action will fill the required fields of the Authorization object if they are not provided (e.g. `nonce` and `chainId`). With the prepared Authorization object, you can use [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) to sign over the Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const authorization = await client.prepareAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.prepareTransactionRequest` | \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\<Extract\<UnionOmit\<(...), (...)\> & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & \{ chainId?: number \}, ParameterTypeToParameters\<request\["parameters"\] extends readonly PrepareTransactionRequestParameterType\[\] ? any\[any\]\[number\] : "nonce" \| "type" \| "chainId" \| "fees" \| "gas" \| "blobVersionedHashes"\>\> & (unknown extends request\["kzg"\] ? \{\} : Pick\<request, "kzg"\>))\[K\] \}\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, })` | +| `walletClient.request` | [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\<[`WalletRpcSchema`](https://viem.sh/docs/index.html)\> | Request function wrapped with friendly error handling | +| `walletClient.requestAddresses` | () => `Promise`\<[`RequestAddressesReturnType`](https://viem.sh/docs/index.html)\> | Requests a list of accounts managed by a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestAddresses - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102) Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses). This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts. **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const accounts = await client.requestAddresses()` | +| `walletClient.requestPermissions` | (`args`) => `Promise`\<[`RequestPermissionsReturnType`](https://viem.sh/docs/index.html)\> | Requests permissions for a wallet. - Docs: https://viem.sh/docs/actions/wallet/requestPermissions - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const permissions = await client.requestPermissions({ eth_accounts: {} })` | +| `walletClient.sendCalls` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `capabilities?`: \{\[`key`: `string`\]: `any`; \}; `id`: `string`; \}\> | Requests the connected wallet to send a batch of calls. - Docs: https://viem.sh/docs/actions/wallet/sendCalls - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const id = await client.sendCalls({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendCallsSync` | \<`calls`, `chainOverride`\>(`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Requests the connected wallet to send a batch of calls, and waits for the calls to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendCallsSync - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const status = await client.sendCallsSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', calls: [ { data: '0xdeadbeef', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }, { to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 69420n, }, ], })` | +| `walletClient.sendRawTransaction` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendRawTransactionSync` | (`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Sends a **signed** transaction to the network synchronously, and waits for the transaction to be included in a block. - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransactionSync } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendRawTransactionSync({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' })` | +| `walletClient.sendTransaction` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Creates, signs, and sends a new transaction to the network. - Docs: https://viem.sh/docs/actions/wallet/sendTransaction - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendTransaction({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const hash = await client.sendTransaction({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.sendTransactionSync` | \<`request`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Creates, signs, and sends a new transaction to the network synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/actions/wallet/sendTransactionSync - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.sendTransactionSync({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const receipt = await client.sendTransactionSync({ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n, })` | +| `walletClient.showCallsStatus` | (`parameters`) => `Promise`\<`void`\> | Requests for the wallet to show information about a call batch that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/showCallsStatus - JSON-RPC Methods: [`wallet_showCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.showCallsStatus({ id: '0xdeadbeef' })` | +| `walletClient.signAuthorization` | (`parameters`) => `Promise`\<[`SignAuthorizationReturnType`](https://viem.sh/docs/index.html)\> | Signs an [EIP-7702 Authorization](https://eips.ethereum.org/EIPS/eip-7702) object. With the calculated signature, you can: - use [`verifyAuthorization`](https://viem.sh/docs/eip7702/verifyAuthorization) to verify the signed Authorization object, - use [`recoverAuthorizationAddress`](https://viem.sh/docs/eip7702/recoverAuthorizationAddress) to recover the signing address from the signed Authorization object. **Examples** `import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ account: privateKeyToAccount('0x..'), contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signAuthorization({ contractAddress: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', })` | +| `walletClient.signMessage` | (`args`) => `Promise`\<`` `0x${string}` ``\> | Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signMessage - JSON-RPC Methods: - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data#personal-sign) - Local Accounts: Signs locally. No JSON-RPC request. With the calculated signature, you can: - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage) to verify the signature, - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress) to recover the signing address from a signature. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signMessage({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', message: 'hello world', })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signMessage({ message: 'hello world', })` | +| `walletClient.signTransaction` | \<`chainOverride`, `request`\>(`args`) => `Promise`\<[`TransactionSerialized`](https://viem.sh/docs/index.html)\<[`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\>, [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip1559"` ? `` `0x02${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip2930"` ? `` `0x01${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip4844"` ? `` `0x03${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"eip7702"` ? `` `0x04${string}` `` : `never` \| [`GetTransactionType`](https://viem.sh/docs/index.html)\<`request`, `request` *extends* [`LegacyProperties`](https://viem.sh/docs/index.html) ? `"legacy"` : `never` \| `request` *extends* [`EIP1559Properties`](https://viem.sh/docs/index.html) ? `"eip1559"` : `never` \| `request` *extends* [`EIP2930Properties`](https://viem.sh/docs/index.html) ? `"eip2930"` : `never` \| `request` *extends* [`EIP4844Properties`](https://viem.sh/docs/index.html) ? `"eip4844"` : `never` \| `request` *extends* [`EIP7702Properties`](https://viem.sh/docs/index.html) ? `"eip7702"` : `never` \| `request`\[`"type"`\] *extends* `string` \| `undefined` ? `Extract`\<`any`\[`any`\], `string`\> : `never`\> *extends* `"legacy"` ? [`TransactionSerializedLegacy`](https://viem.sh/docs/index.html) : `never`\>\> | Signs a transaction. - Docs: https://viem.sh/docs/actions/wallet/signTransaction - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) const signature = await client.signTransaction(request)` | +| `walletClient.signTypedData` | \<`typedData`, `primaryType`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. - Docs: https://viem.sh/docs/actions/wallet/signTypedData - JSON-RPC Methods: - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data#signtypeddata-v4) - Local Accounts: Signs locally. No JSON-RPC request. **Examples** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const signature = await client.signTypedData({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` `// Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: http(), }) const signature = await client.signTypedData({ domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', }, types: { Person: [ { name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }, ], Mail: [ { name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }, ], }, primaryType: 'Mail', message: { from: { name: 'Cow', wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', }, to: { name: 'Bob', wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', }, contents: 'Hello, Bob!', }, })` | +| `walletClient.switchChain` | (`args`) => `Promise`\<`void`\> | Switch the target chain in a wallet. - Docs: https://viem.sh/docs/actions/wallet/switchChain - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet, optimism } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) await client.switchChain({ id: optimism.id })` | +| `walletClient.transport` | [`TransportConfig`](https://viem.sh/docs/index.html)\<`string`, [`EIP1193RequestFn`](https://viem.sh/docs/index.html)\> & `Record`\<`string`, `any`\> | The RPC transport | +| `walletClient.type` | `string` | The type of client. | +| `walletClient.uid` | `string` | A unique ID for the client. | +| `walletClient.waitForCallsStatus` | (`parameters`) => `Promise`\<\{ `atomic`: `boolean`; `capabilities?`: \{\[`key`: `string`\]: `any`; \} \| \{\[`key`: `string`\]: `any`; \}; `chainId`: `number`; `id`: `string`; `receipts?`: [`WalletCallReceipt`](https://viem.sh/docs/index.html)\<`bigint`, `"success"` \| `"reverted"`\>[]; `status`: `"success"` \| `"pending"` \| `"failure"` \| `undefined`; `statusCode`: `number`; `version`: `string`; \}\> | Waits for the status & receipts of a call bundle that was sent via `sendCalls`. - Docs: https://viem.sh/docs/actions/wallet/waitForCallsStatus - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { receipts, status } = await waitForCallsStatus(client, { id: '0xdeadbeef' })` | +| `walletClient.watchAsset` | (`args`) => `Promise`\<`boolean`\> | Adds an EVM chain to the wallet. - Docs: https://viem.sh/docs/actions/wallet/watchAsset - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747) **Example** `import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const success = await client.watchAsset({ type: 'ERC20', options: { address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', decimals: 18, symbol: 'WETH', }, })` | +| `walletClient.writeContract` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<`` `0x${string}` ``\> | Executes a write function on a contract. - Docs: https://viem.sh/docs/contract/writeContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Examples** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.writeContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` `// With Validation import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const { request } = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], } const hash = await client.writeContract(request)` | +| `walletClient.writeContractSync` | \<`abi`, `functionName`, `args`, `chainOverride`\>(`args`) => `Promise`\<[`TransactionReceipt`](https://viem.sh/docs/index.html)\> | Executes a write function on a contract synchronously. Returns the transaction receipt. - Docs: https://viem.sh/docs/contract/writeContract 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. Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). __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.__ **Example** `import { createWalletClient, custom, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const receipt = await client.writeContractSync({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), functionName: 'mint', args: [69420], })` | +| `params` | \{ `chainId`: `number`; `from`: `` `0x${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `tokenName`: `string`; `tokenVersion`: `string`; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `bigint`; `verifyingContract`: `` `0x${string}` ``; \} | - | +| `params.chainId` | `number` | - | +| `params.from` | `` `0x${string}` `` | - | +| `params.nonce` | `` `0x${string}` `` | - | +| `params.to` | `` `0x${string}` `` | - | +| `params.tokenName` | `string` | - | +| `params.tokenVersion` | `string` | - | +| `params.validAfter` | `bigint` | - | +| `params.validBefore` | `bigint` | - | +| `params.value` | `bigint` | - | +| `params.verifyingContract` | `` `0x${string}` `` | - | + +## Returns + +`Promise`\<`` `0x${string}` ``\> diff --git a/api/@aastar/x402/index.md b/api/@aastar/x402/index.md new file mode 100644 index 000000000..af76ced72 --- /dev/null +++ b/api/@aastar/x402/index.md @@ -0,0 +1,47 @@ +## Classes + +- [FacilitatorClient](classes/FacilitatorClient.md) +- [X402Client](classes/X402Client.md) + +## Type Aliases + +- [DirectPaymentPayload](type-aliases/DirectPaymentPayload.md) +- [EIP3009Authorization](type-aliases/EIP3009Authorization.md) +- [FacilitatorConfig](type-aliases/FacilitatorConfig.md) +- [FacilitatorSupported](type-aliases/FacilitatorSupported.md) +- [NetworkId](type-aliases/NetworkId.md) +- [PaymentPayload](type-aliases/PaymentPayload.md) +- [PaymentRequired](type-aliases/PaymentRequired.md) +- [PaymentRequirements](type-aliases/PaymentRequirements.md) +- [ResourceInfo](type-aliases/ResourceInfo.md) +- [SettleResponse](type-aliases/SettleResponse.md) +- [VerifyResponse](type-aliases/VerifyResponse.md) +- [X402ClientConfig](type-aliases/X402ClientConfig.md) +- [X402PaymentParams](type-aliases/X402PaymentParams.md) + +## Variables + +- [EIP3009\_TYPES](variables/EIP3009_TYPES.md) +- [GTOKEN\_EIP712\_DOMAIN](variables/GTOKEN_EIP712_DOMAIN.md) +- [HEADER\_PAYMENT\_REQUIRED](variables/HEADER_PAYMENT_REQUIRED.md) +- [HEADER\_PAYMENT\_RESPONSE](variables/HEADER_PAYMENT_RESPONSE.md) +- [HEADER\_PAYMENT\_SIGNATURE](variables/HEADER_PAYMENT_SIGNATURE.md) +- [HEADER\_V1\_PAYMENT](variables/HEADER_V1_PAYMENT.md) +- [HEADER\_V1\_PAYMENT\_RESPONSE](variables/HEADER_V1_PAYMENT_RESPONSE.md) + +## Functions + +- [decodePaymentPayload](functions/decodePaymentPayload.md) +- [decodePaymentRequired](functions/decodePaymentRequired.md) +- [decodeSettleResponse](functions/decodeSettleResponse.md) +- [encodePaymentPayload](functions/encodePaymentPayload.md) +- [encodePaymentRequired](functions/encodePaymentRequired.md) +- [encodeSettleResponse](functions/encodeSettleResponse.md) +- [extractPaymentRequired](functions/extractPaymentRequired.md) +- [extractSettleResponse](functions/extractSettleResponse.md) +- [generateNonce](functions/generateNonce.md) +- [getEIP3009Domain](functions/getEIP3009Domain.md) +- [signCancelAuthorization](functions/signCancelAuthorization.md) +- [signGTokenTransferWithAuthorization](functions/signGTokenTransferWithAuthorization.md) +- [signReceiveWithAuthorization](functions/signReceiveWithAuthorization.md) +- [signTransferWithAuthorization](functions/signTransferWithAuthorization.md) diff --git a/api/@aastar/x402/type-aliases/DirectPaymentPayload.md b/api/@aastar/x402/type-aliases/DirectPaymentPayload.md new file mode 100644 index 000000000..f2735ff3c --- /dev/null +++ b/api/@aastar/x402/type-aliases/DirectPaymentPayload.md @@ -0,0 +1,61 @@ +> **DirectPaymentPayload** = `object` + +Defined in: [packages/x402/src/types.ts:115](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L115) + +Direct settlement (for xPNTs and pre-approved tokens, bypasses EIP-3009) + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/x402/src/types.ts:121](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L121) + +*** + +### asset + +> **asset**: `Address` + +Defined in: [packages/x402/src/types.ts:120](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L120) + +*** + +### from + +> **from**: `Address` + +Defined in: [packages/x402/src/types.ts:118](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L118) + +*** + +### nonce + +> **nonce**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/types.ts:122](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L122) + +*** + +### scheme + +> **scheme**: `"direct"` + +Defined in: [packages/x402/src/types.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L117) + +*** + +### to + +> **to**: `Address` + +Defined in: [packages/x402/src/types.ts:119](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L119) + +*** + +### x402Version + +> **x402Version**: `2` + +Defined in: [packages/x402/src/types.ts:116](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L116) diff --git a/api/@aastar/x402/type-aliases/EIP3009Authorization.md b/api/@aastar/x402/type-aliases/EIP3009Authorization.md new file mode 100644 index 000000000..58e730d5e --- /dev/null +++ b/api/@aastar/x402/type-aliases/EIP3009Authorization.md @@ -0,0 +1,53 @@ +> **EIP3009Authorization** = `object` + +Defined in: [packages/x402/src/types.ts:51](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L51) + +EIP-3009 TransferWithAuthorization parameters. + +## Properties + +### from + +> **from**: `Address` + +Defined in: [packages/x402/src/types.ts:52](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L52) + +*** + +### nonce + +> **nonce**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/types.ts:57](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L57) + +*** + +### to + +> **to**: `Address` + +Defined in: [packages/x402/src/types.ts:53](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L53) + +*** + +### validAfter + +> **validAfter**: `string` + +Defined in: [packages/x402/src/types.ts:55](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L55) + +*** + +### validBefore + +> **validBefore**: `string` + +Defined in: [packages/x402/src/types.ts:56](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L56) + +*** + +### value + +> **value**: `string` + +Defined in: [packages/x402/src/types.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L54) diff --git a/api/@aastar/x402/type-aliases/FacilitatorConfig.md b/api/@aastar/x402/type-aliases/FacilitatorConfig.md new file mode 100644 index 000000000..b2b4b2fa7 --- /dev/null +++ b/api/@aastar/x402/type-aliases/FacilitatorConfig.md @@ -0,0 +1,25 @@ +> **FacilitatorConfig** = `object` + +Defined in: [packages/x402/src/types.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L137) + +Facilitator client configuration + +## Properties + +### createAuthHeaders()? + +> `optional` **createAuthHeaders**: () => `Promise`\<\{ `settle?`: `Record`\<`string`, `string`\>; `supported?`: `Record`\<`string`, `string`\>; `verify?`: `Record`\<`string`, `string`\>; \}\> + +Defined in: [packages/x402/src/types.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L139) + +#### Returns + +`Promise`\<\{ `settle?`: `Record`\<`string`, `string`\>; `supported?`: `Record`\<`string`, `string`\>; `verify?`: `Record`\<`string`, `string`\>; \}\> + +*** + +### url + +> **url**: `string` + +Defined in: [packages/x402/src/types.ts:138](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L138) diff --git a/api/@aastar/x402/type-aliases/FacilitatorSupported.md b/api/@aastar/x402/type-aliases/FacilitatorSupported.md new file mode 100644 index 000000000..9736b109a --- /dev/null +++ b/api/@aastar/x402/type-aliases/FacilitatorSupported.md @@ -0,0 +1,37 @@ +> **FacilitatorSupported** = `object` + +Defined in: [packages/x402/src/types.ts:100](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L100) + +Facilitator supported kinds response. + +## Properties + +### extensions + +> **extensions**: `string`[] + +Defined in: [packages/x402/src/types.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L107) + +*** + +### kinds + +> **kinds**: `object`[] + +Defined in: [packages/x402/src/types.ts:101](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L101) + +#### extra? + +> `optional` **extra**: `Record`\<`string`, `unknown`\> + +#### network + +> **network**: `string` + +#### scheme + +> **scheme**: `string` + +#### x402Version + +> **x402Version**: `number` diff --git a/api/@aastar/x402/type-aliases/NetworkId.md b/api/@aastar/x402/type-aliases/NetworkId.md new file mode 100644 index 000000000..c864a1e90 --- /dev/null +++ b/api/@aastar/x402/type-aliases/NetworkId.md @@ -0,0 +1,5 @@ +> **NetworkId** = `` `eip155:${number}` `` \| `` `solana:${string}` `` + +Defined in: [packages/x402/src/types.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L10) + +CAIP-2 network identifier (e.g. "eip155:11155111" for Sepolia) diff --git a/api/@aastar/x402/type-aliases/PaymentPayload.md b/api/@aastar/x402/type-aliases/PaymentPayload.md new file mode 100644 index 000000000..1cb99a841 --- /dev/null +++ b/api/@aastar/x402/type-aliases/PaymentPayload.md @@ -0,0 +1,54 @@ +> **PaymentPayload** = `object` + +Defined in: [packages/x402/src/types.ts:64](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L64) + +Client payment payload — PAYMENT-SIGNATURE header. +Client sends this on retry request. + +## Properties + +### accepted + +> **accepted**: [`PaymentRequirements`](PaymentRequirements.md) + +Defined in: [packages/x402/src/types.ts:67](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L67) + +*** + +### extensions? + +> `optional` **extensions**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/x402/src/types.ts:72](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L72) + +*** + +### payload + +> **payload**: `object` + +Defined in: [packages/x402/src/types.ts:68](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L68) + +#### authorization + +> **authorization**: [`EIP3009Authorization`](EIP3009Authorization.md) + +#### signature + +> **signature**: [`Hex`](https://viem.sh/docs/index.html) + +*** + +### resource? + +> `optional` **resource**: [`ResourceInfo`](ResourceInfo.md) + +Defined in: [packages/x402/src/types.ts:66](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L66) + +*** + +### x402Version + +> **x402Version**: `2` + +Defined in: [packages/x402/src/types.ts:65](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L65) diff --git a/api/@aastar/x402/type-aliases/PaymentRequired.md b/api/@aastar/x402/type-aliases/PaymentRequired.md new file mode 100644 index 000000000..576df78f8 --- /dev/null +++ b/api/@aastar/x402/type-aliases/PaymentRequired.md @@ -0,0 +1,46 @@ +> **PaymentRequired** = `object` + +Defined in: [packages/x402/src/types.ts:40](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L40) + +402 response body / PAYMENT-REQUIRED header. +Server sends this to indicate payment is needed. + +## Properties + +### accepts + +> **accepts**: [`PaymentRequirements`](PaymentRequirements.md)[] + +Defined in: [packages/x402/src/types.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L44) + +*** + +### error? + +> `optional` **error**: `string` + +Defined in: [packages/x402/src/types.ts:42](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L42) + +*** + +### extensions? + +> `optional` **extensions**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/x402/src/types.ts:45](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L45) + +*** + +### resource + +> **resource**: [`ResourceInfo`](ResourceInfo.md) + +Defined in: [packages/x402/src/types.ts:43](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L43) + +*** + +### x402Version + +> **x402Version**: `2` + +Defined in: [packages/x402/src/types.ts:41](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L41) diff --git a/api/@aastar/x402/type-aliases/PaymentRequirements.md b/api/@aastar/x402/type-aliases/PaymentRequirements.md new file mode 100644 index 000000000..030fcabe1 --- /dev/null +++ b/api/@aastar/x402/type-aliases/PaymentRequirements.md @@ -0,0 +1,70 @@ +> **PaymentRequirements** = `object` + +Defined in: [packages/x402/src/types.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L23) + +Payment requirements — one option in the `accepts` array. +Matches @x402/core PaymentRequirements. + +## Properties + +### amount + +> **amount**: `string` + +Defined in: [packages/x402/src/types.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L27) + +*** + +### asset + +> **asset**: `Address` + +Defined in: [packages/x402/src/types.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L26) + +*** + +### extra + +> **extra**: `object` + +Defined in: [packages/x402/src/types.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L30) + +#### name + +> **name**: `string` + +#### version + +> **version**: `string` + +*** + +### maxTimeoutSeconds + +> **maxTimeoutSeconds**: `number` + +Defined in: [packages/x402/src/types.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L29) + +*** + +### network + +> **network**: [`NetworkId`](NetworkId.md) + +Defined in: [packages/x402/src/types.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L25) + +*** + +### payTo + +> **payTo**: `Address` + +Defined in: [packages/x402/src/types.ts:28](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L28) + +*** + +### scheme + +> **scheme**: `"exact"` \| `"upto"` + +Defined in: [packages/x402/src/types.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L24) diff --git a/api/@aastar/x402/type-aliases/ResourceInfo.md b/api/@aastar/x402/type-aliases/ResourceInfo.md new file mode 100644 index 000000000..3c7087609 --- /dev/null +++ b/api/@aastar/x402/type-aliases/ResourceInfo.md @@ -0,0 +1,29 @@ +> **ResourceInfo** = `object` + +Defined in: [packages/x402/src/types.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L13) + +Resource description in 402 response + +## Properties + +### description? + +> `optional` **description**: `string` + +Defined in: [packages/x402/src/types.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L15) + +*** + +### mimeType? + +> `optional` **mimeType**: `string` + +Defined in: [packages/x402/src/types.ts:16](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L16) + +*** + +### url + +> **url**: `string` + +Defined in: [packages/x402/src/types.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L14) diff --git a/api/@aastar/x402/type-aliases/SettleResponse.md b/api/@aastar/x402/type-aliases/SettleResponse.md new file mode 100644 index 000000000..f46cb538f --- /dev/null +++ b/api/@aastar/x402/type-aliases/SettleResponse.md @@ -0,0 +1,54 @@ +> **SettleResponse** = `object` + +Defined in: [packages/x402/src/types.ts:79](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L79) + +Settlement response — PAYMENT-RESPONSE header. +Server returns after facilitator settles. + +## Properties + +### errorReason? + +> `optional` **errorReason**: `string` + +Defined in: [packages/x402/src/types.ts:84](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L84) + +*** + +### extensions? + +> `optional` **extensions**: `Record`\<`string`, `unknown`\> + +Defined in: [packages/x402/src/types.ts:85](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L85) + +*** + +### network? + +> `optional` **network**: [`NetworkId`](NetworkId.md) + +Defined in: [packages/x402/src/types.ts:82](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L82) + +*** + +### payer? + +> `optional` **payer**: `Address` + +Defined in: [packages/x402/src/types.ts:83](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L83) + +*** + +### success + +> **success**: `boolean` + +Defined in: [packages/x402/src/types.ts:80](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L80) + +*** + +### transaction? + +> `optional` **transaction**: `string` + +Defined in: [packages/x402/src/types.ts:81](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L81) diff --git a/api/@aastar/x402/type-aliases/VerifyResponse.md b/api/@aastar/x402/type-aliases/VerifyResponse.md new file mode 100644 index 000000000..56d6b89dd --- /dev/null +++ b/api/@aastar/x402/type-aliases/VerifyResponse.md @@ -0,0 +1,29 @@ +> **VerifyResponse** = `object` + +Defined in: [packages/x402/src/types.ts:91](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L91) + +Facilitator verify response. + +## Properties + +### invalidReason? + +> `optional` **invalidReason**: `string` + +Defined in: [packages/x402/src/types.ts:93](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L93) + +*** + +### isValid + +> **isValid**: `boolean` + +Defined in: [packages/x402/src/types.ts:92](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L92) + +*** + +### payer? + +> `optional` **payer**: `Address` + +Defined in: [packages/x402/src/types.ts:94](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L94) diff --git a/api/@aastar/x402/type-aliases/X402ClientConfig.md b/api/@aastar/x402/type-aliases/X402ClientConfig.md new file mode 100644 index 000000000..f5f625fd1 --- /dev/null +++ b/api/@aastar/x402/type-aliases/X402ClientConfig.md @@ -0,0 +1,73 @@ +> **X402ClientConfig** = `object` + +Defined in: [packages/x402/src/X402Client.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L21) + +## Properties + +### chainId + +> **chainId**: `number` + +Defined in: [packages/x402/src/X402Client.ts:25](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L25) + +*** + +### facilitator? + +> `optional` **facilitator**: [`FacilitatorConfig`](FacilitatorConfig.md) + +Defined in: [packages/x402/src/X402Client.ts:27](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L27) + +Facilitator endpoint (default: self-facilitated via SuperPaymaster) + +*** + +### maxAmountPerRequest? + +> `optional` **maxAmountPerRequest**: `bigint` + +Defined in: [packages/x402/src/X402Client.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L32) + +Payment policy: max amount per request (in atomic units) + +*** + +### publicClient + +> **publicClient**: [`PublicClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/X402Client.ts:22](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L22) + +*** + +### superPaymasterAddress + +> **superPaymasterAddress**: `Address` + +Defined in: [packages/x402/src/X402Client.ts:24](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L24) + +*** + +### tokenName? + +> `optional` **tokenName**: `string` + +Defined in: [packages/x402/src/X402Client.ts:29](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L29) + +EIP-712 domain for asset token (defaults: USDC / version "2") + +*** + +### tokenVersion? + +> `optional` **tokenVersion**: `string` + +Defined in: [packages/x402/src/X402Client.ts:30](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L30) + +*** + +### walletClient + +> **walletClient**: [`WalletClient`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/X402Client.ts:23](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/X402Client.ts#L23) diff --git a/api/@aastar/x402/type-aliases/X402PaymentParams.md b/api/@aastar/x402/type-aliases/X402PaymentParams.md new file mode 100644 index 000000000..b0e916471 --- /dev/null +++ b/api/@aastar/x402/type-aliases/X402PaymentParams.md @@ -0,0 +1,61 @@ +> **X402PaymentParams** = `object` + +Defined in: [packages/x402/src/types.ts:126](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L126) + +Payment creation parameters (high-level SDK input) + +## Properties + +### amount + +> **amount**: `bigint` + +Defined in: [packages/x402/src/types.ts:130](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L130) + +*** + +### asset + +> **asset**: `Address` + +Defined in: [packages/x402/src/types.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L129) + +*** + +### from + +> **from**: `Address` + +Defined in: [packages/x402/src/types.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L127) + +*** + +### nonce? + +> `optional` **nonce**: [`Hex`](https://viem.sh/docs/index.html) + +Defined in: [packages/x402/src/types.ts:133](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L133) + +*** + +### to + +> **to**: `Address` + +Defined in: [packages/x402/src/types.ts:128](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L128) + +*** + +### validAfter? + +> `optional` **validAfter**: `bigint` + +Defined in: [packages/x402/src/types.ts:131](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L131) + +*** + +### validBefore? + +> `optional` **validBefore**: `bigint` + +Defined in: [packages/x402/src/types.ts:132](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/types.ts#L132) diff --git a/api/@aastar/x402/variables/EIP3009_TYPES.md b/api/@aastar/x402/variables/EIP3009_TYPES.md new file mode 100644 index 000000000..b5dedbb12 --- /dev/null +++ b/api/@aastar/x402/variables/EIP3009_TYPES.md @@ -0,0 +1,17 @@ +> `const` **EIP3009\_TYPES**: `object` + +Defined in: [packages/x402/src/eip3009.ts:3](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L3) + +## Type Declaration + +### CancelAuthorization + +> `readonly` **CancelAuthorization**: readonly \[\{ `name`: `"authorizer"`; `type`: `"address"`; \}, \{ `name`: `"nonce"`; `type`: `"bytes32"`; \}\] + +### ReceiveWithAuthorization + +> `readonly` **ReceiveWithAuthorization**: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"value"`; `type`: `"uint256"`; \}, \{ `name`: `"validAfter"`; `type`: `"uint256"`; \}, \{ `name`: `"validBefore"`; `type`: `"uint256"`; \}, \{ `name`: `"nonce"`; `type`: `"bytes32"`; \}\] + +### TransferWithAuthorization + +> `readonly` **TransferWithAuthorization**: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"value"`; `type`: `"uint256"`; \}, \{ `name`: `"validAfter"`; `type`: `"uint256"`; \}, \{ `name`: `"validBefore"`; `type`: `"uint256"`; \}, \{ `name`: `"nonce"`; `type`: `"bytes32"`; \}\] diff --git a/api/@aastar/x402/variables/GTOKEN_EIP712_DOMAIN.md b/api/@aastar/x402/variables/GTOKEN_EIP712_DOMAIN.md new file mode 100644 index 000000000..20eb1ce06 --- /dev/null +++ b/api/@aastar/x402/variables/GTOKEN_EIP712_DOMAIN.md @@ -0,0 +1,13 @@ +> `const` **GTOKEN\_EIP712\_DOMAIN**: `object` + +Defined in: [packages/x402/src/eip3009.ts:44](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/eip3009.ts#L44) + +## Type Declaration + +### name + +> `readonly` **name**: `"GToken"` = `'GToken'` + +### version + +> `readonly` **version**: `"1"` = `'1'` diff --git a/api/@aastar/x402/variables/HEADER_PAYMENT_REQUIRED.md b/api/@aastar/x402/variables/HEADER_PAYMENT_REQUIRED.md new file mode 100644 index 000000000..83e503328 --- /dev/null +++ b/api/@aastar/x402/variables/HEADER_PAYMENT_REQUIRED.md @@ -0,0 +1,5 @@ +> `const` **HEADER\_PAYMENT\_REQUIRED**: `"PAYMENT-REQUIRED"` = `'PAYMENT-REQUIRED'` + +Defined in: [packages/x402/src/payment-header.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L9) + +v2 header names (standard) diff --git a/api/@aastar/x402/variables/HEADER_PAYMENT_RESPONSE.md b/api/@aastar/x402/variables/HEADER_PAYMENT_RESPONSE.md new file mode 100644 index 000000000..96d82db91 --- /dev/null +++ b/api/@aastar/x402/variables/HEADER_PAYMENT_RESPONSE.md @@ -0,0 +1,3 @@ +> `const` **HEADER\_PAYMENT\_RESPONSE**: `"PAYMENT-RESPONSE"` = `'PAYMENT-RESPONSE'` + +Defined in: [packages/x402/src/payment-header.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L11) diff --git a/api/@aastar/x402/variables/HEADER_PAYMENT_SIGNATURE.md b/api/@aastar/x402/variables/HEADER_PAYMENT_SIGNATURE.md new file mode 100644 index 000000000..46e077725 --- /dev/null +++ b/api/@aastar/x402/variables/HEADER_PAYMENT_SIGNATURE.md @@ -0,0 +1,3 @@ +> `const` **HEADER\_PAYMENT\_SIGNATURE**: `"PAYMENT-SIGNATURE"` = `'PAYMENT-SIGNATURE'` + +Defined in: [packages/x402/src/payment-header.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L10) diff --git a/api/@aastar/x402/variables/HEADER_V1_PAYMENT.md b/api/@aastar/x402/variables/HEADER_V1_PAYMENT.md new file mode 100644 index 000000000..7f89cb3d3 --- /dev/null +++ b/api/@aastar/x402/variables/HEADER_V1_PAYMENT.md @@ -0,0 +1,5 @@ +> `const` **HEADER\_V1\_PAYMENT**: `"X-PAYMENT"` = `'X-PAYMENT'` + +Defined in: [packages/x402/src/payment-header.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L14) + +v1 header names (backward compat) diff --git a/api/@aastar/x402/variables/HEADER_V1_PAYMENT_RESPONSE.md b/api/@aastar/x402/variables/HEADER_V1_PAYMENT_RESPONSE.md new file mode 100644 index 000000000..38f9f6ee5 --- /dev/null +++ b/api/@aastar/x402/variables/HEADER_V1_PAYMENT_RESPONSE.md @@ -0,0 +1,3 @@ +> `const` **HEADER\_V1\_PAYMENT\_RESPONSE**: `"X-PAYMENT-RESPONSE"` = `'X-PAYMENT-RESPONSE'` + +Defined in: [packages/x402/src/payment-header.ts:15](https://github.com/AAStarCommunity/aastar-sdk/blob/605127e5698e83b701be3a068b636f758e1cef9c/packages/x402/src/payment-header.ts#L15) diff --git a/api/_media/basic-usage.ts b/api/_media/basic-usage.ts new file mode 100644 index 000000000..9a54d3946 --- /dev/null +++ b/api/_media/basic-usage.ts @@ -0,0 +1,253 @@ +/** + * AirAccount SDK - Basic Usage Example (Browser/Frontend) + * + * This example demonstrates how to integrate the AirAccount SDK + * into your frontend application for Passkey authentication and + * KMS-based wallet operations with ERC-4337 account abstraction. + */ + +import { AirAccountClient } from "@aastar/airaccount"; + +// ============================================ +// 1. Initialize the SDK Client +// ============================================ + +const air = new AirAccountClient({ + // Your backend API URL + apiURL: "http://localhost:3000/api/v1", + + // Token provider function (for authenticated requests) + tokenProvider: () => { + if (typeof window === "undefined") return null; + return localStorage.getItem("token"); + }, + + // BLS configuration + bls: { + seedNodes: ["https://signer1.aastar.io", "https://signer2.aastar.io"], + discoveryTimeout: 5000, + }, +}); + +// ============================================ +// 2. KMS-Based Passkey Registration +// ============================================ + +/** + * Registration flow (KMS + WebAuthn): + * 1. Backend calls KMS BeginRegistration + * 2. Browser triggers WebAuthn biometric prompt + * 3. Backend calls KMS CompleteRegistration + * 4. KMS creates a signing key linked to the passkey + * 5. Backend returns JWT + user info + */ +async function registerWithPasskey() { + try { + console.log("Starting KMS-backed Passkey registration..."); + + const result = await air.passkey.register({ + email: "user@example.com", + username: "JohnDoe", + }); + + console.log("Registration successful!"); + console.log("User:", result.user); + console.log("Token:", result.token); + + // Save token for future requests + localStorage.setItem("token", result.token); + localStorage.setItem("user", JSON.stringify(result.user)); + + return result; + } catch (error) { + console.error("Registration failed:", error); + throw error; + } +} + +// ============================================ +// 3. KMS Passkey Login +// ============================================ + +/** + * Login flow (KMS + WebAuthn): + * 1. Backend calls KMS BeginAuthentication + * 2. Browser triggers WebAuthn biometric prompt + * 3. Backend verifies credential via KMS + * 4. Backend returns JWT token + */ +async function loginWithPasskey() { + try { + console.log("Starting KMS-backed Passkey login..."); + + const result = await air.passkey.authenticate(); + + console.log("Login successful!"); + console.log("User:", result.user); + + localStorage.setItem("token", result.token); + localStorage.setItem("user", JSON.stringify(result.user)); + + return result; + } catch (error) { + console.error("Login failed:", error); + throw error; + } +} + +// ============================================ +// 4. Transaction with Passkey Assertion +// ============================================ + +/** + * Transaction flow (KMS signing): + * 1. User confirms via biometric (WebAuthn assertion) + * 2. Assertion is sent to backend with transfer params + * 3. Backend uses KMS to sign the UserOp with the passkey assertion + * 4. Signed UserOp submitted to bundler + * + * Note: The `passkeyAssertion` field uses the Legacy format + * with AuthenticatorData, ClientDataHash, and Signature. + */ +async function sendTransaction() { + try { + console.log("Preparing transaction..."); + + // Step 1: Verify transaction with Passkey (gets WebAuthn credential) + const verification = await air.passkey.verifyTransaction({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + value: "0.01", + data: "0x", + }); + + console.log("Transaction verified!"); + console.log("UserOpHash:", verification.userOpHash); + + // Step 2: Send the verified transaction to your backend + // The backend will construct and sign the UserOp via KMS + const response = await fetch("http://localhost:3000/api/v1/transfer", { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${localStorage.getItem("token")}`, + }, + body: JSON.stringify({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + amount: "0.01", + // KMS passkey assertion format (Legacy hex format for BLS dual-signing) + passkeyAssertion: { + AuthenticatorData: verification.credential.authenticatorData, + ClientDataHash: verification.credential.clientDataHash, + Signature: verification.credential.signature, + }, + usePaymaster: true, + }), + }); + + const result = await response.json(); + console.log("Transaction submitted:", result); + + return result; + } catch (error) { + console.error("Transaction failed:", error); + throw error; + } +} + +// ============================================ +// 5. BLS Signature Operations (Advanced) +// ============================================ + +async function demonstrateBLS() { + try { + // Get available BLS nodes from gossip network + const nodes = await air.bls.getAvailableNodes(); + console.log("Available BLS nodes:", nodes); + + // Generate message point for a UserOpHash + const userOpHash = "0x1234..."; + const messagePoint = await air.bls.generateMessagePoint(userOpHash); + console.log("Message Point:", messagePoint); + + // Note: Actual BLS signing is handled by the backend + // using the server SDK's BLSSignatureService + } catch (error) { + console.error("BLS operation failed:", error); + } +} + +// ============================================ +// 6. Usage in React / Next.js +// ============================================ + +/* +import { AirAccountClient } from '@aastar/airaccount'; +import { useState } from 'react'; + +// Create client instance (can be shared across components) +const air = new AirAccountClient({ + apiURL: process.env.NEXT_PUBLIC_API_URL!, + tokenProvider: () => localStorage.getItem('token'), + bls: { + seedNodes: [process.env.NEXT_PUBLIC_BLS_SEED_NODE!], + }, +}); + +function LoginPage() { + const [user, setUser] = useState(null); + const [loading, setLoading] = useState(false); + + const handleRegister = async () => { + setLoading(true); + try { + const result = await air.passkey.register({ + email: 'user@example.com', + username: 'JohnDoe', + }); + setUser(result.user); + localStorage.setItem('token', result.token); + } catch (error) { + console.error('Registration failed:', error); + } finally { + setLoading(false); + } + }; + + const handleLogin = async () => { + setLoading(true); + try { + const result = await air.passkey.authenticate(); + setUser(result.user); + localStorage.setItem('token', result.token); + } catch (error) { + console.error('Login failed:', error); + } finally { + setLoading(false); + } + }; + + return ( +
+ + + {user &&

Welcome, {user.username}!

} +
+ ); +} +*/ + +// ============================================ +// Export for module usage +// ============================================ + +export { + air, + registerWithPasskey, + loginWithPasskey, + sendTransaction, + demonstrateBLS, +}; diff --git a/api/_media/examples/basic-usage.ts b/api/_media/examples/basic-usage.ts new file mode 100644 index 000000000..9a54d3946 --- /dev/null +++ b/api/_media/examples/basic-usage.ts @@ -0,0 +1,253 @@ +/** + * AirAccount SDK - Basic Usage Example (Browser/Frontend) + * + * This example demonstrates how to integrate the AirAccount SDK + * into your frontend application for Passkey authentication and + * KMS-based wallet operations with ERC-4337 account abstraction. + */ + +import { AirAccountClient } from "@aastar/airaccount"; + +// ============================================ +// 1. Initialize the SDK Client +// ============================================ + +const air = new AirAccountClient({ + // Your backend API URL + apiURL: "http://localhost:3000/api/v1", + + // Token provider function (for authenticated requests) + tokenProvider: () => { + if (typeof window === "undefined") return null; + return localStorage.getItem("token"); + }, + + // BLS configuration + bls: { + seedNodes: ["https://signer1.aastar.io", "https://signer2.aastar.io"], + discoveryTimeout: 5000, + }, +}); + +// ============================================ +// 2. KMS-Based Passkey Registration +// ============================================ + +/** + * Registration flow (KMS + WebAuthn): + * 1. Backend calls KMS BeginRegistration + * 2. Browser triggers WebAuthn biometric prompt + * 3. Backend calls KMS CompleteRegistration + * 4. KMS creates a signing key linked to the passkey + * 5. Backend returns JWT + user info + */ +async function registerWithPasskey() { + try { + console.log("Starting KMS-backed Passkey registration..."); + + const result = await air.passkey.register({ + email: "user@example.com", + username: "JohnDoe", + }); + + console.log("Registration successful!"); + console.log("User:", result.user); + console.log("Token:", result.token); + + // Save token for future requests + localStorage.setItem("token", result.token); + localStorage.setItem("user", JSON.stringify(result.user)); + + return result; + } catch (error) { + console.error("Registration failed:", error); + throw error; + } +} + +// ============================================ +// 3. KMS Passkey Login +// ============================================ + +/** + * Login flow (KMS + WebAuthn): + * 1. Backend calls KMS BeginAuthentication + * 2. Browser triggers WebAuthn biometric prompt + * 3. Backend verifies credential via KMS + * 4. Backend returns JWT token + */ +async function loginWithPasskey() { + try { + console.log("Starting KMS-backed Passkey login..."); + + const result = await air.passkey.authenticate(); + + console.log("Login successful!"); + console.log("User:", result.user); + + localStorage.setItem("token", result.token); + localStorage.setItem("user", JSON.stringify(result.user)); + + return result; + } catch (error) { + console.error("Login failed:", error); + throw error; + } +} + +// ============================================ +// 4. Transaction with Passkey Assertion +// ============================================ + +/** + * Transaction flow (KMS signing): + * 1. User confirms via biometric (WebAuthn assertion) + * 2. Assertion is sent to backend with transfer params + * 3. Backend uses KMS to sign the UserOp with the passkey assertion + * 4. Signed UserOp submitted to bundler + * + * Note: The `passkeyAssertion` field uses the Legacy format + * with AuthenticatorData, ClientDataHash, and Signature. + */ +async function sendTransaction() { + try { + console.log("Preparing transaction..."); + + // Step 1: Verify transaction with Passkey (gets WebAuthn credential) + const verification = await air.passkey.verifyTransaction({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + value: "0.01", + data: "0x", + }); + + console.log("Transaction verified!"); + console.log("UserOpHash:", verification.userOpHash); + + // Step 2: Send the verified transaction to your backend + // The backend will construct and sign the UserOp via KMS + const response = await fetch("http://localhost:3000/api/v1/transfer", { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${localStorage.getItem("token")}`, + }, + body: JSON.stringify({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + amount: "0.01", + // KMS passkey assertion format (Legacy hex format for BLS dual-signing) + passkeyAssertion: { + AuthenticatorData: verification.credential.authenticatorData, + ClientDataHash: verification.credential.clientDataHash, + Signature: verification.credential.signature, + }, + usePaymaster: true, + }), + }); + + const result = await response.json(); + console.log("Transaction submitted:", result); + + return result; + } catch (error) { + console.error("Transaction failed:", error); + throw error; + } +} + +// ============================================ +// 5. BLS Signature Operations (Advanced) +// ============================================ + +async function demonstrateBLS() { + try { + // Get available BLS nodes from gossip network + const nodes = await air.bls.getAvailableNodes(); + console.log("Available BLS nodes:", nodes); + + // Generate message point for a UserOpHash + const userOpHash = "0x1234..."; + const messagePoint = await air.bls.generateMessagePoint(userOpHash); + console.log("Message Point:", messagePoint); + + // Note: Actual BLS signing is handled by the backend + // using the server SDK's BLSSignatureService + } catch (error) { + console.error("BLS operation failed:", error); + } +} + +// ============================================ +// 6. Usage in React / Next.js +// ============================================ + +/* +import { AirAccountClient } from '@aastar/airaccount'; +import { useState } from 'react'; + +// Create client instance (can be shared across components) +const air = new AirAccountClient({ + apiURL: process.env.NEXT_PUBLIC_API_URL!, + tokenProvider: () => localStorage.getItem('token'), + bls: { + seedNodes: [process.env.NEXT_PUBLIC_BLS_SEED_NODE!], + }, +}); + +function LoginPage() { + const [user, setUser] = useState(null); + const [loading, setLoading] = useState(false); + + const handleRegister = async () => { + setLoading(true); + try { + const result = await air.passkey.register({ + email: 'user@example.com', + username: 'JohnDoe', + }); + setUser(result.user); + localStorage.setItem('token', result.token); + } catch (error) { + console.error('Registration failed:', error); + } finally { + setLoading(false); + } + }; + + const handleLogin = async () => { + setLoading(true); + try { + const result = await air.passkey.authenticate(); + setUser(result.user); + localStorage.setItem('token', result.token); + } catch (error) { + console.error('Login failed:', error); + } finally { + setLoading(false); + } + }; + + return ( +
+ + + {user &&

Welcome, {user.username}!

} +
+ ); +} +*/ + +// ============================================ +// Export for module usage +// ============================================ + +export { + air, + registerWithPasskey, + loginWithPasskey, + sendTransaction, + demonstrateBLS, +}; diff --git a/api/_media/examples/index.md b/api/_media/examples/index.md new file mode 100644 index 000000000..ff0956e8b --- /dev/null +++ b/api/_media/examples/index.md @@ -0,0 +1,182 @@ +# AirAccount SDK Examples + +This directory contains example code demonstrating how to use the AirAccount SDK +(`@aastar/airaccount`) in your applications. + +## Quick Start + +### Installation + +```bash +npm install @aastar/airaccount +``` + +### Browser Client Setup + +```typescript +import { AirAccountClient } from "@aastar/airaccount"; + +// `apiURL` is the passkey RP backend; AAStar's official hosted RP will be +// `https://auth.aastar.io` (served by aNode), or point at your own. +const air = new AirAccountClient({ + apiURL: "https://auth.aastar.io", + tokenProvider: () => localStorage.getItem("token"), + bls: { + seedNodes: ["https://signer1.aastar.io"], + }, +}); +``` + +### Server Client Setup + +```typescript +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, +} from "@aastar/airaccount/server"; + +const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), +}); +``` + +## Examples + +### Browser / Frontend (`basic-usage.ts`) + +Demonstrates the browser-side SDK: + +- **KMS Passkey Registration** — WebAuthn registration backed by hardware KMS +- **KMS Passkey Login** — Biometric login with KMS key verification +- **Transaction with Passkey Assertion** — Sign & send with + `LegacyPasskeyAssertion` format +- **BLS Node Discovery** — Find available BLS validator nodes +- **React/Next.js Integration** — Component example with state management + +### Server / Backend (`server-usage.ts`) + +Demonstrates the server-side SDK: + +- **Quick Start** — Minimal setup with MemoryStorage + LocalWalletSigner +- **M4 Account Factory** — Using `createAccountWithDefaults` with guardian + support +- **KMS Signer Integration** — Hardware-backed signing with `KmsManager` and + `KmsSigner` +- **Custom ISignerAdapter** — Per-user KMS signing with `PasskeyAssertionContext` +- **Custom IStorageAdapter** — PostgreSQL adapter example +- **Account Management** — Create, query, multi-version accounts +- **Token Operations** — ERC20 info, balance, transfer calldata +- **Transfers** — ETH, ERC20, gasless (paymaster), KMS-signed, tiered (M4) +- **Paymaster Management** — Custom, Pimlico, SuperPaymaster (auto-detected) +- **BLS & Tiered Signatures** — Tier 1/2/3 signature routing for AirAccount +- **Guard Checker** — On-chain tier limits and daily allowance pre-validation +- **Multi-Version EntryPoint** — v0.6, v0.7, v0.8 side by side +- **Express.js Integration** — Full REST API example + +## Architecture + +``` +┌─────────────┐ +│ Browser │ @aastar/airaccount (AirAccountClient) +│ (SDK) │ - PasskeyManager (WebAuthn) +└──────┬───────┘ - BLSManager + │ HTTPS + ▼ +┌─────────────┐ +│ Your API │ @aastar/airaccount/server (AirAccountServerClient) +│ (Backend) │ - AccountManager +└──────┬───────┘ - TransferManager + │ - BLSSignatureService + ├─────► Bundler (Pimlico/Alchemy) + ├─────► Paymaster / SuperPaymaster + ├─────► BLS Validators (gossip network) + └─────► KMS (kms1.aastar.io) — Hardware key mgmt +``` + +## Key Concepts + +### KMS WebAuthn Flow + +1. **Registration**: Backend → KMS `BeginRegistration` → Browser WebAuthn prompt + → KMS `CompleteRegistration` → KMS creates signing key +2. **Login**: Backend → KMS `BeginAuthentication` → Browser WebAuthn prompt → + Backend verifies credential +3. **Signing**: Every signing operation requires a `LegacyPasskeyAssertion` + (AuthenticatorData + ClientDataHash + Signature in hex format) + +### Signature Routing (M4 AirAccount) + +| Tier | AlgId | Signature Components | Use Case | +| ---- | ------ | ------------------------------- | --------------------- | +| 1 | `0x02` | Raw ECDSA (65 bytes) | Small transactions | +| 2 | `0x04` | P256 + BLS aggregate | Medium transactions | +| 3 | `0x05` | P256 + BLS + Guardian ECDSA | Large transactions | +| BLS | `0x01` | Legacy BLS (prepended to pack) | Default (non-tiered) | + +### Pluggable Adapters + +The server SDK is framework-agnostic. You provide: + +- **`IStorageAdapter`** — Your database (Postgres, Mongo, in-memory, etc.) +- **`ISignerAdapter`** — Your key management (KMS, HSM, local wallet, etc.) +- **`ILogger`** — Your logging (console, Winston, Pino, etc.) + +## Running Examples + +```bash +# Install dependencies +cd sdk +npm install + +# Run the basic example (requires backend running) +npx ts-node examples/basic-usage.ts + +# Run the server example +npx ts-node examples/server-usage.ts +``` + +## Integration Checklist + +- [ ] Backend API running with `@aastar/airaccount/server` +- [ ] KMS endpoint configured (`kms1.aastar.io`) +- [ ] Bundler RPC endpoint configured (Pimlico/Alchemy) +- [ ] (Optional) BLS validator nodes configured +- [ ] (Optional) Paymaster configured for gasless transactions +- [ ] HTTPS enabled in production (required for WebAuthn/Passkey) +- [ ] CORS configured to allow your frontend domain + +## Troubleshooting + +### "Passkey not supported" + +- Ensure you're using HTTPS (localhost is OK for development) +- Check browser compatibility (Chrome 67+, Safari 13+, Edge 18+) + +### "KMS signing failed" + +- Verify `KMS_API_KEY` is set correctly +- Check KMS key status (must be "ready") +- Ensure the passkey assertion is in Legacy hex format + +### "Network request failed" + +- Verify `apiURL` / `rpcUrl` is correct +- Check CORS settings on your backend +- Ensure backend is running + +### "BLS nodes unavailable" + +- Check `blsSeedNodes` configuration +- Verify BLS validator nodes are running and accessible diff --git a/api/_media/examples/server-usage.ts b/api/_media/examples/server-usage.ts new file mode 100644 index 000000000..c57a9c186 --- /dev/null +++ b/api/_media/examples/server-usage.ts @@ -0,0 +1,739 @@ +/** + * AirAccount Server SDK - Usage Examples + * + * This example demonstrates how to integrate the AirAccount Server SDK + * into your own Node.js backend (Express, Fastify, Koa, NestJS, etc.) + * without any framework coupling. + * + * Install: npm install @aastar/airaccount + * Import: import { ... } from '@aastar/airaccount/server'; + */ + +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, + ConsoleLogger, + EntryPointVersion, + KmsManager, +} from "@aastar/airaccount/server"; + +import type { + ServerConfig, + IStorageAdapter, + ISignerAdapter, + AccountRecord, + TransferRecord, + PaymasterRecord, + BlsConfigRecord, + TokenInfo, + PasskeyAssertionContext, + LegacyPasskeyAssertion, +} from "@aastar/airaccount/server"; + +// ============================================ +// 1. Basic Setup — Quick Start +// ============================================ + +async function quickStart() { + // Minimum viable setup: MemoryStorage + LocalWalletSigner + // Good for development, testing, and prototyping. + const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v06: { + entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", + factoryAddress: "0xYOUR_FACTORY_ADDRESS", + validatorAddress: "0xYOUR_VALIDATOR_ADDRESS", + }, + }, + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), + }); + + // Create a smart account for a user + const account = await client.accounts.createAccount("user-123"); + console.log("Smart account address:", account.address); + + // Execute a transfer + const result = await client.transfers.executeTransfer("user-123", { + to: "0xRecipientAddress", + amount: "0.01", + }); + console.log("Transfer ID:", result.transferId); + console.log("UserOp Hash:", result.userOpHash); + + // Poll transfer status + const status = await client.transfers.getTransferStatus( + "user-123", + result.transferId + ); + console.log("Status:", status.statusDescription); +} + +// ============================================ +// 2. M4 Account Factory Setup +// ============================================ + +/** + * M4 accounts use a different factory with built-in guardian support + * and daily spending limits. No separate validator contract needed. + */ +async function m4Setup() { + const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + // M4 factory — uses createAccountWithDefaults/getAddressWithDefaults + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + // No validatorAddress → M4 ECDSA path (raw 65-byte signature) + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xPRIVATE_KEY"), + }); + + // M4 factory predicts address with: owner, salt, guardian1, guardian2, dailyLimit + const account = await client.accounts.createAccount("user-m4"); + console.log("M4 account:", account.address); + + return client; +} + +// ============================================ +// 3. KMS Signer Integration +// ============================================ + +/** + * KMS (kms1.aastar.io) provides hardware-backed key management + * with WebAuthn passkey authentication for every signing operation. + * + * The KmsSigner requires a passkey assertion for each sign call, + * passed via the assertionProvider callback. + */ +async function kmsSetup() { + const kmsManager = new KmsManager({ + kmsEndpoint: "https://kms1.aastar.io", + kmsApiKey: process.env.KMS_API_KEY, + kmsEnabled: true, + }); + + // Create a KMS-backed signer + // assertionProvider returns a LegacyPasskeyAssertion for each signing operation + const kmsSigner = kmsManager.createKmsSigner( + "key-id-from-kms", // KMS key ID + "0xDerivedAddress", // Address from KMS + async () => { + // In production, this comes from the request context + // (the user's WebAuthn assertion passed through the API) + return { + AuthenticatorData: "0x...", + ClientDataHash: "0x...", + Signature: "0x...", + } satisfies LegacyPasskeyAssertion; + } + ); + + // KmsSigner is a standalone signer (getAddress + signMessage); no ethers dependency. + const address = await kmsSigner.getAddress(); + console.log("KMS signer address:", address); + + // KMS key lifecycle + const keyStatus = await kmsManager.getKeyStatus("key-id"); + console.log("Key status:", keyStatus.Status); // "creating" | "deriving" | "ready" | "error" + + // Wait for key to be ready after creation + // const readyKey = await kmsManager.pollUntilReady("key-id", 30000); +} + +// ============================================ +// 4. Custom ISignerAdapter with KMS +// ============================================ + +/** + * Implement ISignerAdapter for KMS-backed per-user signing. + * The signMessage() method accepts an optional PasskeyAssertionContext, + * which carries the user's WebAuthn assertion through the signing chain. + */ +class KmsSignerAdapter implements ISignerAdapter { + private kmsManager: KmsManager; + + constructor( + private userKeyMapping: Map, + kmsEndpoint: string, + kmsApiKey: string + ) { + this.kmsManager = new KmsManager({ + kmsEndpoint, + kmsApiKey, + kmsEnabled: true, + }); + } + + async getAddress(userId: string): Promise<`0x${string}`> { + const keyInfo = this.userKeyMapping.get(userId); + if (!keyInfo) throw new Error(`No KMS key for user ${userId}`); + return keyInfo.address as `0x${string}`; + } + + async signMessage( + userId: string, + message: `0x${string}` | Uint8Array, + ctx?: PasskeyAssertionContext + ): Promise<`0x${string}`> { + const keyInfo = this.userKeyMapping.get(userId); + if (!keyInfo) throw new Error(`No KMS key for user ${userId}`); + + const signer = this.kmsManager.createKmsSigner( + keyInfo.keyId, + keyInfo.address, + async () => { + if (!ctx?.assertion) { + throw new Error("Passkey assertion required for KMS signing"); + } + return ctx.assertion; + } + ); + return (await signer.signMessage(message)) as `0x${string}`; + } + + async ensureSigner(userId: string): Promise<{ address: `0x${string}` }> { + const address = await this.getAddress(userId); + return { address }; + } +} + +// ============================================ +// 5. Custom IStorageAdapter (PostgreSQL) +// ============================================ + +/** + * In production you'll want a real database. + * Implement IStorageAdapter for your stack (PostgreSQL, MongoDB, etc.) + */ +class PostgresStorage implements IStorageAdapter { + constructor(private pool: any /* pg.Pool */) {} + + async getAccounts(): Promise { + const { rows } = await this.pool.query("SELECT * FROM accounts"); + return rows; + } + + async saveAccount(account: AccountRecord): Promise { + await this.pool.query( + `INSERT INTO accounts (user_id, address, signer_address, salt, deployed, + deployment_tx_hash, validator_address, entry_point_version, factory_address, created_at) + VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) + ON CONFLICT (user_id, entry_point_version) DO NOTHING`, + [ + account.userId, + account.address, + account.signerAddress, + account.salt, + account.deployed, + account.deploymentTxHash, + account.validatorAddress, + account.entryPointVersion, + account.factoryAddress, + account.createdAt, + ] + ); + } + + async findAccountByUserId(userId: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM accounts WHERE user_id = $1 LIMIT 1", + [userId] + ); + return rows[0] ?? null; + } + + async updateAccount( + userId: string, + updates: Partial + ): Promise { + const setClauses: string[] = []; + const values: unknown[] = []; + let idx = 1; + for (const [key, value] of Object.entries(updates)) { + setClauses.push(`${camelToSnake(key)} = $${idx++}`); + values.push(value); + } + values.push(userId); + await this.pool.query( + `UPDATE accounts SET ${setClauses.join(", ")} WHERE user_id = $${idx}`, + values + ); + } + + async saveTransfer(transfer: TransferRecord): Promise { + void transfer; // ... INSERT INTO transfers + } + async findTransfersByUserId(userId: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM transfers WHERE user_id = $1", + [userId] + ); + return rows; + } + async findTransferById(id: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM transfers WHERE id = $1", + [id] + ); + return rows[0] ?? null; + } + async updateTransfer( + id: string, + updates: Partial + ): Promise { + void id; + void updates; + } + + async getPaymasters(userId: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM paymasters WHERE user_id = $1", + [userId] + ); + return rows; + } + async savePaymaster( + userId: string, + paymaster: PaymasterRecord + ): Promise { + void userId; + void paymaster; + } + async removePaymaster(userId: string, name: string): Promise { + const { rowCount } = await this.pool.query( + "DELETE FROM paymasters WHERE user_id = $1 AND name = $2", + [userId, name] + ); + return rowCount > 0; + } + + async getBlsConfig(): Promise { + return null; + } + async updateSignerNodesCache(nodes: unknown[]): Promise { + void nodes; + } +} + +function camelToSnake(str: string): string { + return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`); +} + +// ============================================ +// 6. Account Management +// ============================================ + +async function accountManagement(client: AirAccountServerClient) { + // Create account (idempotent — returns existing if already created) + const account = await client.accounts.createAccount("user-abc"); + console.log("Account:", account.address); + console.log("Deployed:", account.deployed); + console.log("EntryPoint version:", account.entryPointVersion); + + // Create account with specific version + const v6Account = await client.accounts.createAccount("user-v6", { + entryPointVersion: EntryPointVersion.V0_6, + }); + console.log("v0.6 account:", v6Account.address); + + // Get existing account with balance and nonce + const existing = await client.accounts.getAccount("user-abc"); + if (existing) { + console.log("Found:", existing.address); + console.log("Balance:", existing.balance, "ETH"); + console.log("Nonce:", existing.nonce); + } + + // Get wallet (EOA/KMS) address for a user + const walletAddress = await client.wallets.getAddress("user-abc"); + console.log("Wallet (EOA/KMS) address:", walletAddress); +} + +// ============================================ +// 7. Token Operations +// ============================================ + +async function tokenOperations(client: AirAccountServerClient) { + const USDC = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; + + // Query token info from chain + const info: TokenInfo = await client.tokens.getTokenInfo(USDC); + console.log(`${info.symbol} (${info.name}) — ${info.decimals} decimals`); + + // Check token balance + const balance = await client.tokens.getTokenBalance( + USDC, + "0xYourSmartAccount" + ); + console.log("USDC balance (raw):", balance); + + // Formatted balance + const formatted = await client.tokens.getFormattedTokenBalance( + USDC, + "0xYourSmartAccount" + ); + console.log(`Balance: ${formatted.formattedBalance} ${formatted.token.symbol}`); + + // Validate a token address + const valid = await client.tokens.validateToken(USDC); + console.log("Is valid ERC20:", valid); + + // Generate ERC20 transfer calldata + const calldata = client.tokens.generateTransferCalldata( + "0xRecipient", + "100.5", + 6 // USDC decimals + ); + console.log("Transfer calldata:", calldata); +} + +// ============================================ +// 8. Transfers (ETH & ERC20) +// ============================================ + +async function transfers(client: AirAccountServerClient) { + const userId = "user-abc"; + + // --- ETH transfer --- + const ethTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + }); + console.log("ETH Transfer:", ethTransfer.transferId); + + // --- ERC20 token transfer --- + const tokenTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "50", + tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + }); + console.log("Token Transfer:", tokenTransfer.transferId); + + // --- Gasless transfer with paymaster --- + const gaslessTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + usePaymaster: true, + paymasterAddress: "0xYourPaymasterAddress", + }); + console.log("Gasless Transfer:", gaslessTransfer.transferId); + + // --- Transfer with KMS passkey assertion --- + const kmsTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + passkeyAssertion: { + AuthenticatorData: "0x...", + ClientDataHash: "0x...", + Signature: "0x...", + }, + }); + console.log("KMS Transfer:", kmsTransfer.transferId); + + // --- AirAccount tiered transfer (M4) --- + const tieredTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + useAirAccountTiering: true, // Enable tier-based signature routing + p256Signature: "0x...", // Required for Tier 2/3 + // guardianSigner: guardianEthSigner, // Required for Tier 3 only + }); + console.log("Tiered Transfer:", tieredTransfer.transferId); + + // --- Check transfer status --- + const status = await client.transfers.getTransferStatus( + userId, + ethTransfer.transferId + ); + console.log("Status:", status.statusDescription); + // Possible statuses: + // pending → "Preparing transaction and generating signatures" + // submitted → "Transaction submitted to bundler, waiting for confirmation" + // completed → "Transaction confirmed on chain" + // failed → "Transaction failed" + + if (status.explorerUrl) { + console.log("Explorer:", status.explorerUrl); + } + + // --- Transfer history with pagination --- + const history = await client.transfers.getTransferHistory(userId, 1, 10); + console.log( + `Page 1: ${history.transfers.length} of ${history.total} transfers` + ); + + for (const tx of history.transfers) { + console.log( + ` ${tx.id}: ${tx.amount} ${tx.tokenSymbol ?? "ETH"} → ${tx.to} [${tx.status}]` + ); + } + + // --- Gas estimation --- + const gasEstimate = await client.transfers.estimateGas(userId, { + to: "0xRecipientAddress", + amount: "0.01", + }); + console.log("Gas estimate:", gasEstimate); +} + +// ============================================ +// 9. Paymaster Management (SuperPaymaster) +// ============================================ + +async function paymasterManagement(client: AirAccountServerClient) { + const userId = "user-abc"; + + // Add a custom paymaster + await client.paymaster.addCustomPaymaster( + userId, + "my-paymaster", + "0xPaymasterContractAddress", + "custom" + ); + + // Add a Pimlico paymaster (with API key for sponsored transactions) + await client.paymaster.addCustomPaymaster( + userId, + "pimlico-pm", + "0xPimlicoPaymasterAddress", + "pimlico", + "pm_api_key_xxx" + ); + + // List available paymasters + const paymasters = await client.paymaster.getAvailablePaymasters(userId); + for (const pm of paymasters) { + console.log(` ${pm.name}: ${pm.address} (configured: ${pm.configured})`); + } + + // Remove a paymaster + const removed = await client.paymaster.removeCustomPaymaster( + userId, + "my-paymaster" + ); + console.log("Removed:", removed); + + // Note: SuperPaymaster (v0.7/v0.8) is auto-detected on M4 deployments + // and returns packed paymaster data format automatically +} + +// ============================================ +// 10. BLS Signatures & Tiered Signing +// ============================================ + +async function blsSignatures(client: AirAccountServerClient) { + // BLS signatures require seed nodes for the gossip network. + // Configure them in the ServerConfig. + + // Generate BLS signature for a UserOp hash + const userOpHash = + "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"; + const blsData = await client.bls.generateBLSSignature( + "user-abc", + userOpHash + ); + console.log("BLS signature data:", blsData); + + // Pack signature for on-chain verification + const packed = await client.bls.packSignature(blsData); + console.log("Packed signature:", packed); + + // Generate tiered signature (AirAccount M4) + // Tier 1: raw ECDSA (algId 0x02) + // Tier 2: P256 + BLS aggregate (algId 0x04) + // Tier 3: P256 + BLS + Guardian ECDSA (algId 0x05) + const tieredSig = await client.bls.generateTieredSignature({ + tier: 2, + userId: "user-abc", + userOpHash, + p256Signature: "0x...", // 64-byte P256 signature + }); + console.log("Tiered (T2) signature:", tieredSig); +} + +// ============================================ +// 11. Guard Checker (On-Chain Pre-Validation) +// ============================================ + +/** + * GuardChecker reads tier limits and guard status from the AirAccount contract + * to determine which signature tier is required for a transaction. + */ +async function guardCheckerExample(client: AirAccountServerClient) { + const accountAddress = "0xYourSmartAccount"; + + // Fetch tier configuration from contract + // const tierConfig = await guardChecker.fetchTierConfig(accountAddress); + // console.log("Tier 1 limit:", tierConfig.tier1Limit); + // console.log("Tier 2 limit:", tierConfig.tier2Limit); + + // Fetch guard status + // const guardStatus = await guardChecker.fetchGuardStatus(accountAddress); + // console.log("Has guard:", guardStatus.hasGuard); + // console.log("Daily remaining:", guardStatus.dailyRemaining); + + // Pre-check a transaction (determines required tier + algId) + // const preCheck = await guardChecker.preCheck(accountAddress, parseEther("0.5")); + // console.log("OK:", preCheck.ok); + // console.log("Required tier:", preCheck.tier); + // console.log("AlgId:", preCheck.algId); + + console.log( + "GuardChecker is used internally by TransferManager for AirAccount tiering" + ); + void accountAddress; +} + +// ============================================ +// 12. Multi-Version EntryPoint Support +// ============================================ + +async function multiVersion() { + const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v06: { + entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", + factoryAddress: "0xFACTORY_V6", + validatorAddress: "0xVALIDATOR_V6", + }, + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0xFACTORY_V7", + validatorAddress: "0xVALIDATOR_V7", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xPRIVATE_KEY"), + }); + + // Create account with specific version + const v6Account = await client.accounts.createAccount("user-1", { + entryPointVersion: EntryPointVersion.V0_6, + }); + console.log("v0.6 account:", v6Account.address); + + // Default version (v0.7 in this config) + const defaultAccount = await client.accounts.createAccount("user-2"); + console.log("Default (v0.7) account:", defaultAccount.address); + + // Check configured default + console.log("Default version:", client.ethereum.getDefaultVersion()); +} + +// ============================================ +// 13. Express.js Integration Example +// ============================================ + +/* +import express from 'express'; +import { AirAccountServerClient, MemoryStorage, LocalWalletSigner } from '@aastar/airaccount/server'; + +const app = express(); +app.use(express.json()); + +const client = new AirAccountServerClient({ + rpcUrl: process.env.RPC_URL!, + bundlerRpcUrl: process.env.BUNDLER_RPC_URL!, + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', + factoryAddress: process.env.FACTORY_ADDRESS!, + // No validatorAddress → M4 ECDSA path + }, + }, + defaultVersion: '0.7', + kmsEndpoint: process.env.KMS_ENDPOINT, + kmsApiKey: process.env.KMS_API_KEY, + kmsEnabled: true, + storage: new MemoryStorage(), // Replace with your DB adapter + signer: new LocalWalletSigner(process.env.PRIVATE_KEY!), +}); + +// Create account +app.post('/api/accounts', async (req, res) => { + try { + const { userId } = req.body; + const account = await client.accounts.createAccount(userId); + res.json(account); + } catch (err: any) { + res.status(400).json({ error: err.message }); + } +}); + +// Execute transfer (with passkey assertion from frontend) +app.post('/api/transfers', async (req, res) => { + try { + const { userId, to, amount, tokenAddress, usePaymaster, passkeyAssertion } = req.body; + const result = await client.transfers.executeTransfer(userId, { + to, + amount, + tokenAddress, + usePaymaster, + passkeyAssertion, // LegacyPasskeyAssertion from KMS + }); + res.json(result); + } catch (err: any) { + res.status(400).json({ error: err.message }); + } +}); + +// Get transfer status +app.get('/api/transfers/:userId/:transferId', async (req, res) => { + try { + const { userId, transferId } = req.params; + const status = await client.transfers.getTransferStatus(userId, transferId); + res.json(status); + } catch (err: any) { + res.status(404).json({ error: err.message }); + } +}); + +// Transfer history +app.get('/api/transfers/:userId', async (req, res) => { + try { + const { userId } = req.params; + const page = Number(req.query.page) || 1; + const limit = Number(req.query.limit) || 10; + const history = await client.transfers.getTransferHistory(userId, page, limit); + res.json(history); + } catch (err: any) { + res.status(400).json({ error: err.message }); + } +}); + +app.listen(3000, () => console.log('Server running on :3000')); +*/ + +// ============================================ +// Export for reference +// ============================================ + +export { + quickStart, + m4Setup, + kmsSetup, + accountManagement, + tokenOperations, + transfers, + paymasterManagement, + blsSignatures, + guardCheckerExample, + multiVersion, +}; diff --git a/api/_media/index.md b/api/_media/index.md new file mode 100644 index 000000000..ff0956e8b --- /dev/null +++ b/api/_media/index.md @@ -0,0 +1,182 @@ +# AirAccount SDK Examples + +This directory contains example code demonstrating how to use the AirAccount SDK +(`@aastar/airaccount`) in your applications. + +## Quick Start + +### Installation + +```bash +npm install @aastar/airaccount +``` + +### Browser Client Setup + +```typescript +import { AirAccountClient } from "@aastar/airaccount"; + +// `apiURL` is the passkey RP backend; AAStar's official hosted RP will be +// `https://auth.aastar.io` (served by aNode), or point at your own. +const air = new AirAccountClient({ + apiURL: "https://auth.aastar.io", + tokenProvider: () => localStorage.getItem("token"), + bls: { + seedNodes: ["https://signer1.aastar.io"], + }, +}); +``` + +### Server Client Setup + +```typescript +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, +} from "@aastar/airaccount/server"; + +const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), +}); +``` + +## Examples + +### Browser / Frontend (`basic-usage.ts`) + +Demonstrates the browser-side SDK: + +- **KMS Passkey Registration** — WebAuthn registration backed by hardware KMS +- **KMS Passkey Login** — Biometric login with KMS key verification +- **Transaction with Passkey Assertion** — Sign & send with + `LegacyPasskeyAssertion` format +- **BLS Node Discovery** — Find available BLS validator nodes +- **React/Next.js Integration** — Component example with state management + +### Server / Backend (`server-usage.ts`) + +Demonstrates the server-side SDK: + +- **Quick Start** — Minimal setup with MemoryStorage + LocalWalletSigner +- **M4 Account Factory** — Using `createAccountWithDefaults` with guardian + support +- **KMS Signer Integration** — Hardware-backed signing with `KmsManager` and + `KmsSigner` +- **Custom ISignerAdapter** — Per-user KMS signing with `PasskeyAssertionContext` +- **Custom IStorageAdapter** — PostgreSQL adapter example +- **Account Management** — Create, query, multi-version accounts +- **Token Operations** — ERC20 info, balance, transfer calldata +- **Transfers** — ETH, ERC20, gasless (paymaster), KMS-signed, tiered (M4) +- **Paymaster Management** — Custom, Pimlico, SuperPaymaster (auto-detected) +- **BLS & Tiered Signatures** — Tier 1/2/3 signature routing for AirAccount +- **Guard Checker** — On-chain tier limits and daily allowance pre-validation +- **Multi-Version EntryPoint** — v0.6, v0.7, v0.8 side by side +- **Express.js Integration** — Full REST API example + +## Architecture + +``` +┌─────────────┐ +│ Browser │ @aastar/airaccount (AirAccountClient) +│ (SDK) │ - PasskeyManager (WebAuthn) +└──────┬───────┘ - BLSManager + │ HTTPS + ▼ +┌─────────────┐ +│ Your API │ @aastar/airaccount/server (AirAccountServerClient) +│ (Backend) │ - AccountManager +└──────┬───────┘ - TransferManager + │ - BLSSignatureService + ├─────► Bundler (Pimlico/Alchemy) + ├─────► Paymaster / SuperPaymaster + ├─────► BLS Validators (gossip network) + └─────► KMS (kms1.aastar.io) — Hardware key mgmt +``` + +## Key Concepts + +### KMS WebAuthn Flow + +1. **Registration**: Backend → KMS `BeginRegistration` → Browser WebAuthn prompt + → KMS `CompleteRegistration` → KMS creates signing key +2. **Login**: Backend → KMS `BeginAuthentication` → Browser WebAuthn prompt → + Backend verifies credential +3. **Signing**: Every signing operation requires a `LegacyPasskeyAssertion` + (AuthenticatorData + ClientDataHash + Signature in hex format) + +### Signature Routing (M4 AirAccount) + +| Tier | AlgId | Signature Components | Use Case | +| ---- | ------ | ------------------------------- | --------------------- | +| 1 | `0x02` | Raw ECDSA (65 bytes) | Small transactions | +| 2 | `0x04` | P256 + BLS aggregate | Medium transactions | +| 3 | `0x05` | P256 + BLS + Guardian ECDSA | Large transactions | +| BLS | `0x01` | Legacy BLS (prepended to pack) | Default (non-tiered) | + +### Pluggable Adapters + +The server SDK is framework-agnostic. You provide: + +- **`IStorageAdapter`** — Your database (Postgres, Mongo, in-memory, etc.) +- **`ISignerAdapter`** — Your key management (KMS, HSM, local wallet, etc.) +- **`ILogger`** — Your logging (console, Winston, Pino, etc.) + +## Running Examples + +```bash +# Install dependencies +cd sdk +npm install + +# Run the basic example (requires backend running) +npx ts-node examples/basic-usage.ts + +# Run the server example +npx ts-node examples/server-usage.ts +``` + +## Integration Checklist + +- [ ] Backend API running with `@aastar/airaccount/server` +- [ ] KMS endpoint configured (`kms1.aastar.io`) +- [ ] Bundler RPC endpoint configured (Pimlico/Alchemy) +- [ ] (Optional) BLS validator nodes configured +- [ ] (Optional) Paymaster configured for gasless transactions +- [ ] HTTPS enabled in production (required for WebAuthn/Passkey) +- [ ] CORS configured to allow your frontend domain + +## Troubleshooting + +### "Passkey not supported" + +- Ensure you're using HTTPS (localhost is OK for development) +- Check browser compatibility (Chrome 67+, Safari 13+, Edge 18+) + +### "KMS signing failed" + +- Verify `KMS_API_KEY` is set correctly +- Check KMS key status (must be "ready") +- Ensure the passkey assertion is in Legacy hex format + +### "Network request failed" + +- Verify `apiURL` / `rpcUrl` is correct +- Check CORS settings on your backend +- Ensure backend is running + +### "BLS nodes unavailable" + +- Check `blsSeedNodes` configuration +- Verify BLS validator nodes are running and accessible diff --git a/api/_media/keeper.md b/api/_media/keeper.md new file mode 100644 index 000000000..59dc5c679 --- /dev/null +++ b/api/_media/keeper.md @@ -0,0 +1,107 @@ +# Price Keeper (SuperPaymaster + Paymaster) + +This keeper is a long-running offchain agent that keeps `cachedPrice` fresh by calling `updatePrice()` only when needed. + +## What It Does + +- Reads `cachedPrice.updatedAt` and `priceStalenessThreshold()` from SuperPaymaster and the official Paymaster +- Reads `updatedAt` from the Chainlink ETH/USD feed +- Sends `updatePrice()` when the cached price is close to expiring and Chainlink has fresher data (handled independently per contract) +- Sends Telegram alerts on errors and an hourly heartbeat (optional) + +## Update Policy (Gas-Saving) + +The keeper submits `updatePrice()` only when all of the following are true: + +- `cachedPrice.updatedAt == 0` (bootstrap case), or +- Current time is within `safetyMarginSec` before `cachedPrice.updatedAt + priceStalenessThreshold` +- Chainlink has newer data than the cached price +- Chainlink data is not older than `priceStalenessThreshold` + +Additionally: + +- Enforces `maxUpdatesPerDay` to avoid abuse +- Optionally skips updates when base fee is above `maxBaseFeeGwei` (unless very close to expiry) + +## Addresses Source (No ENV Needed) + +By default, contract addresses are loaded from `@aastar/core` canonical constants (per chainId). + +Paymaster selection: + +- If the canonical constants include an official Paymaster instance address, the keeper uses it +- Otherwise it derives the official Paymaster address from `PaymasterFactory.paymasterByOperator(OFFICIAL_OPERATOR)` +- You can override with `--paymaster
` + +## How To Run + +From the monorepo root: + +```bash +pnpm keeper:op-sepolia +pnpm keeper:op-mainnet +``` + +One-shot mode: + +```bash +pnpm keeper:op-mainnet -- --once +``` + +Cast (keystore) mode: + +```bash +pnpm keeper:op-mainnet -- --mode cast --keystore /path/to/keystore.json +``` + +Cast (named account) mode: + +```bash +pnpm keeper:op-mainnet -- --mode cast --cast-account optimism-deployer +``` + +If `--cast-account` is omitted, the keeper uses `DEPLOYER_ACCOUNT` from `.env.` by default. + +In cast mode (non-dry-run), the keeper will prompt once for the keystore password at startup and reuse it for subsequent updates. For unattended runs, set `CAST_KEYSTORE_PASSWORD` in `.env.` so no interactive prompt is needed. + +Private-key mode: + +```bash +pnpm keeper:op-mainnet -- --mode privateKey +``` + +## Required ENV + +The keeper loads `.env.` from the current working directory. + +- `RPC_URL` +- `TEST_PRIVATE_KEY` (required by shared network loader) + +Optional: + +- `KEEPER_PRIVATE_KEY` (privateKey mode) +- `PRIVATE_KEY_SUPPLIER` (fallback for privateKey mode) +- `CAST_KEYSTORE_PASSWORD` (cast mode; otherwise it prompts) +- `DEPLOYER_ACCOUNT` (cast mode default account name for `--cast-account`) +- `OFFICIAL_OPERATOR` (used to derive official Paymaster from the factory when no canonical instance exists) +- `TELEGRAM_BOT_TOKEN` +- `TELEGRAM_CHAT_ID` (must be numeric like `123...`/`-100...` or start with `@`) + +## CLI Flags + +- `--network op-sepolia|op-mainnet|sepolia|mainnet|anvil` +- `--mode cast|privateKey` +- `--keystore ` (cast mode) +- `--cast-account ` (cast mode, uses Foundry keystore account name) +- `--superpaymaster
` (override) +- `--paymaster
` (override) +- `--paymaster-operator
` (override OFFICIAL_OPERATOR) +- `--disable-superpaymaster` / `--no-superpaymaster` +- `--disable-paymaster` / `--no-paymaster` +- `--poll-interval ` (default: 30) +- `--safety-margin ` (default: 600) +- `--max-updates-per-day ` (default: 24) +- `--max-base-fee-gwei ` (optional) +- `--dry-run` +- `--once` +- `--logo` / `--no-logo` diff --git a/api/_media/server-usage.ts b/api/_media/server-usage.ts new file mode 100644 index 000000000..c57a9c186 --- /dev/null +++ b/api/_media/server-usage.ts @@ -0,0 +1,739 @@ +/** + * AirAccount Server SDK - Usage Examples + * + * This example demonstrates how to integrate the AirAccount Server SDK + * into your own Node.js backend (Express, Fastify, Koa, NestJS, etc.) + * without any framework coupling. + * + * Install: npm install @aastar/airaccount + * Import: import { ... } from '@aastar/airaccount/server'; + */ + +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, + ConsoleLogger, + EntryPointVersion, + KmsManager, +} from "@aastar/airaccount/server"; + +import type { + ServerConfig, + IStorageAdapter, + ISignerAdapter, + AccountRecord, + TransferRecord, + PaymasterRecord, + BlsConfigRecord, + TokenInfo, + PasskeyAssertionContext, + LegacyPasskeyAssertion, +} from "@aastar/airaccount/server"; + +// ============================================ +// 1. Basic Setup — Quick Start +// ============================================ + +async function quickStart() { + // Minimum viable setup: MemoryStorage + LocalWalletSigner + // Good for development, testing, and prototyping. + const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v06: { + entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", + factoryAddress: "0xYOUR_FACTORY_ADDRESS", + validatorAddress: "0xYOUR_VALIDATOR_ADDRESS", + }, + }, + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), + }); + + // Create a smart account for a user + const account = await client.accounts.createAccount("user-123"); + console.log("Smart account address:", account.address); + + // Execute a transfer + const result = await client.transfers.executeTransfer("user-123", { + to: "0xRecipientAddress", + amount: "0.01", + }); + console.log("Transfer ID:", result.transferId); + console.log("UserOp Hash:", result.userOpHash); + + // Poll transfer status + const status = await client.transfers.getTransferStatus( + "user-123", + result.transferId + ); + console.log("Status:", status.statusDescription); +} + +// ============================================ +// 2. M4 Account Factory Setup +// ============================================ + +/** + * M4 accounts use a different factory with built-in guardian support + * and daily spending limits. No separate validator contract needed. + */ +async function m4Setup() { + const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + // M4 factory — uses createAccountWithDefaults/getAddressWithDefaults + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + // No validatorAddress → M4 ECDSA path (raw 65-byte signature) + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xPRIVATE_KEY"), + }); + + // M4 factory predicts address with: owner, salt, guardian1, guardian2, dailyLimit + const account = await client.accounts.createAccount("user-m4"); + console.log("M4 account:", account.address); + + return client; +} + +// ============================================ +// 3. KMS Signer Integration +// ============================================ + +/** + * KMS (kms1.aastar.io) provides hardware-backed key management + * with WebAuthn passkey authentication for every signing operation. + * + * The KmsSigner requires a passkey assertion for each sign call, + * passed via the assertionProvider callback. + */ +async function kmsSetup() { + const kmsManager = new KmsManager({ + kmsEndpoint: "https://kms1.aastar.io", + kmsApiKey: process.env.KMS_API_KEY, + kmsEnabled: true, + }); + + // Create a KMS-backed signer + // assertionProvider returns a LegacyPasskeyAssertion for each signing operation + const kmsSigner = kmsManager.createKmsSigner( + "key-id-from-kms", // KMS key ID + "0xDerivedAddress", // Address from KMS + async () => { + // In production, this comes from the request context + // (the user's WebAuthn assertion passed through the API) + return { + AuthenticatorData: "0x...", + ClientDataHash: "0x...", + Signature: "0x...", + } satisfies LegacyPasskeyAssertion; + } + ); + + // KmsSigner is a standalone signer (getAddress + signMessage); no ethers dependency. + const address = await kmsSigner.getAddress(); + console.log("KMS signer address:", address); + + // KMS key lifecycle + const keyStatus = await kmsManager.getKeyStatus("key-id"); + console.log("Key status:", keyStatus.Status); // "creating" | "deriving" | "ready" | "error" + + // Wait for key to be ready after creation + // const readyKey = await kmsManager.pollUntilReady("key-id", 30000); +} + +// ============================================ +// 4. Custom ISignerAdapter with KMS +// ============================================ + +/** + * Implement ISignerAdapter for KMS-backed per-user signing. + * The signMessage() method accepts an optional PasskeyAssertionContext, + * which carries the user's WebAuthn assertion through the signing chain. + */ +class KmsSignerAdapter implements ISignerAdapter { + private kmsManager: KmsManager; + + constructor( + private userKeyMapping: Map, + kmsEndpoint: string, + kmsApiKey: string + ) { + this.kmsManager = new KmsManager({ + kmsEndpoint, + kmsApiKey, + kmsEnabled: true, + }); + } + + async getAddress(userId: string): Promise<`0x${string}`> { + const keyInfo = this.userKeyMapping.get(userId); + if (!keyInfo) throw new Error(`No KMS key for user ${userId}`); + return keyInfo.address as `0x${string}`; + } + + async signMessage( + userId: string, + message: `0x${string}` | Uint8Array, + ctx?: PasskeyAssertionContext + ): Promise<`0x${string}`> { + const keyInfo = this.userKeyMapping.get(userId); + if (!keyInfo) throw new Error(`No KMS key for user ${userId}`); + + const signer = this.kmsManager.createKmsSigner( + keyInfo.keyId, + keyInfo.address, + async () => { + if (!ctx?.assertion) { + throw new Error("Passkey assertion required for KMS signing"); + } + return ctx.assertion; + } + ); + return (await signer.signMessage(message)) as `0x${string}`; + } + + async ensureSigner(userId: string): Promise<{ address: `0x${string}` }> { + const address = await this.getAddress(userId); + return { address }; + } +} + +// ============================================ +// 5. Custom IStorageAdapter (PostgreSQL) +// ============================================ + +/** + * In production you'll want a real database. + * Implement IStorageAdapter for your stack (PostgreSQL, MongoDB, etc.) + */ +class PostgresStorage implements IStorageAdapter { + constructor(private pool: any /* pg.Pool */) {} + + async getAccounts(): Promise { + const { rows } = await this.pool.query("SELECT * FROM accounts"); + return rows; + } + + async saveAccount(account: AccountRecord): Promise { + await this.pool.query( + `INSERT INTO accounts (user_id, address, signer_address, salt, deployed, + deployment_tx_hash, validator_address, entry_point_version, factory_address, created_at) + VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) + ON CONFLICT (user_id, entry_point_version) DO NOTHING`, + [ + account.userId, + account.address, + account.signerAddress, + account.salt, + account.deployed, + account.deploymentTxHash, + account.validatorAddress, + account.entryPointVersion, + account.factoryAddress, + account.createdAt, + ] + ); + } + + async findAccountByUserId(userId: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM accounts WHERE user_id = $1 LIMIT 1", + [userId] + ); + return rows[0] ?? null; + } + + async updateAccount( + userId: string, + updates: Partial + ): Promise { + const setClauses: string[] = []; + const values: unknown[] = []; + let idx = 1; + for (const [key, value] of Object.entries(updates)) { + setClauses.push(`${camelToSnake(key)} = $${idx++}`); + values.push(value); + } + values.push(userId); + await this.pool.query( + `UPDATE accounts SET ${setClauses.join(", ")} WHERE user_id = $${idx}`, + values + ); + } + + async saveTransfer(transfer: TransferRecord): Promise { + void transfer; // ... INSERT INTO transfers + } + async findTransfersByUserId(userId: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM transfers WHERE user_id = $1", + [userId] + ); + return rows; + } + async findTransferById(id: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM transfers WHERE id = $1", + [id] + ); + return rows[0] ?? null; + } + async updateTransfer( + id: string, + updates: Partial + ): Promise { + void id; + void updates; + } + + async getPaymasters(userId: string): Promise { + const { rows } = await this.pool.query( + "SELECT * FROM paymasters WHERE user_id = $1", + [userId] + ); + return rows; + } + async savePaymaster( + userId: string, + paymaster: PaymasterRecord + ): Promise { + void userId; + void paymaster; + } + async removePaymaster(userId: string, name: string): Promise { + const { rowCount } = await this.pool.query( + "DELETE FROM paymasters WHERE user_id = $1 AND name = $2", + [userId, name] + ); + return rowCount > 0; + } + + async getBlsConfig(): Promise { + return null; + } + async updateSignerNodesCache(nodes: unknown[]): Promise { + void nodes; + } +} + +function camelToSnake(str: string): string { + return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`); +} + +// ============================================ +// 6. Account Management +// ============================================ + +async function accountManagement(client: AirAccountServerClient) { + // Create account (idempotent — returns existing if already created) + const account = await client.accounts.createAccount("user-abc"); + console.log("Account:", account.address); + console.log("Deployed:", account.deployed); + console.log("EntryPoint version:", account.entryPointVersion); + + // Create account with specific version + const v6Account = await client.accounts.createAccount("user-v6", { + entryPointVersion: EntryPointVersion.V0_6, + }); + console.log("v0.6 account:", v6Account.address); + + // Get existing account with balance and nonce + const existing = await client.accounts.getAccount("user-abc"); + if (existing) { + console.log("Found:", existing.address); + console.log("Balance:", existing.balance, "ETH"); + console.log("Nonce:", existing.nonce); + } + + // Get wallet (EOA/KMS) address for a user + const walletAddress = await client.wallets.getAddress("user-abc"); + console.log("Wallet (EOA/KMS) address:", walletAddress); +} + +// ============================================ +// 7. Token Operations +// ============================================ + +async function tokenOperations(client: AirAccountServerClient) { + const USDC = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; + + // Query token info from chain + const info: TokenInfo = await client.tokens.getTokenInfo(USDC); + console.log(`${info.symbol} (${info.name}) — ${info.decimals} decimals`); + + // Check token balance + const balance = await client.tokens.getTokenBalance( + USDC, + "0xYourSmartAccount" + ); + console.log("USDC balance (raw):", balance); + + // Formatted balance + const formatted = await client.tokens.getFormattedTokenBalance( + USDC, + "0xYourSmartAccount" + ); + console.log(`Balance: ${formatted.formattedBalance} ${formatted.token.symbol}`); + + // Validate a token address + const valid = await client.tokens.validateToken(USDC); + console.log("Is valid ERC20:", valid); + + // Generate ERC20 transfer calldata + const calldata = client.tokens.generateTransferCalldata( + "0xRecipient", + "100.5", + 6 // USDC decimals + ); + console.log("Transfer calldata:", calldata); +} + +// ============================================ +// 8. Transfers (ETH & ERC20) +// ============================================ + +async function transfers(client: AirAccountServerClient) { + const userId = "user-abc"; + + // --- ETH transfer --- + const ethTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + }); + console.log("ETH Transfer:", ethTransfer.transferId); + + // --- ERC20 token transfer --- + const tokenTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "50", + tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + }); + console.log("Token Transfer:", tokenTransfer.transferId); + + // --- Gasless transfer with paymaster --- + const gaslessTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + usePaymaster: true, + paymasterAddress: "0xYourPaymasterAddress", + }); + console.log("Gasless Transfer:", gaslessTransfer.transferId); + + // --- Transfer with KMS passkey assertion --- + const kmsTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + passkeyAssertion: { + AuthenticatorData: "0x...", + ClientDataHash: "0x...", + Signature: "0x...", + }, + }); + console.log("KMS Transfer:", kmsTransfer.transferId); + + // --- AirAccount tiered transfer (M4) --- + const tieredTransfer = await client.transfers.executeTransfer(userId, { + to: "0xRecipientAddress", + amount: "0.01", + useAirAccountTiering: true, // Enable tier-based signature routing + p256Signature: "0x...", // Required for Tier 2/3 + // guardianSigner: guardianEthSigner, // Required for Tier 3 only + }); + console.log("Tiered Transfer:", tieredTransfer.transferId); + + // --- Check transfer status --- + const status = await client.transfers.getTransferStatus( + userId, + ethTransfer.transferId + ); + console.log("Status:", status.statusDescription); + // Possible statuses: + // pending → "Preparing transaction and generating signatures" + // submitted → "Transaction submitted to bundler, waiting for confirmation" + // completed → "Transaction confirmed on chain" + // failed → "Transaction failed" + + if (status.explorerUrl) { + console.log("Explorer:", status.explorerUrl); + } + + // --- Transfer history with pagination --- + const history = await client.transfers.getTransferHistory(userId, 1, 10); + console.log( + `Page 1: ${history.transfers.length} of ${history.total} transfers` + ); + + for (const tx of history.transfers) { + console.log( + ` ${tx.id}: ${tx.amount} ${tx.tokenSymbol ?? "ETH"} → ${tx.to} [${tx.status}]` + ); + } + + // --- Gas estimation --- + const gasEstimate = await client.transfers.estimateGas(userId, { + to: "0xRecipientAddress", + amount: "0.01", + }); + console.log("Gas estimate:", gasEstimate); +} + +// ============================================ +// 9. Paymaster Management (SuperPaymaster) +// ============================================ + +async function paymasterManagement(client: AirAccountServerClient) { + const userId = "user-abc"; + + // Add a custom paymaster + await client.paymaster.addCustomPaymaster( + userId, + "my-paymaster", + "0xPaymasterContractAddress", + "custom" + ); + + // Add a Pimlico paymaster (with API key for sponsored transactions) + await client.paymaster.addCustomPaymaster( + userId, + "pimlico-pm", + "0xPimlicoPaymasterAddress", + "pimlico", + "pm_api_key_xxx" + ); + + // List available paymasters + const paymasters = await client.paymaster.getAvailablePaymasters(userId); + for (const pm of paymasters) { + console.log(` ${pm.name}: ${pm.address} (configured: ${pm.configured})`); + } + + // Remove a paymaster + const removed = await client.paymaster.removeCustomPaymaster( + userId, + "my-paymaster" + ); + console.log("Removed:", removed); + + // Note: SuperPaymaster (v0.7/v0.8) is auto-detected on M4 deployments + // and returns packed paymaster data format automatically +} + +// ============================================ +// 10. BLS Signatures & Tiered Signing +// ============================================ + +async function blsSignatures(client: AirAccountServerClient) { + // BLS signatures require seed nodes for the gossip network. + // Configure them in the ServerConfig. + + // Generate BLS signature for a UserOp hash + const userOpHash = + "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"; + const blsData = await client.bls.generateBLSSignature( + "user-abc", + userOpHash + ); + console.log("BLS signature data:", blsData); + + // Pack signature for on-chain verification + const packed = await client.bls.packSignature(blsData); + console.log("Packed signature:", packed); + + // Generate tiered signature (AirAccount M4) + // Tier 1: raw ECDSA (algId 0x02) + // Tier 2: P256 + BLS aggregate (algId 0x04) + // Tier 3: P256 + BLS + Guardian ECDSA (algId 0x05) + const tieredSig = await client.bls.generateTieredSignature({ + tier: 2, + userId: "user-abc", + userOpHash, + p256Signature: "0x...", // 64-byte P256 signature + }); + console.log("Tiered (T2) signature:", tieredSig); +} + +// ============================================ +// 11. Guard Checker (On-Chain Pre-Validation) +// ============================================ + +/** + * GuardChecker reads tier limits and guard status from the AirAccount contract + * to determine which signature tier is required for a transaction. + */ +async function guardCheckerExample(client: AirAccountServerClient) { + const accountAddress = "0xYourSmartAccount"; + + // Fetch tier configuration from contract + // const tierConfig = await guardChecker.fetchTierConfig(accountAddress); + // console.log("Tier 1 limit:", tierConfig.tier1Limit); + // console.log("Tier 2 limit:", tierConfig.tier2Limit); + + // Fetch guard status + // const guardStatus = await guardChecker.fetchGuardStatus(accountAddress); + // console.log("Has guard:", guardStatus.hasGuard); + // console.log("Daily remaining:", guardStatus.dailyRemaining); + + // Pre-check a transaction (determines required tier + algId) + // const preCheck = await guardChecker.preCheck(accountAddress, parseEther("0.5")); + // console.log("OK:", preCheck.ok); + // console.log("Required tier:", preCheck.tier); + // console.log("AlgId:", preCheck.algId); + + console.log( + "GuardChecker is used internally by TransferManager for AirAccount tiering" + ); + void accountAddress; +} + +// ============================================ +// 12. Multi-Version EntryPoint Support +// ============================================ + +async function multiVersion() { + const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v06: { + entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", + factoryAddress: "0xFACTORY_V6", + validatorAddress: "0xVALIDATOR_V6", + }, + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0xFACTORY_V7", + validatorAddress: "0xVALIDATOR_V7", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xPRIVATE_KEY"), + }); + + // Create account with specific version + const v6Account = await client.accounts.createAccount("user-1", { + entryPointVersion: EntryPointVersion.V0_6, + }); + console.log("v0.6 account:", v6Account.address); + + // Default version (v0.7 in this config) + const defaultAccount = await client.accounts.createAccount("user-2"); + console.log("Default (v0.7) account:", defaultAccount.address); + + // Check configured default + console.log("Default version:", client.ethereum.getDefaultVersion()); +} + +// ============================================ +// 13. Express.js Integration Example +// ============================================ + +/* +import express from 'express'; +import { AirAccountServerClient, MemoryStorage, LocalWalletSigner } from '@aastar/airaccount/server'; + +const app = express(); +app.use(express.json()); + +const client = new AirAccountServerClient({ + rpcUrl: process.env.RPC_URL!, + bundlerRpcUrl: process.env.BUNDLER_RPC_URL!, + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', + factoryAddress: process.env.FACTORY_ADDRESS!, + // No validatorAddress → M4 ECDSA path + }, + }, + defaultVersion: '0.7', + kmsEndpoint: process.env.KMS_ENDPOINT, + kmsApiKey: process.env.KMS_API_KEY, + kmsEnabled: true, + storage: new MemoryStorage(), // Replace with your DB adapter + signer: new LocalWalletSigner(process.env.PRIVATE_KEY!), +}); + +// Create account +app.post('/api/accounts', async (req, res) => { + try { + const { userId } = req.body; + const account = await client.accounts.createAccount(userId); + res.json(account); + } catch (err: any) { + res.status(400).json({ error: err.message }); + } +}); + +// Execute transfer (with passkey assertion from frontend) +app.post('/api/transfers', async (req, res) => { + try { + const { userId, to, amount, tokenAddress, usePaymaster, passkeyAssertion } = req.body; + const result = await client.transfers.executeTransfer(userId, { + to, + amount, + tokenAddress, + usePaymaster, + passkeyAssertion, // LegacyPasskeyAssertion from KMS + }); + res.json(result); + } catch (err: any) { + res.status(400).json({ error: err.message }); + } +}); + +// Get transfer status +app.get('/api/transfers/:userId/:transferId', async (req, res) => { + try { + const { userId, transferId } = req.params; + const status = await client.transfers.getTransferStatus(userId, transferId); + res.json(status); + } catch (err: any) { + res.status(404).json({ error: err.message }); + } +}); + +// Transfer history +app.get('/api/transfers/:userId', async (req, res) => { + try { + const { userId } = req.params; + const page = Number(req.query.page) || 1; + const limit = Number(req.query.limit) || 10; + const history = await client.transfers.getTransferHistory(userId, page, limit); + res.json(history); + } catch (err: any) { + res.status(400).json({ error: err.message }); + } +}); + +app.listen(3000, () => console.log('Server running on :3000')); +*/ + +// ============================================ +// Export for reference +// ============================================ + +export { + quickStart, + m4Setup, + kmsSetup, + accountManagement, + tokenOperations, + transfers, + paymasterManagement, + blsSignatures, + guardCheckerExample, + multiVersion, +}; diff --git a/api/index.md b/api/index.md index 4a8c6f575..da483e5e2 100644 --- a/api/index.md +++ b/api/index.md @@ -4,7 +4,7 @@ The ultimate TypeScript SDK for the AAstar Protocol - a decentralized, community AAstar 协议的终极 TypeScript SDK —— 构建去中心化、社区驱动的账户抽象生态系统。 [![npm version](https://img.shields.io/npm/v/@aastar/sdk.svg)](https://www.npmjs.com/package/@aastar/sdk) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) --- @@ -14,18 +14,36 @@ AAstar SDK provides a complete suite of tools to interact with the AAstar Protoc AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采用了 **"先检查,后执行"** 的设计理念,帮助开发者构建低错误率、健壮的去中心化应用。 -### Core Modules | 核心模块 - -- **[`@aastar/community`](https://docs.aastar.io/api/@aastar/community)**: Launch & manage DAOs. (启动和管理 DAO) -- **[`@aastar/operator`](https://docs.aastar.io/api/@aastar/operator)**: Run Paymasters & earn rewards. (运行 Paymaster 并赚取收益) -- **[`@aastar/enduser`](https://docs.aastar.io/api/@aastar/enduser)**: Join communities & enjoy gasless txs. (加入社区并享受免 Gas 交易) -- **[`@aastar/analytics`](https://docs.aastar.io/api/@aastar/analytics)**: Monitor ecosystem data. (监控生态系统数据) -- **[`@aastar/tokens`](https://docs.aastar.io/api/@aastar/tokens)**: GToken & XPNTs finance tools. (GToken 和 XPNTs 金融工具) -- **[`@aastar/identity`](https://docs.aastar.io/api/@aastar/identity)**: Reputation & SBT management. (声誉和 SBT 管理) -- **[`@aastar/account`](https://docs.aastar.io/api/@aastar/account)**: Smart Account (ERC-4337) utilities. (智能账户工具) -- **[`@aastar/core`](https://docs.aastar.io/api/@aastar/core)**: Shared logic, Roles, and configuration. (共享逻辑、角色和配置) -- **[`@aastar/paymaster`](https://docs.aastar.io/api/@aastar/paymaster)**: Low-level Paymaster interactions. (低层级 Paymaster 交互) -- **[`@aastar/dapp`](https://docs.aastar.io/api/@aastar/dapp)**: Pre-built UI components and React hooks. (预建 UI 组件和 React hooks) +> **📦 Single-package since v0.20.x | 自 v0.20.x 起单包发布** +> Everything ships in ONE package — `@aastar/sdk` — with **subpath exports** that preserve the +> original module structure. The legacy split packages (`@aastar/core`, `@aastar/account`, +> `@aastar/paymaster`, `@aastar/identity`, `@aastar/tokens`, `@aastar/dapp`, `@aastar/x402`, +> `@aastar/channel`, `@aastar/enduser`, `@aastar/operator`, `@aastar/admin`, `@aastar/airaccount`) +> are **deprecated on npm** and now live as subpaths of `@aastar/sdk`. +> 所有能力合并到 **一个包** `@aastar/sdk`,通过 **子路径导出** 保留原有模块结构;上述老的分包已在 npm 上标记弃用。 + +### Modules (now subpaths) | 模块(现为子路径) + +| Import | Functionality (功能) | +|---|---| +| `@aastar/sdk` | Umbrella: re-exports everything + role-based client factories (总入口 + 角色客户端) | +| `@aastar/sdk/core` | Shared logic, Roles, ABIs, **per-chain addresses** (共享逻辑、角色、ABI、多链地址) | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities (智能账户工具) | +| `@aastar/sdk/paymaster` | SuperPaymaster middleware, gas sponsorship (代付中间件) | +| `@aastar/sdk/identity` | Reputation, SBT, credit limits (声誉、SBT、信用额度) | +| `@aastar/sdk/tokens` | GToken & xPNTs finance tools (代币金融工具) | +| `@aastar/sdk/dapp` | React components & hooks — **requires `react` peer dep** (React 组件与 hooks) | +| `@aastar/sdk/x402` | x402 settlement (x402 结算) | +| `@aastar/sdk/channel` | Micro-payment channels (微支付通道) | +| `@aastar/sdk/enduser` · `/operator` · `/admin` | Role lifecycle workflows (角色生命周期) | +| `@aastar/sdk/kms` | KMS WebAuthn passkeys, BLS aggregate signatures, tiered ERC-4337 accounts (Passkey + BLS + 分层签名) | + +> 🔄 The `@aastar/sdk/airaccount` subpath is **deprecated** — it still works as an alias of `@aastar/sdk/kms` for one release. Please migrate to `@aastar/sdk/kms`. +> `@aastar/sdk/airaccount` 子路径已**废弃**,作为 `@aastar/sdk/kms` 的别名再保留一个版本,请尽快迁移到 `@aastar/sdk/kms`。 + +> ⚠️ **`react` / `react-dom` are optional peer deps.** They're only needed for the `@aastar/sdk/dapp` +> subpath. The root `import '@aastar/sdk'` and all non-UI subpaths work in Node/server with no React. +> React 是可选 peer 依赖,仅 `@aastar/sdk/dapp` 需要;root 及其它子路径在 Node/服务端无需 React。 --- @@ -35,10 +53,72 @@ AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采 pnpm add @aastar/sdk viem # or npm install @aastar/sdk viem + +# Only if you use the React UI subpath (@aastar/sdk/dapp): +pnpm add react react-dom +``` + +> You only need `@aastar/sdk` + `viem` — all transitive deps install automatically. KMS / WebAuthn / BLS features are bundled in — no separate install. Import them from `@aastar/sdk/kms`. +> 只需安装 `@aastar/sdk` + `viem`,其余依赖自动带入。KMS / WebAuthn / BLS 能力已内置,无需单独安装,从 `@aastar/sdk/kms` 导入即可。 + +### Importing | 导入方式 + +```typescript +// Everything from the root barrel (no React pulled in): +import { createEndUserClient, createOperatorClient, CANONICAL_ADDRESSES } from '@aastar/sdk'; + +// …or cherry-pick from a subpath to keep bundles lean: +import { registryActions } from '@aastar/sdk/core'; +import { KmsManager, P256PasskeySigner } from '@aastar/sdk/kms'; +import { useGasless } from '@aastar/sdk/dapp'; // requires react ``` --- +## 🌐 Multi-chain | 多链配置 + +**Switching chains is seamless — just pass a viem `chain`.** Contract addresses are auto-resolved +from `chain.id`, so you never hardcode addresses or memorize chainIds. Use the exact chain objects +from `viem/chains`. +切链是无感的——**只需传入一个 viem `chain`**,合约地址会根据 `chain.id` 自动解析,无需手写地址、无需记 chainId。直接用 `viem/chains` 里的链对象即可。 + +| Network | viem chain | chainId | Status | +|---|---|---|---| +| Optimism (mainnet) | `optimism` | `10` | ✅ deployed | +| Sepolia (testnet) | `sepolia` | `11155111` | ✅ deployed (primary test target) | +| OP Sepolia (testnet) | `optimismSepolia` | `11155420` | ✅ deployed | +| Ethereum mainnet | `mainnet` | `1` | ⏳ not yet deployed | + +```typescript +import { createEndUserClient } from '@aastar/sdk'; +import { sepolia, optimism } from 'viem/chains'; +import { http } from 'viem'; + +// Sepolia testnet — addresses auto-resolved from sepolia.id +const test = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), +}); + +// Optimism mainnet — same code, just swap chain + transport +const prod = createEndUserClient({ + chain: optimism, + transport: http('https://mainnet.optimism.io'), +}); +``` + +- **Unsupported chain?** If you pass a chain that has no deployment yet (e.g. `mainnet`) and no + explicit `addresses`, the factory throws a clear error naming the supported chains — no silent + misconfiguration. +- **Custom / private deployment?** Override per-call with `addresses: { ... }` (or `CANONICAL_ADDRESSES[chainId]` + to start from a known set); the explicit value always wins over auto-resolution. +- 未部署的链(如 `mainnet`)且未显式传 `addresses` 时,工厂会抛出列明受支持链的清晰报错;自定义部署可通过 `addresses` 覆盖,显式值优先。 + +Helpers for RPC URLs and explorer links live in `@aastar/sdk` too: +`getNetwork(name)`, `getRpcUrl(name)`, `getChainId(name)`, `getTxUrl(name, hash)`, `getAddressUrl(name, addr)`. + +--- + ## 📚 Documentation | 文档导航 - **Docs Home**: https://docs.aastar.io/ @@ -57,17 +137,26 @@ npm install @aastar/sdk viem ### 1. Initialize Client | 初始化客户端 ```typescript -import { createPublicClient, createWalletClient, http } from 'viem'; +import { http } from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; import { sepolia } from 'viem/chains'; -import { CommunityClient, OperatorClient } from '@aastar/sdk'; +import { createEndUserClient, createOperatorClient } from '@aastar/sdk'; + +const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`); -// 1. Setup VIEM clients -const publicClient = createPublicClient({ chain: sepolia, transport: http() }); -const walletClient = createWalletClient({ chain: sepolia, transport: http() }); +// Role-based clients compose viem action factories under the hood. +// Addresses auto-resolve from chain.id — no `addresses` needed for supported chains. +const enduser = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); -// 2. Initialize AAstar Clients -const communityClient = new CommunityClient(publicClient, walletClient); -const operatorClient = new OperatorClient(publicClient, walletClient); +const operator = createOperatorClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); ``` ### 2. "Pre-check" Pattern | "预检查" 模式 @@ -143,16 +232,20 @@ AAstar SDK is built on top of **viem**, ensuring lightweight and type-safe inter AAstar SDK 基于 **viem** 构建,确保轻量级和类型安全的交互。它将复杂的合约逻辑抽象为直观的业务原语。 -| Package | Functionality (功能) | +All capabilities are bundled into `@aastar/sdk`; the table below maps each former package to its subpath. +所有能力已打包进 `@aastar/sdk`,下表对应每个旧分包现在的子路径。 + +| Subpath | Functionality (功能) | |---------|---------------------| -| `@aastar/core` | Shared logic, Roles, RequirementChecker | -| `@aastar/community` | DAO Registry, XPNTs issuance | -| `@aastar/operator` | Paymaster ops, Staking management | -| `@aastar/enduser` | User onboarding, SBT minting | -| `@aastar/tokens` | Finance, Tokenomics, Approval flows | -| `@aastar/identity` | Reputation, Credit limits, ZK Proofs | -| `@aastar/paymaster` | EntryPoint & Paymaster low-level API | -| `@aastar/dapp` | React Components & Integration Hooks | +| `@aastar/sdk/core` | Shared logic, Roles, RequirementChecker, per-chain addresses | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities | +| `@aastar/sdk/operator` | Paymaster ops, Staking management | +| `@aastar/sdk/enduser` | User onboarding, SBT minting | +| `@aastar/sdk/tokens` | Finance, Tokenomics, Approval flows | +| `@aastar/sdk/identity` | Reputation, Credit limits, ZK Proofs | +| `@aastar/sdk/paymaster` | EntryPoint & Paymaster low-level API | +| `@aastar/sdk/dapp` | React Components & Integration Hooks (needs `react`) | +| `@aastar/sdk/kms` | KMS WebAuthn, BLS Signatures, ERC-4337 Tiered Accounts (`/airaccount` = deprecated alias) | --- @@ -184,6 +277,6 @@ We welcome contributions! Please see our Contributing Guide for details. --- -

+<p align="center"> Built with ❤️ by the AAstar Community -

+</p> diff --git a/api/modules/airaccount.md b/api/modules/airaccount.md new file mode 100644 index 000000000..a8ebc8476 --- /dev/null +++ b/api/modules/airaccount.md @@ -0,0 +1,347 @@ +# @aastar/airaccount — AirAccount SDK + +> ERC-4337 Account Abstraction SDK with KMS WebAuthn, BLS Aggregate Signatures, and Tiered Signature Routing + +A framework-agnostic, production-ready SDK for building Web3 applications with +hardware-backed passkey authentication and ERC-4337 smart accounts. + +## Features + +- **KMS WebAuthn** — Hardware-backed passkey authentication via `kms1.aastar.io` +- **BLS Aggregate Signatures** — Multi-node BLS signing with gossip discovery +- **ERC-4337 Account Abstraction** — Smart contract wallets (v0.6 / v0.7 / v0.8) +- **M4 Account Factory** — Built-in guardian support and daily spending limits +- **Tiered Signature Routing** — Tier 1 (ECDSA) / Tier 2 (P256+BLS) / Tier 3 (P256+BLS+Guardian) +- **SuperPaymaster** — Auto-detected on M4 deployments for gasless transactions +- **Pluggable Adapters** — Bring your own storage, signer, and logger +- **TypeScript First** — Full type safety and IntelliSense support + +## Installation + +```bash +npm install @aastar/airaccount +``` + +## Quick Start — Browser Client + +```typescript +import { AirAccountClient } from "@aastar/airaccount"; + +// `apiURL` is the passkey RP backend. AAStar's official hosted RP will be +// `https://auth.aastar.io` (served by aNode); you can also point at your own +// backend implementing the standardized passkey contract. +const air = new AirAccountClient({ + apiURL: "https://auth.aastar.io", + tokenProvider: () => localStorage.getItem("token"), + bls: { + seedNodes: ["https://signer1.aastar.io"], + }, +}); + +// Register with KMS-backed Passkey +const { user, token } = await air.passkey.register({ + email: "user@example.com", + username: "JohnDoe", +}); + +// Login with Passkey +const result = await air.passkey.authenticate(); + +// Verify a transaction with Passkey (biometric prompt) +const verification = await air.passkey.verifyTransaction({ + to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + value: "0.01", +}); +``` + +## Quick Start — Server Client + +```typescript +import { + AirAccountServerClient, + MemoryStorage, + LocalWalletSigner, +} from "@aastar/airaccount/server"; + +const client = new AirAccountServerClient({ + rpcUrl: "https://sepolia.infura.io/v3/YOUR_KEY", + bundlerRpcUrl: "https://api.pimlico.io/v2/11155111/rpc?apikey=YOUR_KEY", + chainId: 11155111, + entryPoints: { + v07: { + entryPointAddress: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + factoryAddress: "0x914db0a849f55e68a726c72fd02b7114b1176d88", + }, + }, + defaultVersion: "0.7", + storage: new MemoryStorage(), + signer: new LocalWalletSigner("0xYOUR_PRIVATE_KEY"), +}); + +// Create a smart account +const account = await client.accounts.createAccount("user-123"); + +// Execute a transfer +const result = await client.transfers.executeTransfer("user-123", { + to: "0xRecipient", + amount: "0.01", +}); +``` + +## API Reference + +### Browser SDK (`@aastar/airaccount`) + +#### AirAccountClient + +> `YAAAClient` remains as a deprecated alias of `AirAccountClient` for backward compatibility. + +```typescript +const air = new AirAccountClient(config: AirAccountConfig); +``` + +| Property | Type | Description | +| ------------- | ----------------- | ------------------------------------ | +| `air.passkey` | `PasskeyManager` | WebAuthn passkey authentication | +| `air.bls` | `BLSManager` | BLS node discovery & message points | + +#### AirAccountConfig + +> `YAAAConfig` remains as a deprecated alias of `AirAccountConfig`. + +```typescript +interface AirAccountConfig { + /** + * Backend RP (relying party) API URL — required, no default. + * AAStar's official hosted RP will be `https://auth.aastar.io` (served by aNode). + * You can also point at your own backend implementing the standardized passkey contract. + */ + apiURL: string; + tokenProvider?: () => string | null; + /** Optional overrides for the passkey backend route paths (defaults to `/auth/passkey/*`). */ + passkeyRoutes?: Partial; + bls: { + seedNodes: string[]; + discoveryTimeout?: number; + }; +} +``` + +### Server SDK (`@aastar/airaccount/server`) + +#### AirAccountServerClient + +> `YAAAServerClient` remains as a deprecated alias of `AirAccountServerClient`. + +```typescript +const client = new AirAccountServerClient(config: ServerConfig); +``` + +| Property | Type | Description | +| ------------------- | --------------------- | ---------------------------------------- | +| `client.accounts` | `AccountManager` | Smart account creation & queries | +| `client.transfers` | `TransferManager` | ETH/ERC20 transfers, gas estimation | +| `client.bls` | `BLSSignatureService` | BLS signing & tiered signatures | +| `client.paymaster` | `PaymasterManager` | Paymaster config, SuperPaymaster | +| `client.tokens` | `TokenService` | ERC20 info, balances, calldata | +| `client.wallets` | `WalletManager` | EOA/KMS wallet management | +| `client.ethereum` | `EthereumProvider` | RPC, bundler, contract interactions | + +#### ServerConfig + +```typescript +interface ServerConfig { + rpcUrl: string; + bundlerRpcUrl: string; + chainId: number; + entryPoints: { + v06?: EntryPointConfig; + v07?: EntryPointConfig; + v08?: EntryPointConfig; + }; + defaultVersion?: "0.6" | "0.7" | "0.8"; + blsSeedNodes?: string[]; + blsDiscoveryTimeout?: number; + kmsEndpoint?: string; + kmsEnabled?: boolean; + kmsApiKey?: string; + storage: IStorageAdapter; + signer: ISignerAdapter; + logger?: ILogger; +} +``` + +### Pluggable Interfaces + +#### IStorageAdapter + +```typescript +interface IStorageAdapter { + // Accounts + getAccounts(): Promise; + saveAccount(account: AccountRecord): Promise; + findAccountByUserId(userId: string): Promise; + updateAccount(userId: string, updates: Partial): Promise; + // Transfers + saveTransfer(transfer: TransferRecord): Promise; + findTransferById(id: string): Promise; + findTransfersByUserId(userId: string): Promise; + updateTransfer(id: string, updates: Partial): Promise; + // Paymasters + getPaymasters(userId: string): Promise; + savePaymaster(userId: string, paymaster: PaymasterRecord): Promise; + removePaymaster(userId: string, name: string): Promise; + // BLS + getBlsConfig(): Promise; + updateSignerNodesCache(nodes: unknown[]): Promise; +} +``` + +#### ISignerAdapter + +```typescript +interface ISignerAdapter { + getAddress(userId: string): Promise; + getSigner(userId: string, ctx?: PasskeyAssertionContext): Promise; + ensureSigner(userId: string): Promise<{ signer: ethers.Signer; address: string }>; +} +``` + +#### ILogger + +```typescript +interface ILogger { + debug(message: string, ...args: unknown[]): void; + log(message: string, ...args: unknown[]): void; + warn(message: string, ...args: unknown[]): void; + error(message: string, ...args: unknown[]): void; +} +``` + +### KMS Integration + +```typescript +import { KmsManager } from "@aastar/airaccount/server"; + +const kms = new KmsManager({ + kmsEndpoint: "https://kms1.aastar.io", + kmsApiKey: "your-api-key", + kmsEnabled: true, +}); + +// Create KMS-backed ethers.Signer +const signer = kms.createKmsSigner(keyId, address, assertionProvider); + +// Key management +await kms.createKey(description, passkeyPublicKey); +await kms.getKeyStatus(keyId); +await kms.pollUntilReady(keyId); + +// Signing (requires passkey assertion) +await kms.signHash(hash, assertion, target); + +// WebAuthn ceremonies +await kms.beginRegistration(params); +await kms.completeRegistration(params); +await kms.beginAuthentication(params); +``` + +### Transfer Params + +```typescript +interface ExecuteTransferParams { + to: string; + amount: string; + data?: string; + tokenAddress?: string; // ERC20 token address + usePaymaster?: boolean; + paymasterAddress?: string; + paymasterData?: string; + passkeyAssertion?: LegacyPasskeyAssertion; // KMS signing + p256Signature?: string; // Tier 2/3 + guardianSigner?: ethers.Signer; // Tier 3 + useAirAccountTiering?: boolean; // Enable tiered routing +} +``` + +### Signature Tiers (M4 AirAccount) + +| Tier | AlgId | Components | Use Case | +| ---- | ------ | -------------------------------- | ------------------- | +| 1 | `0x02` | Raw ECDSA (65 bytes) | Small transactions | +| 2 | `0x04` | P256 + BLS aggregate | Medium transactions | +| 3 | `0x05` | P256 + BLS + Guardian ECDSA | Large transactions | +| BLS | `0x01` | Legacy BLS (prepended to pack) | Default non-tiered | + +### ERC-4337 Utilities + +```typescript +import { ERC4337Utils } from "@aastar/airaccount"; + +ERC4337Utils.packAccountGasLimits(verGasLimit, callGasLimit); +ERC4337Utils.unpackAccountGasLimits(packed); +ERC4337Utils.packGasFees(maxPriorityFee, maxFeePerGas); +ERC4337Utils.unpackGasFees(packed); +ERC4337Utils.packUserOperation(userOp); +ERC4337Utils.unpackUserOperation(packedOp); +``` + +### Built-in Adapters + +| Adapter | Description | +| -------------------- | ---------------------------------------------- | +| `MemoryStorage` | In-memory storage (dev/testing) | +| `LocalWalletSigner` | Single private key signer (dev/testing) | +| `ConsoleLogger` | Console output with prefix | +| `SilentLogger` | No-op logger | + +## Examples + +See the [examples](./examples) directory for complete usage: + +- [Basic Usage](./examples/basic-usage.ts) — Browser: registration, login, transactions +- [Server Usage](./examples/server-usage.ts) — Backend: accounts, transfers, KMS, tiering, Express.js +- [Examples README](./examples/README.md) — Full guide with architecture and troubleshooting + +## Architecture + +``` +┌─────────────┐ +│ Browser │ @aastar/airaccount (AirAccountClient) +│ (SDK) │ - PasskeyManager (WebAuthn) +└──────┬───────┘ - BLSManager + │ HTTPS + ▼ +┌─────────────┐ +│ Your API │ @aastar/airaccount/server (AirAccountServerClient) +│ (Backend) │ - AccountManager, TransferManager +└──────┬───────┘ - BLSSignatureService, GuardChecker + │ - KmsManager, PaymasterManager + ├─────► Bundler (Pimlico/Alchemy) + ├─────► Paymaster / SuperPaymaster + ├─────► BLS Validators (gossip network) + └─────► KMS (kms1.aastar.io) +``` + +## Browser Support + +- Chrome/Edge 67+ +- Safari 13+ +- Firefox 60+ + +**Note**: WebAuthn/Passkey requires HTTPS (localhost is OK for development). + +## Development + +```bash +npm install # Install dependencies +npm run build # Build with tsup +npm test # Run tests +npm run dev # Watch mode +npm run lint # ESLint +npm run format # Prettier +``` + +## License + +MIT diff --git a/api/modules/sdk.md b/api/modules/sdk.md index 4a8c6f575..da483e5e2 100644 --- a/api/modules/sdk.md +++ b/api/modules/sdk.md @@ -4,7 +4,7 @@ The ultimate TypeScript SDK for the AAstar Protocol - a decentralized, community AAstar 协议的终极 TypeScript SDK —— 构建去中心化、社区驱动的账户抽象生态系统。 [![npm version](https://img.shields.io/npm/v/@aastar/sdk.svg)](https://www.npmjs.com/package/@aastar/sdk) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) --- @@ -14,18 +14,36 @@ AAstar SDK provides a complete suite of tools to interact with the AAstar Protoc AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采用了 **"先检查,后执行"** 的设计理念,帮助开发者构建低错误率、健壮的去中心化应用。 -### Core Modules | 核心模块 - -- **[`@aastar/community`](https://docs.aastar.io/api/@aastar/community)**: Launch & manage DAOs. (启动和管理 DAO) -- **[`@aastar/operator`](https://docs.aastar.io/api/@aastar/operator)**: Run Paymasters & earn rewards. (运行 Paymaster 并赚取收益) -- **[`@aastar/enduser`](https://docs.aastar.io/api/@aastar/enduser)**: Join communities & enjoy gasless txs. (加入社区并享受免 Gas 交易) -- **[`@aastar/analytics`](https://docs.aastar.io/api/@aastar/analytics)**: Monitor ecosystem data. (监控生态系统数据) -- **[`@aastar/tokens`](https://docs.aastar.io/api/@aastar/tokens)**: GToken & XPNTs finance tools. (GToken 和 XPNTs 金融工具) -- **[`@aastar/identity`](https://docs.aastar.io/api/@aastar/identity)**: Reputation & SBT management. (声誉和 SBT 管理) -- **[`@aastar/account`](https://docs.aastar.io/api/@aastar/account)**: Smart Account (ERC-4337) utilities. (智能账户工具) -- **[`@aastar/core`](https://docs.aastar.io/api/@aastar/core)**: Shared logic, Roles, and configuration. (共享逻辑、角色和配置) -- **[`@aastar/paymaster`](https://docs.aastar.io/api/@aastar/paymaster)**: Low-level Paymaster interactions. (低层级 Paymaster 交互) -- **[`@aastar/dapp`](https://docs.aastar.io/api/@aastar/dapp)**: Pre-built UI components and React hooks. (预建 UI 组件和 React hooks) +> **📦 Single-package since v0.20.x | 自 v0.20.x 起单包发布** +> Everything ships in ONE package — `@aastar/sdk` — with **subpath exports** that preserve the +> original module structure. The legacy split packages (`@aastar/core`, `@aastar/account`, +> `@aastar/paymaster`, `@aastar/identity`, `@aastar/tokens`, `@aastar/dapp`, `@aastar/x402`, +> `@aastar/channel`, `@aastar/enduser`, `@aastar/operator`, `@aastar/admin`, `@aastar/airaccount`) +> are **deprecated on npm** and now live as subpaths of `@aastar/sdk`. +> 所有能力合并到 **一个包** `@aastar/sdk`,通过 **子路径导出** 保留原有模块结构;上述老的分包已在 npm 上标记弃用。 + +### Modules (now subpaths) | 模块(现为子路径) + +| Import | Functionality (功能) | +|---|---| +| `@aastar/sdk` | Umbrella: re-exports everything + role-based client factories (总入口 + 角色客户端) | +| `@aastar/sdk/core` | Shared logic, Roles, ABIs, **per-chain addresses** (共享逻辑、角色、ABI、多链地址) | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities (智能账户工具) | +| `@aastar/sdk/paymaster` | SuperPaymaster middleware, gas sponsorship (代付中间件) | +| `@aastar/sdk/identity` | Reputation, SBT, credit limits (声誉、SBT、信用额度) | +| `@aastar/sdk/tokens` | GToken & xPNTs finance tools (代币金融工具) | +| `@aastar/sdk/dapp` | React components & hooks — **requires `react` peer dep** (React 组件与 hooks) | +| `@aastar/sdk/x402` | x402 settlement (x402 结算) | +| `@aastar/sdk/channel` | Micro-payment channels (微支付通道) | +| `@aastar/sdk/enduser` · `/operator` · `/admin` | Role lifecycle workflows (角色生命周期) | +| `@aastar/sdk/kms` | KMS WebAuthn passkeys, BLS aggregate signatures, tiered ERC-4337 accounts (Passkey + BLS + 分层签名) | + +> 🔄 The `@aastar/sdk/airaccount` subpath is **deprecated** — it still works as an alias of `@aastar/sdk/kms` for one release. Please migrate to `@aastar/sdk/kms`. +> `@aastar/sdk/airaccount` 子路径已**废弃**,作为 `@aastar/sdk/kms` 的别名再保留一个版本,请尽快迁移到 `@aastar/sdk/kms`。 + +> ⚠️ **`react` / `react-dom` are optional peer deps.** They're only needed for the `@aastar/sdk/dapp` +> subpath. The root `import '@aastar/sdk'` and all non-UI subpaths work in Node/server with no React. +> React 是可选 peer 依赖,仅 `@aastar/sdk/dapp` 需要;root 及其它子路径在 Node/服务端无需 React。 --- @@ -35,10 +53,72 @@ AAstar SDK 提供了一套完整的工具集用于交互 AAstar 协议。它采 pnpm add @aastar/sdk viem # or npm install @aastar/sdk viem + +# Only if you use the React UI subpath (@aastar/sdk/dapp): +pnpm add react react-dom +``` + +> You only need `@aastar/sdk` + `viem` — all transitive deps install automatically. KMS / WebAuthn / BLS features are bundled in — no separate install. Import them from `@aastar/sdk/kms`. +> 只需安装 `@aastar/sdk` + `viem`,其余依赖自动带入。KMS / WebAuthn / BLS 能力已内置,无需单独安装,从 `@aastar/sdk/kms` 导入即可。 + +### Importing | 导入方式 + +```typescript +// Everything from the root barrel (no React pulled in): +import { createEndUserClient, createOperatorClient, CANONICAL_ADDRESSES } from '@aastar/sdk'; + +// …or cherry-pick from a subpath to keep bundles lean: +import { registryActions } from '@aastar/sdk/core'; +import { KmsManager, P256PasskeySigner } from '@aastar/sdk/kms'; +import { useGasless } from '@aastar/sdk/dapp'; // requires react ``` --- +## 🌐 Multi-chain | 多链配置 + +**Switching chains is seamless — just pass a viem `chain`.** Contract addresses are auto-resolved +from `chain.id`, so you never hardcode addresses or memorize chainIds. Use the exact chain objects +from `viem/chains`. +切链是无感的——**只需传入一个 viem `chain`**,合约地址会根据 `chain.id` 自动解析,无需手写地址、无需记 chainId。直接用 `viem/chains` 里的链对象即可。 + +| Network | viem chain | chainId | Status | +|---|---|---|---| +| Optimism (mainnet) | `optimism` | `10` | ✅ deployed | +| Sepolia (testnet) | `sepolia` | `11155111` | ✅ deployed (primary test target) | +| OP Sepolia (testnet) | `optimismSepolia` | `11155420` | ✅ deployed | +| Ethereum mainnet | `mainnet` | `1` | ⏳ not yet deployed | + +```typescript +import { createEndUserClient } from '@aastar/sdk'; +import { sepolia, optimism } from 'viem/chains'; +import { http } from 'viem'; + +// Sepolia testnet — addresses auto-resolved from sepolia.id +const test = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), +}); + +// Optimism mainnet — same code, just swap chain + transport +const prod = createEndUserClient({ + chain: optimism, + transport: http('https://mainnet.optimism.io'), +}); +``` + +- **Unsupported chain?** If you pass a chain that has no deployment yet (e.g. `mainnet`) and no + explicit `addresses`, the factory throws a clear error naming the supported chains — no silent + misconfiguration. +- **Custom / private deployment?** Override per-call with `addresses: { ... }` (or `CANONICAL_ADDRESSES[chainId]` + to start from a known set); the explicit value always wins over auto-resolution. +- 未部署的链(如 `mainnet`)且未显式传 `addresses` 时,工厂会抛出列明受支持链的清晰报错;自定义部署可通过 `addresses` 覆盖,显式值优先。 + +Helpers for RPC URLs and explorer links live in `@aastar/sdk` too: +`getNetwork(name)`, `getRpcUrl(name)`, `getChainId(name)`, `getTxUrl(name, hash)`, `getAddressUrl(name, addr)`. + +--- + ## 📚 Documentation | 文档导航 - **Docs Home**: https://docs.aastar.io/ @@ -57,17 +137,26 @@ npm install @aastar/sdk viem ### 1. Initialize Client | 初始化客户端 ```typescript -import { createPublicClient, createWalletClient, http } from 'viem'; +import { http } from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; import { sepolia } from 'viem/chains'; -import { CommunityClient, OperatorClient } from '@aastar/sdk'; +import { createEndUserClient, createOperatorClient } from '@aastar/sdk'; + +const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`); -// 1. Setup VIEM clients -const publicClient = createPublicClient({ chain: sepolia, transport: http() }); -const walletClient = createWalletClient({ chain: sepolia, transport: http() }); +// Role-based clients compose viem action factories under the hood. +// Addresses auto-resolve from chain.id — no `addresses` needed for supported chains. +const enduser = createEndUserClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); -// 2. Initialize AAstar Clients -const communityClient = new CommunityClient(publicClient, walletClient); -const operatorClient = new OperatorClient(publicClient, walletClient); +const operator = createOperatorClient({ + chain: sepolia, + transport: http(process.env.SEPOLIA_RPC_URL), + account, +}); ``` ### 2. "Pre-check" Pattern | "预检查" 模式 @@ -143,16 +232,20 @@ AAstar SDK is built on top of **viem**, ensuring lightweight and type-safe inter AAstar SDK 基于 **viem** 构建,确保轻量级和类型安全的交互。它将复杂的合约逻辑抽象为直观的业务原语。 -| Package | Functionality (功能) | +All capabilities are bundled into `@aastar/sdk`; the table below maps each former package to its subpath. +所有能力已打包进 `@aastar/sdk`,下表对应每个旧分包现在的子路径。 + +| Subpath | Functionality (功能) | |---------|---------------------| -| `@aastar/core` | Shared logic, Roles, RequirementChecker | -| `@aastar/community` | DAO Registry, XPNTs issuance | -| `@aastar/operator` | Paymaster ops, Staking management | -| `@aastar/enduser` | User onboarding, SBT minting | -| `@aastar/tokens` | Finance, Tokenomics, Approval flows | -| `@aastar/identity` | Reputation, Credit limits, ZK Proofs | -| `@aastar/paymaster` | EntryPoint & Paymaster low-level API | -| `@aastar/dapp` | React Components & Integration Hooks | +| `@aastar/sdk/core` | Shared logic, Roles, RequirementChecker, per-chain addresses | +| `@aastar/sdk/account` | Smart Account (ERC-4337) utilities | +| `@aastar/sdk/operator` | Paymaster ops, Staking management | +| `@aastar/sdk/enduser` | User onboarding, SBT minting | +| `@aastar/sdk/tokens` | Finance, Tokenomics, Approval flows | +| `@aastar/sdk/identity` | Reputation, Credit limits, ZK Proofs | +| `@aastar/sdk/paymaster` | EntryPoint & Paymaster low-level API | +| `@aastar/sdk/dapp` | React Components & Integration Hooks (needs `react`) | +| `@aastar/sdk/kms` | KMS WebAuthn, BLS Signatures, ERC-4337 Tiered Accounts (`/airaccount` = deprecated alias) | --- @@ -184,6 +277,6 @@ We welcome contributions! Please see our Contributing Guide for details. --- -

+<p align="center"> Built with ❤️ by the AAstar Community -

+</p> diff --git a/changelog.md b/changelog.md index dbce35957..3b0c8470c 100644 --- a/changelog.md +++ b/changelog.md @@ -2,10 +2,155 @@ All notable changes to this project will be documented in this file. -## [Unreleased] - -## [0.16.23] - 2026-02-24 -**SDK Code Integrity Hash**: `9b02e91aaae2081b68b8ddfcf4c3dd52d450b4f368a8746b5896e0024e441db7` +## [0.20.8] - 2026-06-18 + +**Address bug fix (single source of truth).** `@aastar/airaccount` carried its own hardcoded copy of protocol contract addresses, stale at `v0.17.2-beta.4`, while `@aastar/core` `CANONICAL_ADDRESSES` (the authority) was at `v0.19.0-beta.2` (Sepolia full redeploy). The airaccount server used the stale copy internally. + +- `AIRACCOUNT_ADDRESSES` current Sepolia fields now **derive from `@aastar/core` `CANONICAL_ADDRESSES[11155111]`** — factory `0x52c5190E`, accountImpl `0x7fe62d51`, delegate/extension/agentRegistry/validatorRouter/BLS/sessionKey/forceExit/calldataParser realigned to v0.19.0-beta.2. Legacy/deprecated factory addresses retained for historical account recovery. +- Added `@aastar/core` as an `@aastar/airaccount` dependency + an anti-drift test asserting the derived fields equal `CANONICAL_ADDRESSES` (CI fails if they ever diverge again). +- Audit: confirmed `airaccount` was the ONLY package not sourcing addresses from `@aastar/core`; all others already do. + +**SDK Code Integrity Hash**: `1b43e81d4cc394b44ed39665749d678666d9e7571054619f8da09aa64b04fec1` + +## [0.20.7] - 2026-06-18 + +**viem-only — `ethers` fully removed.** Published with deps `viem` + `@simplewebauthn/browser` + `axios` (no ethers), Apache-2.0. + +- **ethers → viem migration**: `@aastar/airaccount` (the last ethers consumer) migrated 100% to viem — provider hub, signer hub, all 16 services, BLS packing, signatures. Byte-for-byte equivalence proven by a differential parity layer, now ethers-free golden-fixture tests. `ethers` removed as a dependency everywhere (incl. root devDep + on-chain evidence scripts). +- **Passkey client decoupled from the YAA backend**: `YAAAClient` → `AirAccountClient`, `YAAAServerClient` → `AirAccountServerClient` (deprecated aliases kept). Passkey routes parameterized (`DEFAULT_PASSKEY_ROUTES`, overridable); dead `api.yetanotheraa.com` default removed. Official hosted Relying-Party will be `auth.aastar.io` (served by aNode). +- **Hardening**: typed wrappers for high-risk contract reads (gas budget, fund-custody address, guard allow/deny gates, session-key grant hashes); uint256 args enforced as `bigint`. +- Builds on **0.20.6** (repaired published `.d.ts` types + browser-build fix) and **0.20.5** (single-package `@aastar/sdk/kms` subpath + seamless multi-chain address auto-resolution). +- Tooling: SDK anvil business-regression harness repaired (address sync + honest pass/fail); TypeDoc API-doc generation restored. + +**SDK Code Integrity Hash**: `55018672abdf24b1c9a66235c8f9f72d9e0c410ea6e1e5c9701fbca17bd68d5f` + +## [0.20.1] - 2026-06-16 + +Upstream sync (radar-driven, detect→upgrade→test). Four upstreams moved on 2026-06-16: + +- **SuperPaymaster** fresh Sepolia redeploy — 17 addresses re-synced + xPNTsToken `setSpenderDailyCapFor`/`spenderDailyCapOverride` (ABI + wrappers + tests). +- **KMS** openapi 0.22.0 → 0.23.0 (coverage already 100%; pin only). +- **AirAccount contracts** v0.18.0-beta.2 → v0.19.0-beta.2 — **FULL Sepolia redeploy**: although v0.19 has no new Solidity logic, the `ACCOUNT_VERSION`/`FACTORY_VERSION` bump to `"0.19.0"` changed bytecode and redeployed **all 11 addresses** (factory `0x52c5190E`, impl `0x7fe62d51`, BLS verifier `AAStarBLSAlgorithm 0xA9EE4f8A`→`0x68c381Ad`, aggregator `0x77f7bf95`, validator-router, session-key/force-exit/delegate/extension/agent-registry/calldata-parser). The DVT real-node E2E verifier was repointed to the new `AAStarBLSAlgorithm`. +- **DVT** (YetAnotherAA-Validator) v1.2.0 → v1.3.0 — new opt-in `POST /signature/sign` `{ status: "pending_confirmation", userOpHash }` response (CONFIRM_ENABLED high-value ops, released via `POST /signature/confirm`). The SDK now surfaces it as a typed `DvtPendingConfirmationError` from the co-sign assembly path instead of silently dropping the node; the full confirm-flow client remains tracked in #82. + +Radar fix: the AirAccount address anchor now tracks the **latest upstream CHANGELOG deploy table** (a fixed version-specific E2E doc silently false-greened the v0.19 redeploy); self-contradiction now compares same-version docs only. + +Compatible upstreams: AirAccount v0.19.0-beta.2 / SuperPaymaster v5.4.0-beta.1 (2026-06-16 redeploy) / KMS openapi 0.23.0 / DVT v1.3.0. + +## [0.20.0] - 2026-06-16 + +> Compatible upstream versions: **AirAccount contracts v0.18.0-beta.2 · SuperPaymaster v5.4.0-beta.1 · KMS openapi 0.22.0 · DVT (YetAnotherAA-Validator) v1.2.0**. +> (Numbered 0.20.0 — `[0.19.0]` was already used by an earlier, unreleased CHANGELOG entry below.) + +### Highlights this cycle +- **100% upstream ABI/API coverage** (KMS / SuperPaymaster / AirAccount), enforced by `scripts/coverage/check-doc-coverage.ts` + an ABI-absent-wrapper audit. Closed across waves: SuperPaymaster pre-flight/price/BLS-timelock reads, the governance/admin surface (Registry/BLSAggregator/DVTValidator/GTokenStaking/MicroPaymentChannel/ReputationSystem), the full AirAccount account/factory/session/agent surface, xPNTsToken finance, KMS `/UnfreezeKey`, and the KMS TEE remote-attestation endpoints (`/attestation` + `.well-known/attestation-measurements*`, #37/#12/#87). +- **AirAccount contracts synced to v0.18.0-beta.2** (full Sepolia redeploy — all 11 addresses updated to the E2E-verified beta.2 deployment, incl. the DVT verifier `AAStarBLSAlgorithm 0xA9EE4f8A`; re-vendored the 2 ABIs that changed: `+guardSetStrictMode` on the account, `-g2Add` on AAStarBLSAlgorithm); `microPaymentChannel` Sepolia config drift fixed. +- **issue #30 — 65+ ABI-absent wrappers repaired**: every action wrapper that called a `functionName` absent from its ABI (v5.x removed/renamed fns; would revert on-chain) was re-verified and fixed — RENAMED where the ABI has the fn, or made to THROW `NOT_IMPLEMENTED` where genuinely removed. `x402.ts` switched to `X402FacilitatorABI`. +- **DVT v1 client aggregation (#63)**: `dvtWire.ts` assembles the combined signature in the verifier's exact `[tier][P256][nodeIds][blsSig]` wire (byte-for-byte vs live Sepolia txs); an SDK-driven real-node E2E proves on-chain `AAStarBLSAlgorithm.validate = 0`. +- **Beta4 — agent on-chain lifecycle**: complete viem agent surface (`agentRegistry` + `airAccountFactory`) + a Sepolia E2E with real tx hashes (createAgentAccount → registerAgent → revokeAgent). +- **YAA #52 (Beta3.1)**: `issueXPNTs` fix, `checkResources`, batch SBT mint, registry queries + `getCommunityProfile` (event back-trace), `configureSBTRules`/`getCommunityStats`, `getMySBTId` fix; + repaired pre-existing dangling getters. +- **WebAuthn #49 challenge-binding (#58)**: TA-nonce → `clientDataJSON` ceremony across the KMS server-side signing paths (mainnet prerequisite before `ENFORCE_TA_CHALLENGE=true`). +- **AirAccount v0.18 + SuperPaymaster v5.4 ABI/address sync**; new `policyRegistry` / `x402Facilitator` / `timelockController` / `agentValidationRegistry` keys; `microPaymentChannel` + `pnts` realigned to the live deployments. +- **Docs**: README "Integration Infrastructure & Upstream Version Pins" (4 stacks) + mandatory `docs/RELEASE-CHECKLIST.md`. + +### SuperPaymaster v5.4.0-beta.1 sync (chore/sync-superpaymaster-v5.4) + +#### Added +- **`X402Facilitator` ABI** (`@aastar/core` `packages/core/src/abis/X402Facilitator.json`) + + `X402FacilitatorABI` / `X402FacilitatorArtifact` exports. x402 micropayment settlement + entrypoint (verify/settle EIP-3009 authorizations + direct xPNTs, operator/facilitator fees). +- **`x402Facilitator`** and **`timelockController`** keys added to `CANONICAL_ADDRESSES` for all + chains (real on Sepolia `11155111`, zero on `10` / `11155420`). Sepolia x402Facilitator + `0xFe95a77e4Db593E6EA88000Aad9cD1230BAB4512`, timelockController `0x6cEc100c9CDc6ee7D9EDe0533edD3554E641DdBF`. + The x402 facilitator address is now resolvable from the SDK (previously absent everywhere). + +#### Changed +- Re-synced `SuperPaymaster.json`, `Registry.json`, `PolicyRegistry.json` ABIs from the + SuperPaymaster repo (v5.4 god-split / L-C surface). +- Fixed stale Sepolia addresses: SP impl comment `0xEB2C9Cb…` → **`0xE84Ae83E…`**; + `registryImpl` in root `config.sepolia.json` `0x1bd28f89…` → **`0x0B5ce703…`**; added + `x402Facilitator` / `policyRegistry` / `timelockController` and updated stale `spImpl` in + `config.sepolia.json`. +- `@aastar/core` `0.18.0` → `0.18.1`. + +### KMS v0.20.0 + ERC-8004 SDK integration (feat/kms-v0.20.0-integration) + +#### ⚠ BREAKING CHANGES +- **`WebAuthnAssertion`** fields renamed from camelCase to **PascalCase** — + `challengeId` → **`ChallengeId`**, `credential` → **`Credential`** — to match the KMS + wire format (the server struct uses `#[serde(rename = "ChallengeId" / "Credential")]`). + Any code constructing a `WebAuthnAssertion` literal must update the field casing. + The previous camelCase shape never matched the server and would have been rejected. +- **`KmsBeginGrantSessionAuthResponse`** fields likewise PascalCased: `challengeId` → + **`ChallengeId`**, `options` → **`Options`** (matches `AuthenticationOptionsResponse`). +- **`KmsSignGrantSessionRequest` / `KmsSignP256GrantSessionRequest`**: `contractScope` + and `selectorScope` are now **`string`** (was `number`) — the KMS server types are + `String` (`selectorScope` is a bytes4 hex); numeric values failed server deserialization. +- **Default KMS endpoint** is now `https://kms.aastar.io` (was `https://kms1.aastar.io`). + +#### Added +- `KmsHttpClient` — shared KMS HTTP transport (`post`/`get`/`amzPost`/`postWithBearer`). +- `KmsManager` key methods: `sign` (message/EIP-155 tx), `getPublicKey`, `deriveAddress`, + `listKeys`, `deleteKey`, `changePasskey`; `signTypedDataWithWebAuthn` now posts full + EIP-712 typed data to `/kms/SignTypedData`; `beginWebAuthnAuth` uses `/BeginAuthentication`. +- `KmsAgentService` (agent TEE-JWT lifecycle), `KmsSessionService` (P256 session keys), + `KmsPaymentSigner` (Micropayment / GToken EIP-3009 / x402 signers), `KmsMonitorService` + (health/version/queueStatus/rollbackCounter/stats + `@internal` adminPurgeKey). +- `ERC8004Service` — ERC-8004 agent identity calldata encoders + chain-derived registry addresses. + +## [0.19.0] - 2026-03-30 + +### Breaking Changes +- `AIRACCOUNT_ADDRESSES.sepolia.factory` now points to M7 r6 (`0x42f82d77...`). + Existing M7 r5 accounts will have different CREATE2 addresses under the new factory. + Old r5 factory address is preserved as `factoryM7r5Prev` for reference. + +### Added +- `AccountManager.buildGuardianAcceptanceHash(owner, salt, factoryAddress, chainId, dailyLimit)` — + computes the raw keccak256 guardian acceptance hash (guardians sign via `personal_sign`); + `dailyLimit` is bound into the hash (M9 C-3 front-run fix); `salt` accepts `number | bigint` +- `AccountManager.createAccountWithGuardians(params)` — creates an account with + two explicit user guardians + community guardian (v0.7+ only); throws for v0.6 +- `AccountRecord` new optional fields: `dailyLimit`, `guardian1`, `guardian1Sig`, + `guardian2`, `guardian2Sig` — persisted for deterministic initCode reconstruction +- `createAccount` accepts new optional `dailyLimit: bigint` parameter; written into + the factory config so initCode stays identical across process restarts +- `TransferManager`: guardian accounts use `createAccountWithDefaults` for initCode + (fixes sender/initCode mismatch that would cause bundlers to reject first UserOp) + +## [0.18.0] - 2026-03-27 + +### M7 r5 SDK Upgrade (feat/m7-sdk-upgrade) + +#### ⚠ BREAKING CHANGES +- **`AIRACCOUNT_ADDRESSES.sepolia.factory`** now points to the **M7 r5** factory contract (`0xa0007c5db27548d8c1582773856db1d123107383`). The previous M5 address has been renamed to **`factoryM5`** (`0xd72a236d84be6c388a8bc7deb64afd54704ae385`). Any existing code referencing `.factory` will now target the M7 contract, producing **different CREATE2 account addresses**. This affects counterfactual address derivation and asset routing for accounts created via the old factory. + - Migration: use `.factoryM7` (explicit) or `.factoryM5` (legacy M5 accounts). +- **`SessionKeyService` constructor** no longer has default address values for `sessionKeyValidatorAddress` and `agentSessionKeyValidatorAddress`. Both addresses must now be passed explicitly to avoid cross-network address mismatches. +- **`SessionKeyService.encodeGrantAgentSession`** signature changed: the unused `account` parameter has been removed. Contract uses `msg.sender`; the first argument is now `sessionKey`. + +#### Features +- M7 r5 contract addresses and ABIs (`compositeValidator`, `tierGuardHook`, `agentSessionKeyValidator`, `accountImpl`) +- F6 `GuardStateReader` — ETH and per-token spending state +- F7 OAPD address derivation (`getOapdAddress`, `getOapdAddressWithChainId`) +- F4 EIP-1193/6963 — `AirAccountEIP1193Provider`, `announceAirAccount()`, `watchProviders()` +- F4 `personal_sign` and `eth_signTypedData_v4` support in `AirAccountEIP1193Provider` +- F1 Hardware wallets — `connectLedger()` (WebHID ECDSA) + `createYubiKeySigner()` (WebAuthn P256, Tier 2/3) +- F2 Helios — `createHeliosTransport()` (a16z WASM light client viem transport) +- F3 ENS — `resolveEns()`, `lookupAddress()`, `resolveEnsVerified()` + +## [0.17.0] - 2026-03-24 + +### V5.3 Agent Economy SDK +- **[FEATURE]** **@aastar/x402**: x402 payment client — EIP-3009 signing, payment header encode/decode, x402Fetch auto-retry +- **[FEATURE]** **@aastar/channel**: MicroPaymentChannel client — EIP-712 voucher signing, channel lifecycle management +- **[FEATURE]** **@aastar/cli**: CLI tool — `aastar x402/channel/agent` commands +- **[FEATURE]** **Core L1 Actions**: `x402Actions`, `agentActions`, `channelActions` — three new action factories +- **[SYNC]** SuperPaymaster ABI synced to V5.3.0 (x402 settlement, agent sponsorship, facilitator fees) +- **[ADDED]** MicroPaymentChannel ABI +- **[ADDED]** Address constants: microPaymentChannel, agentIdentityRegistry, agentReputationRegistry (Sepolia deployed) + +## [0.20.8] - 2026-06-18 +**SDK Code Integrity Hash**: `1b43e81d4cc394b44ed39665749d678666d9e7571054619f8da09aa64b04fec1` *(Excludes metadata/markdown to ensure stability / 排除文档文件以确保哈希稳定)* ### ⛽ Gas Fee Strategy (PaymasterClient) - **[FIX]** **Testnet/Mainnet Split Gas Pricing**: @@ -106,8 +251,8 @@ All notable changes to this project will be documented in this file. > [!IMPORTANT] > **Security First**: To ensure you are using an official release and protect your private keys, always verify the integrity of the SDK code immediately after installation. -**Current Code Integrity Hash (v0.16.22)**: -`89da8c80ebe6ad8b06adbd4946a00817b18ae79296550709b20bd9ca3af424f9` +**Current Code Integrity Hash (v0.19.0)**: +`b39aef2a020061c37725d0e80295774dadadc7ff964fef723287bfc71520dbb5` To verify, run this stable command (excludes non-code markdown files): ```bash diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index e6382ec23..000000000 --- a/examples/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Complete Examples Overview - -This section contains complete, end-to-end examples of how to use the AAStar SDK for various roles and use cases. - -## Available Examples - -- **[Operator Flow](./operator-flow)**: Staking and managing a SuperPaymaster. -- **[Community Flow](./community-flow)**: Registering a community and setting up reputation rules. -- **[End User Flow](./enduser-flow)**: Sending gasless transactions using community credit. -- **[Multi-Chain Setup](./multi-chain)**: Configuring and using the SDK across different networks. - -## Running Examples Locally - -Most examples can be run against a local Anvil instance. Ensure you have the [AAStar Contracts](https://github.com/AAStarCommunity/SuperPaymaster) deployed locally first. - -```bash -pnpm run example:local -``` diff --git a/examples/index.md b/examples/index.md index 7bcc25fee..7165ccf3b 100644 --- a/examples/index.md +++ b/examples/index.md @@ -1,29 +1,51 @@ -# Complete Examples Overview +# Examples Overview -This section contains end-to-end examples of how to use the AAStar SDK for various roles and use cases. +Runnable, integration-focused examples for the AAStar SDK (`@aastar/sdk`). They +show how to give your users a **gasless, email + passkey smart-account** +experience — no seed phrase, no ETH for gas — built on AirAccount (TEE-backed +KMS + WebAuthn) and SuperPaymaster (ERC-4337 gas sponsorship). -## Available Examples +## Starter examples — `aastar-examples` -- **[Operator Flow](./operator-flow)**: Staking and managing a SuperPaymaster. -- **[Community Flow](./community-flow)**: Registering a community and setting up reputation rules. -- **[End User Flow](./enduser-flow)**: Sending gasless transactions using community credit. -- **[Multi-Chain Setup](./multi-chain)**: Configuring and using the SDK across different networks. +The two baseline integration examples live in the standalone +**[AAStarCommunity/aastar-examples](https://github.com/AAStarCommunity/aastar-examples)** +repo (each is its own `package.json`, installed outside the monorepo, targeting +`@aastar/sdk@0.20.x`): + +| Example | What it is | Use when | +| :--- | :--- | :--- | +| **[`embed-widget/`](https://github.com/AAStarCommunity/aastar-examples/tree/main/embed-widget)** | A minimal **drop-in widget** — a mountable React component **and** a vanilla `